diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt index 370451fe929..53ad8041dc4 100644 --- a/src/freedreno/ci/freedreno-a630-fails.txt +++ b/src/freedreno/ci/freedreno-a630-fails.txt @@ -239,8 +239,6 @@ spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG32UI- swizzled spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8I- swizzled- border color only,Fail spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8UI- swizzled- border color only,Fail -spec@arb_texture_view@rendering-layers-image,Fail -spec@arb_texture_view@rendering-layers-image@layers rendering of image1DArray,Fail spec@arb_timer_query@timestamp-get,Fail # "Expected 1 primitives written, got 0" diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 0608c14a798..67f1143f92b 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -1421,11 +1421,20 @@ emit_intrinsic_load_image(struct ir3_context *ctx, nir_intrinsic_instr *intr, info.flags |= flags; - for (unsigned i = 0; i < ncoords; i++) - coords[i] = src0[i]; - - if (ncoords == 1) - coords[ncoords++] = create_immed(b, 0); + /* hw doesn't do 1d, so we treat it as 2d with height of 1, and patch up the + * y coord. Note that the array index must come after the fake y coord. + */ + enum glsl_sampler_dim dim = nir_intrinsic_image_dim(intr); + if (dim == GLSL_SAMPLER_DIM_1D || dim == GLSL_SAMPLER_DIM_BUF) { + coords[0] = src0[0]; + coords[1] = create_immed(b, 0); + for (unsigned i = 1; i < ncoords; i++) + coords[i + 1] = src0[i]; + ncoords++; + } else { + for (unsigned i = 0; i < ncoords; i++) + coords[i] = src0[i]; + } sam = emit_sam(ctx, OPC_ISAM, info, type, 0b1111, ir3_create_collect(b, coords, ncoords), NULL);