[Mesa-dev] [PATCH 4/4] glsl/linker: Recurse on struct fields when adding shader variables

Matt Turner mattst88 at gmail.com
Tue Apr 12 22:28:45 UTC 2016


On Tue, Apr 12, 2016 at 3:27 PM, Kristian Høgsberg <krh at bitplanet.net> wrote:
> On Tue, Apr 12, 2016 at 3:20 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> On Tue, Apr 12, 2016 at 2:24 PM, Kristian Høgsberg <krh at bitplanet.net> wrote:
>>> From: Kristian Høgsberg Kristensen <kristian.h.kristensen at intel.com>
>>>
>>> ARB_program_interface_query requires that we add struct fields
>>> recursively down to basic types.
>>>
>>> Fixes 52 struct test cases in dEQP-GLES31.functional.program_interface_query.*
>>>
>>> Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen at intel.com>
>>> ---
>>>  src/compiler/glsl/linker.cpp | 51 ++++++++++++++++++++++++++++++++++++++------
>>>  1 file changed, 45 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
>>> index 4c512d4..f92b289 100644
>>> --- a/src/compiler/glsl/linker.cpp
>>> +++ b/src/compiler/glsl/linker.cpp
>>> @@ -3575,13 +3575,52 @@ add_shader_variable(struct gl_shader_program *shProg, unsigned stage_mask,
>>>                      const char *name, const glsl_type *type,
>>>                      bool use_implicit_location, int location)
>>>  {
>>> -   gl_shader_variable *sha_v =
>>> -      create_shader_variable(shProg, var, name, type,
>>> -                             use_implicit_location, location);
>>> -   if (!sha_v)
>>> -      return false;
>>> +   const bool vertex_input_slots =
>>
>> This is a bad name for a bool, and I'm going to send a patch to change
>> it elsewhere to "is_vertex_input". Would you mind changing it here as
>> well?
>
> Sure, I guess I just copied over the argument name from
> count_attribute_slots(). I pushed the patches already, but go ahead
> and change the name.

Oh, okay. I didn't figure the patches would go from list to master in
just over an hour...


More information about the mesa-dev mailing list