diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-20 19:13:50 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-05-06 16:40:19 +0200 |
commit | becc87b84a01d0b9c6efb5a979dfb44c53095c4d (patch) | |
tree | 4f6642012239e984ede99edec29510874aa6f65a /src/mesa/main/uniform_query.cpp | |
parent | 042eee2067dc937e8d7e9b54829c5c4b8706dc27 (diff) |
glsl: make sampler/image types as 64-bit
The ARB_bindless_texture spec says:
"Samplers are represented using 64-bit integer handles."
and,
"Images are represented using 64-bit integer handles."
It seems simpler to always consider sampler and image types
as 64-bit unsigned integer.
This introduces a temporary workaround in _mesa_get_uniform()
because at this point no flag are used to distinguish between
bound and bindless samplers. This is going to be removed in a
separate series. This avoids breaking arb_shader_image_load_store-state.
v3: - update the comment slightly
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/uniform_query.cpp')
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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 |