nir/lower_robustness: drop skip_ubo_0 option
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 27 Jul 2023 08:48:05 +0000 (10:48 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Aug 2023 06:32:40 +0000 (06:32 +0000)
v3dv was the only user and it no longer requires this.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396>

src/compiler/nir/nir.h
src/compiler/nir/nir_lower_robust_access.c

index ce45abf..1c3a6ca 100644 (file)
@@ -5243,9 +5243,6 @@ typedef struct {
    /* Lower image_atomic(_swap) for all dimensions. Implied by lower_image. */
    bool lower_image_atomic;
 
-   /* Subtract one from the UBO index */
-   bool skip_ubo_0;
-
    /* Vulkan's robustBufferAccess feature is only concerned with buffers that
     * are bound through descriptor sets, so shared memory is not included, but
     * it may be useful to enable this for debugging.
index 5dce3a6..bd8595f 100644 (file)
@@ -68,9 +68,6 @@ lower_buffer_load(nir_builder *b,
    nir_ssa_def *index = instr->src[0].ssa;
 
    if (instr->intrinsic == nir_intrinsic_load_ubo) {
-      if (opts->skip_ubo_0)
-         index = nir_iadd_imm(b, index, -1);
-
       size = nir_get_ubo_size(b, 32, index);
    } else {
       size = nir_get_ssbo_size(b, index);