intel/compiler: Remove cube array size lowering in compiler backend
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9466>
This commit is contained in:
@@ -4190,6 +4190,9 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
|
||||
|
||||
case nir_intrinsic_image_size:
|
||||
case nir_intrinsic_bindless_image_size: {
|
||||
/* Cube image sizes should have previously been lowered to a 2D array */
|
||||
assert(nir_intrinsic_image_dim(instr) != GLSL_SAMPLER_DIM_CUBE);
|
||||
|
||||
/* Unlike the [un]typed load and store opcodes, the TXS that this turns
|
||||
* into will handle the binding table index for us in the geneerator.
|
||||
* Incidentally, this means that we can handle bindless with exactly the
|
||||
@@ -4221,14 +4224,8 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
|
||||
inst->size_written = 4 * REG_SIZE;
|
||||
|
||||
for (unsigned c = 0; c < instr->dest.ssa.num_components; ++c) {
|
||||
if (c == 2 && nir_intrinsic_image_dim(instr) == GLSL_SAMPLER_DIM_CUBE) {
|
||||
bld.emit(SHADER_OPCODE_INT_QUOTIENT,
|
||||
offset(retype(dest, tmp.type), bld, c),
|
||||
component(offset(tmp, ubld, c), 0), brw_imm_ud(6));
|
||||
} else {
|
||||
bld.MOV(offset(retype(dest, tmp.type), bld, c),
|
||||
component(offset(tmp, ubld, c), 0));
|
||||
}
|
||||
bld.MOV(offset(retype(dest, tmp.type), bld, c),
|
||||
component(offset(tmp, ubld, c), 0));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user