nir/validate: Only require bare types to match for copy_deref

If we want to be able to use copy_deref instructions on explicitly laid
out types, we have to be a little more flexible about what types we
allow.  Instead, of requiring the types to exactly match, only require
the bare types to match.

Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
Jason Ekstrand
2019-03-09 13:06:28 -06:00
committed by Jason Ekstrand
parent 2b76de9b5d
commit 5d26f2d3d5
3 changed files with 6 additions and 3 deletions

View File

@@ -66,7 +66,8 @@ static void
split_deref_copy_instr(nir_builder *b,
nir_deref_instr *dst, nir_deref_instr *src)
{
assert(dst->type == src->type);
assert(glsl_get_bare_type(dst->type) ==
glsl_get_bare_type(src->type));
if (glsl_type_is_vector_or_scalar(src->type)) {
nir_copy_deref(b, dst, src);
} else if (glsl_type_is_struct_or_ifc(src->type)) {