v3dv: remove unused lowering for nir_intrinsic_load_layer_id
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 12 Jul 2022 09:36:56 +0000 (11:36 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 12 Jul 2022 11:47:13 +0000 (11:47 +0000)
This intrinsic is only produced when the compiler is instructed
to handle layer id as a system value, which we don't use. Also,
we have been supporting layered rendering for a while and passing
all the relevant tests which would've failed if we were hitting
this lowering.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17483>

src/broadcom/vulkan/v3dv_pipeline.c

index 65a4507..60e45d2 100644 (file)
@@ -883,15 +883,6 @@ lower_intrinsic(nir_builder *b, nir_intrinsic_instr *instr,
                 const struct v3dv_pipeline_layout *layout)
 {
    switch (instr->intrinsic) {
-   case nir_intrinsic_load_layer_id:
-      /* FIXME: if layered rendering gets supported, this would need a real
-       * lowering
-       */
-      nir_ssa_def_rewrite_uses(&instr->dest.ssa,
-                               nir_imm_int(b, 0));
-      nir_instr_remove(&instr->instr);
-      return true;
-
    case nir_intrinsic_load_push_constant:
       lower_load_push_constant(b, instr, pipeline);
       return true;