summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_types.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-03-26 14:13:17 -0700
committerEric Anholt <eric@anholt.net>2012-04-09 14:34:06 -0700
commit659855252107debc47dbac8ec7985e1024d7ab5c (patch)
tree1d47bfaafb899e6e3de7018f7b2ffa6b58883f5f /src/glsl/glsl_types.cpp
parent6d0f5684c1aa1b3563af8ae3db35ff0916a7b922 (diff)
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>
Diffstat (limited to 'src/glsl/glsl_types.cpp')
-rw-r--r--src/glsl/glsl_types.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 069ebd10d6c..8a34b8eb09c 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -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);
}