mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
glsl: Add support for parsing [iu]samplerBuffer types in GLSL 1.40.
The samplerBuffer type will be undefined in !glsl 1.40, and the keyword is marked as reserved. The [iu]samplerBuffer types are not marked as reserved pre-1.40, so they don't have separate tokens and fall through to normal type handling. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
6d0f5684c1
commit
6598552521
2 changed files with 5 additions and 1 deletions
|
|
@ -1405,6 +1405,7 @@ basic_type_specifier_nonarray:
|
|||
| SAMPLER2DARRAY { $$ = "sampler2DArray"; }
|
||||
| SAMPLER1DARRAYSHADOW { $$ = "sampler1DArrayShadow"; }
|
||||
| SAMPLER2DARRAYSHADOW { $$ = "sampler2DArrayShadow"; }
|
||||
| SAMPLERBUFFER { $$ = "samplerBuffer"; }
|
||||
| ISAMPLER1D { $$ = "isampler1D"; }
|
||||
| ISAMPLER2D { $$ = "isampler2D"; }
|
||||
| ISAMPLER3D { $$ = "isampler3D"; }
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@ glsl_type::sampler_index() const
|
|||
case GLSL_SAMPLER_DIM_RECT:
|
||||
return TEXTURE_RECT_INDEX;
|
||||
case GLSL_SAMPLER_DIM_BUF:
|
||||
assert(!"FINISHME: Implement ARB_texture_buffer_object");
|
||||
return TEXTURE_BUFFER_INDEX;
|
||||
case GLSL_SAMPLER_DIM_EXTERNAL:
|
||||
return TEXTURE_EXTERNAL_INDEX;
|
||||
|
|
@ -213,6 +212,10 @@ glsl_type::generate_140_types(glsl_symbol_table *symtab)
|
|||
|
||||
add_types_to_symbol_table(symtab, builtin_140_types,
|
||||
Elements(builtin_140_types), false);
|
||||
|
||||
add_types_to_symbol_table(symtab, builtin_EXT_texture_buffer_object_types,
|
||||
Elements(builtin_EXT_texture_buffer_object_types),
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue