diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-21 15:27:15 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-05-06 16:40:19 +0200 |
commit | 3cdcc5f02f39bd4dc78b88eb80bca4ac208f7f2f (patch) | |
tree | 57d7c5bd72206247e48d4ffb760c3c84cb61d551 /src/compiler/glsl/ir_clone.cpp | |
parent | 95c83aba713ad89ff4d189cbdcbf725e2010af7e (diff) |
glsl: implement ARB_bindless_texture conversions
From section 5.4.1 of the ARB_bindless_texture spec:
"In the following four constructors, the low 32 bits of the
sampler type correspond to the .x component of the uvec2 and
the high 32 bits correspond to the .y component."
uvec2(any sampler type) // Converts a sampler type to a
// pair of 32-bit unsigned integers
any sampler type(uvec2) // Converts a pair of 32-bit unsigned integers to
// a sampler type
uvec2(any image type) // Converts an image type to a
// pair of 32-bit unsigned integers
any image type(uvec2) // Converts a pair of 32-bit unsigned integers to
// an image type
v4: - fix up comment style
v3: - rebase (and remove (sampler) ? 1 : vector_elements)
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_clone.cpp')
-rw-r--r-- | src/compiler/glsl/ir_clone.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/ir_clone.cpp b/src/compiler/glsl/ir_clone.cpp index bfe2573c071..a64c7afa944 100644 --- a/src/compiler/glsl/ir_clone.cpp +++ b/src/compiler/glsl/ir_clone.cpp @@ -339,6 +339,8 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const case GLSL_TYPE_BOOL: case GLSL_TYPE_UINT64: case GLSL_TYPE_INT64: + case GLSL_TYPE_SAMPLER: + case GLSL_TYPE_IMAGE: return new(mem_ctx) ir_constant(this->type, &this->value); case GLSL_TYPE_STRUCT: { @@ -367,8 +369,6 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const return c; } - case GLSL_TYPE_SAMPLER: - case GLSL_TYPE_IMAGE: case GLSL_TYPE_ATOMIC_UINT: case GLSL_TYPE_VOID: case GLSL_TYPE_ERROR: |