summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/glsl_types.h4
-rw-r--r--src/mesa/main/uniform_query.cpp6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h
index 9885866866a..a81b8fe7dc2 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -72,7 +72,9 @@ static inline bool glsl_base_type_is_64bit(enum glsl_base_type type)
{
return type == GLSL_TYPE_DOUBLE ||
type == GLSL_TYPE_UINT64 ||
- type == GLSL_TYPE_INT64;
+ type == GLSL_TYPE_INT64 ||
+ type == GLSL_TYPE_IMAGE ||
+ type == GLSL_TYPE_SAMPLER;
}
enum glsl_sampler_dim {
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 114f6fb5bee..0e02a764a92 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -322,7 +322,11 @@ _mesa_get_uniform(struct gl_context *ctx, GLuint program, GLint location,
{
unsigned elements = uni->type->components();
- const int dmul = uni->type->is_64bit() ? 2 : 1;
+ /* XXX: Remove the sampler/image check workarounds when bindless is fully
+ * implemented.
+ */
+ const int dmul =
+ (uni->type->is_64bit() && !uni->type->is_sampler() && !uni->type->is_image()) ? 2 : 1;
const int rmul = glsl_base_type_is_64bit(returnType) ? 2 : 1;
/* Calculate the source base address *BEFORE* modifying elements to