[Mesa-dev] [PATCH 2/2] [RFC] Linker: handle built-in uniform variables like normal uniform variables
Yuanhan Liu
yuanhan.liu at linux.intel.com
Sun Nov 13 18:08:16 PST 2011
On Sat, Nov 12, 2011 at 12:54:37PM -0800, Ian Romanick wrote:
> On 11/09/2011 01:10 AM, Yuanhan Liu wrote:
> >The original comments just tell me that I'm doing wrong. Here I sent a
> >patch for comments and explanation, and I may then try to write the code
> >to process those built-in uniform variables.
> >
> >My questions is why we can't handle those built-in uniform variables
> >like normal uniform variables? What kind of special stuff should be
> >deal while handling them? (Sorry, I am not familiar with glsl).
>
> Built-in uniforms aren't assigned locations that can be queried by
> glGetUniformLocation. There's a fair amount of work to do to make
> this work, and it's on my to-do list.
Got it and thanks for the explanation.
>
> >Thanks.
> >
> >Cc: idr at freedesktop.org
> >Cc: eric at anholt.net
> >Cc: kenneth at whitecape.org
> >---
> > src/glsl/link_uniforms.cpp | 10 ----------
> > 1 files changed, 0 insertions(+), 10 deletions(-)
> >
> >diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
> >index b9d5361..bd6af5d 100644
> >--- a/src/glsl/link_uniforms.cpp
> >+++ b/src/glsl/link_uniforms.cpp
> >@@ -273,11 +273,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
> > if ((var == NULL) || (var->mode != ir_var_uniform))
> > continue;
> >
> >- /* FINISHME: Update code to process built-in uniforms!
> >- */
> >- if (strncmp("gl_", var->name, 3) == 0)
> >- continue;
> >-
> > uniform_size.process(var);
> > }
> > }
> >@@ -310,11 +305,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
> > if ((var == NULL) || (var->mode != ir_var_uniform))
> > continue;
> >
> >- /* FINISHME: Update code to process built-in uniforms!
> >- */
> >- if (strncmp("gl_", var->name, 3) == 0)
> >- continue;
> >-
> > parcel.process(var);
> > }
> > }
More information about the mesa-dev
mailing list