diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-04-21 14:37:24 +0200 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-05-06 16:40:19 +0200 |
commit | 8b4c48673a7dae9301703a5e89a6eaa100a0c2ed (patch) | |
tree | 92df9155fa9872b3e71b62988c057e0a5a4991f2 /src | |
parent | 3cdcc5f02f39bd4dc78b88eb80bca4ac208f7f2f (diff) |
glsl: lower bindless sampler/image packed varyings
v3: - rebase (and remove (sampler) ? 1 : vector_elements)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/lower_packed_varyings.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp index b1a3b49b1d5..1aec7ee7dc2 100644 --- a/src/compiler/glsl/lower_packed_varyings.cpp +++ b/src/compiler/glsl/lower_packed_varyings.cpp @@ -383,6 +383,12 @@ lower_packed_varyings_visitor::bitwise_assign_pack(ir_rvalue *lhs, rhs = u2i(expr(ir_unop_unpack_uint_2x32, rhs)); } break; + case GLSL_TYPE_SAMPLER: + rhs = u2i(expr(ir_unop_unpack_sampler_2x32, rhs)); + break; + case GLSL_TYPE_IMAGE: + rhs = u2i(expr(ir_unop_unpack_image_2x32, rhs)); + break; default: assert(!"Unexpected type conversion while lowering varyings"); break; @@ -462,6 +468,14 @@ lower_packed_varyings_visitor::bitwise_assign_unpack(ir_rvalue *lhs, rhs = expr(ir_unop_pack_uint_2x32, i2u(rhs)); } break; + case GLSL_TYPE_SAMPLER: + rhs = new(mem_ctx) + ir_expression(ir_unop_pack_sampler_2x32, lhs->type, i2u(rhs)); + break; + case GLSL_TYPE_IMAGE: + rhs = new(mem_ctx) + ir_expression(ir_unop_pack_image_2x32, lhs->type, i2u(rhs)); + break; default: assert(!"Unexpected type conversion while lowering varyings"); break; |