Re: [Mesa-dev] [PATCH 13/21] glsl: Track explicitly set varying locations
On 04/29/2014 10:57 PM, Timothy Arceri wrote: Looks like this patch should have been dropped with the removal of user_location? Nope. We still need to track the location set in the shader. Now it's tracked in the same location field as, say, vertex shader inputs instead of having a special field. On Tue, 2014-04-29 at 17:52 -0700, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/ast_to_hir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 0411bef..e1192ed 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2268,6 +2268,8 @@ validate_explicit_location(const struct ast_type_qualifier *qual, assert(!Unexpected shader type); break; } + + var-data.location = var-data.location; } else { var-data.location = qual-location; } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 13/21] glsl: Track explicitly set varying locations
Sorry to waste more of your time but this is driving me nuts. For my own education :) can you tell me how this code works? Maybe I'm making myself look silly by not understanding some basic concept of c++. But to me it looks like var-data.location already contains the explicit location and you are just assigning it the value it already contains. Is there some weird operator overloading going on here? On Wed, 2014-04-30 at 07:42 -0700, Ian Romanick wrote: On 04/29/2014 10:57 PM, Timothy Arceri wrote: Looks like this patch should have been dropped with the removal of user_location? Nope. We still need to track the location set in the shader. Now it's tracked in the same location field as, say, vertex shader inputs instead of having a special field. On Tue, 2014-04-29 at 17:52 -0700, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/ast_to_hir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 0411bef..e1192ed 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2268,6 +2268,8 @@ validate_explicit_location(const struct ast_type_qualifier *qual, assert(!Unexpected shader type); break; } + + var-data.location = var-data.location; } else { var-data.location = qual-location; } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 13/21] glsl: Track explicitly set varying locations
On 04/30/2014 02:26 PM, Timothy Arceri wrote: Sorry to waste more of your time but this is driving me nuts. For my own education :) can you tell me how this code works? Maybe I'm making myself look silly by not understanding some basic concept of c++. But to me it looks like var-data.location already contains the explicit location and you are just assigning it the value it already contains. Is there some weird operator overloading going on here? I went back and looked at the code so that I could give a good answer... and you were right in the first place. :) Good catch. I'll remove this patch from the series. On Wed, 2014-04-30 at 07:42 -0700, Ian Romanick wrote: On 04/29/2014 10:57 PM, Timothy Arceri wrote: Looks like this patch should have been dropped with the removal of user_location? Nope. We still need to track the location set in the shader. Now it's tracked in the same location field as, say, vertex shader inputs instead of having a special field. On Tue, 2014-04-29 at 17:52 -0700, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/ast_to_hir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 0411bef..e1192ed 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2268,6 +2268,8 @@ validate_explicit_location(const struct ast_type_qualifier *qual, assert(!Unexpected shader type); break; } + + var-data.location = var-data.location; } else { var-data.location = qual-location; } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 13/21] glsl: Track explicitly set varying locations
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/ast_to_hir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 0411bef..e1192ed 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2268,6 +2268,8 @@ validate_explicit_location(const struct ast_type_qualifier *qual, assert(!Unexpected shader type); break; } + + var-data.location = var-data.location; } else { var-data.location = qual-location; } -- 1.8.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev