summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-03-29 23:11:07 +0200
committerSamuel Pitoiset <[email protected]>2016-03-30 19:01:33 +0200
commitbb37886f75f48727e5d3f5e2715c4a2f418ac1a1 (patch)
treede771395bd2dd0e67ef8e0de42bd24926aec0a99 /src/compiler
parent6773128bbf8703663ed1a4d6c1c3308b3c002a35 (diff)
glsl: add missing types for buffer images
Type of GLSL_SAMPLER_DIM_BUF can be sampler or image. Spotted while trying to run dEQP tests related to ARB_shader_image_load_store. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 29a4642af2c..fcc542ab5e0 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -2353,11 +2353,11 @@ get_type_name_for_precision_qualifier(const glsl_type *type)
return names[type_idx];
}
case GLSL_SAMPLER_DIM_BUF: {
- assert(type->base_type == GLSL_TYPE_SAMPLER);
- static const char *const names[4] = {
- "samplerBuffer", NULL, NULL, NULL
+ static const char *const names[8] = {
+ "samplerBuffer", NULL, NULL, NULL,
+ "imageBuffer", NULL, NULL, NULL
};
- return names[type_idx];
+ return names[offset + type_idx];
}
case GLSL_SAMPLER_DIM_EXTERNAL: {
assert(type->base_type == GLSL_TYPE_SAMPLER);
@@ -2415,11 +2415,11 @@ get_type_name_for_precision_qualifier(const glsl_type *type)
return names[type_idx];
}
case GLSL_SAMPLER_DIM_BUF: {
- assert(type->base_type == GLSL_TYPE_SAMPLER);
- static const char *const names[4] = {
- "isamplerBuffer", NULL, NULL, NULL
+ static const char *const names[8] = {
+ "isamplerBuffer", NULL, NULL, NULL,
+ "iimageBuffer", NULL, NULL, NULL
};
- return names[type_idx];
+ return names[offset + type_idx];
}
default:
unreachable("Unsupported isampler/iimage dimensionality");
@@ -2470,11 +2470,11 @@ get_type_name_for_precision_qualifier(const glsl_type *type)
return names[type_idx];
}
case GLSL_SAMPLER_DIM_BUF: {
- assert(type->base_type == GLSL_TYPE_SAMPLER);
- static const char *const names[4] = {
- "usamplerBuffer", NULL, NULL, NULL
+ static const char *const names[8] = {
+ "usamplerBuffer", NULL, NULL, NULL,
+ "uimageBuffer", NULL, NULL, NULL
};
- return names[type_idx];
+ return names[offset + type_idx];
}
default:
unreachable("Unsupported usampler/uimage dimensionality");