[Mesa-dev] [RFC PATCH 23/26] glsl: lower bindless sampler/image packed varyings
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Apr 11 16:48:34 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/compiler/glsl/lower_packed_varyings.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp
index 13f7e5b52d..3ab6a4372a 100644
--- a/src/compiler/glsl/lower_packed_varyings.cpp
+++ b/src/compiler/glsl/lower_packed_varyings.cpp
@@ -383,6 +383,14 @@ lower_packed_varyings_visitor::bitwise_assign_pack(ir_rvalue *lhs,
rhs = u2i(expr(ir_unop_unpack_uint_2x32, rhs));
}
break;
+ case GLSL_TYPE_BINDLESS_SAMPLER:
+ assert(rhs->type->vector_elements == 1);
+ rhs = u2i(expr(ir_unop_unpack_sampler_2x32, rhs));
+ break;
+ case GLSL_TYPE_BINDLESS_IMAGE:
+ assert(rhs->type->vector_elements == 1);
+ rhs = u2i(expr(ir_unop_unpack_image_2x32, rhs));
+ break;
default:
assert(!"Unexpected type conversion while lowering varyings");
break;
@@ -462,6 +470,14 @@ lower_packed_varyings_visitor::bitwise_assign_unpack(ir_rvalue *lhs,
rhs = expr(ir_unop_pack_uint_2x32, i2u(rhs));
}
break;
+ case GLSL_TYPE_BINDLESS_SAMPLER:
+ assert(lhs->type->vector_elements == 1);
+ rhs = expr(ir_unop_pack_sampler_2x32, i2u(rhs));
+ break;
+ case GLSL_TYPE_BINDLESS_IMAGE:
+ assert(lhs->type->vector_elements == 1);
+ rhs = expr(ir_unop_pack_image_2x32, i2u(rhs));
+ break;
default:
assert(!"Unexpected type conversion while lowering varyings");
break;
--
2.12.2
More information about the mesa-dev
mailing list