From 1ad1b356fc3713cabc0feea27e5aee56cae2199e Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Thu, 5 Sep 2024 11:46:21 +0200 Subject: [PATCH] lavapipe: Implement VK_EXT_image_2d_view_of_3d with sparse textures The following things needed to be fixed: - lp_build_tiled_sample_offset has to use the block size of the underlying 3D texture. Remaining calculations use the dimensions of the view since the z-coordinate is undefined and has to be ignored. - The layer offset must be calculated using llvmpipe_get_texel_offset. Fixes: d747c4a ("lavapipe: Implement sparse buffers and images") Reviewed-By: Mike Blumenkrantz Reviewed-by: Dave Airlie Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_sample.c | 29 ++++++++++++++--- src/gallium/auxiliary/gallivm/lp_bld_sample.h | 1 + src/gallium/drivers/llvmpipe/lp_jit.c | 22 ++++++++++--- .../frontends/lavapipe/ci/lvp-fails.txt | 32 ------------------- src/gallium/frontends/lavapipe/lvp_image.c | 3 ++ 5 files changed, 47 insertions(+), 40 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index fcc925a19af..9d2cd2a7c16 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -123,6 +123,8 @@ lp_sampler_static_texture_state(struct lp_static_texture_state *state, else state->target = view->target; + state->res_target = texture->target; + state->pot_width = util_is_power_of_two_or_zero(texture->width0); state->pot_height = util_is_power_of_two_or_zero(texture->height0); state->pot_depth = util_is_power_of_two_or_zero(texture->depth0); @@ -166,13 +168,17 @@ lp_sampler_static_texture_state_image(struct lp_static_texture_state *state, assert(state->swizzle_a < PIPE_SWIZZLE_NONE); state->target = resource->target; + state->res_target = resource->target; state->pot_width = util_is_power_of_two_or_zero(resource->width0); state->pot_height = util_is_power_of_two_or_zero(resource->height0); state->pot_depth = util_is_power_of_two_or_zero(resource->depth0); state->level_zero_only = view->u.tex.level == 0; state->tiled = !!(resource->flags & PIPE_RESOURCE_FLAG_SPARSE); - if (state->tiled) + if (state->tiled) { state->tiled_samples = resource->nr_samples; + if (view->u.tex.is_2d_view_of_3d) + state->target = PIPE_TEXTURE_2D; + } /* * the layer / element / level parameters are all either dynamic @@ -2222,6 +2228,21 @@ lp_build_tiled_sample_offset(struct lp_build_context *bld, assert(static_texture_state->tiled); + uint32_t res_dimensions = 1; + switch (static_texture_state->res_target) { + case PIPE_TEXTURE_2D: + case PIPE_TEXTURE_CUBE: + case PIPE_TEXTURE_RECT: + case PIPE_TEXTURE_2D_ARRAY: + res_dimensions = 2; + break; + case PIPE_TEXTURE_3D: + res_dimensions = 3; + break; + default: + break; + } + uint32_t dimensions = 1; switch (static_texture_state->target) { case PIPE_TEXTURE_2D: @@ -2244,9 +2265,9 @@ lp_build_tiled_sample_offset(struct lp_build_context *bld, }; uint32_t sparse_tile_size[3] = { - util_format_get_tilesize(format, dimensions, static_texture_state->tiled_samples, 0) * block_size[0], - util_format_get_tilesize(format, dimensions, static_texture_state->tiled_samples, 1) * block_size[1], - util_format_get_tilesize(format, dimensions, static_texture_state->tiled_samples, 2) * block_size[2], + util_format_get_tilesize(format, res_dimensions, static_texture_state->tiled_samples, 0) * block_size[0], + util_format_get_tilesize(format, res_dimensions, static_texture_state->tiled_samples, 1) * block_size[1], + util_format_get_tilesize(format, res_dimensions, static_texture_state->tiled_samples, 2) * block_size[2], }; LLVMValueRef sparse_tile_size_log2[3] = { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h index f0e22411dea..0b48c53e427 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h @@ -197,6 +197,7 @@ struct lp_static_texture_state /* pipe_texture's state */ enum pipe_texture_target target:5; /**< PIPE_TEXTURE_* */ + enum pipe_texture_target res_target:5; unsigned pot_width:1; /**< is the width a power of two? */ unsigned pot_height:1; unsigned pot_depth:1; diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c index 7ac6e847396..bc52a0d5b56 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.c +++ b/src/gallium/drivers/llvmpipe/lp_jit.c @@ -418,11 +418,13 @@ lp_jit_texture_from_pipe(struct lp_jit_texture *jit, const struct pipe_sampler_v } } + bool is_2d_view_of_3d = res->target == PIPE_TEXTURE_3D && view->target == PIPE_TEXTURE_2D; + if (res->target == PIPE_TEXTURE_1D_ARRAY || res->target == PIPE_TEXTURE_2D_ARRAY || res->target == PIPE_TEXTURE_CUBE || res->target == PIPE_TEXTURE_CUBE_ARRAY || - (res->target == PIPE_TEXTURE_3D && view->target == PIPE_TEXTURE_2D)) { + is_2d_view_of_3d) { /* * For array textures, we don't have first_layer, instead * adjust last_layer (stored as depth) plus the mip level @@ -432,8 +434,13 @@ lp_jit_texture_from_pipe(struct lp_jit_texture *jit, const struct pipe_sampler_v */ jit->depth = view->u.tex.last_layer - view->u.tex.first_layer + 1; for (unsigned j = first_level; j <= last_level; j++) { - jit->mip_offsets[j] += view->u.tex.first_layer * - lp_tex->img_stride[j]; + if (is_2d_view_of_3d && (res->flags & PIPE_RESOURCE_FLAG_SPARSE)) { + jit->mip_offsets[j] = llvmpipe_get_texel_offset( + view->texture, j, 0, 0, view->u.tex.first_layer); + } else { + jit->mip_offsets[j] += view->u.tex.first_layer * + lp_tex->img_stride[j]; + } } if (view->target == PIPE_TEXTURE_CUBE || view->target == PIPE_TEXTURE_CUBE_ARRAY) { @@ -580,7 +587,14 @@ lp_jit_image_from_pipe(struct lp_jit_image *jit, const struct pipe_image_view *v * XXX For mip levels, could do something similar. */ jit->depth = view->u.tex.last_layer - view->u.tex.first_layer + 1; - mip_offset += view->u.tex.first_layer * lp_res->img_stride[view->u.tex.level]; + + if (res->target == PIPE_TEXTURE_3D && view->u.tex.first_layer != 0 && + (res->flags & PIPE_RESOURCE_FLAG_SPARSE)) { + mip_offset = llvmpipe_get_texel_offset( + res, view->u.tex.level, 0, 0, view->u.tex.first_layer); + } else { + mip_offset += view->u.tex.first_layer * lp_res->img_stride[view->u.tex.level]; + } } else jit->depth = u_minify(jit->depth, view->u.tex.level); diff --git a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt index 39661757a53..dd11bf6c2e1 100644 --- a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt +++ b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt @@ -449,7 +449,6 @@ nir-stress=dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.a8b8 dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16_uint.input.clear.dont_care.clear_draw,Fail nir-stress=dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8g8b8a8_unorm.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.a8b8g8r8_sint_pack32.input.load.dont_care.clear_draw,Fail -dEQP-VK.pipeline.shader_object_linked_binary.image_2d_view_3d_image.fragment.sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16_sint.input.dont_care.dont_care.clear_draw,Fail nir-stress=dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16_sfloat.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.a8b8g8r8_uint_pack32.input.clear.dont_care.clear_draw,Fail @@ -458,15 +457,12 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_sfloat.inpu dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16b16a16_unorm.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16_uint.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r32_sfloat.input.clear.dont_care.draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_binary.image_2d_view_3d_image.fragment.storage.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16b16a16_sint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.a2r10g10b10_unorm_pack32.input.clear.dont_care.clear_draw,Fail nir-stress=dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a8b8g8r8_sint_pack32.input.load.dont_care.clear_draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_binary.image_2d_view_3d_image.fragment.sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r32g32_uint.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.a8b8g8r8_srgb_pack32.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r32g32b32a32_sfloat.input.load.dont_care.clear_draw,Fail -dEQP-VK.pipeline.fast_linked_library.image_2d_view_3d_image.fragment.sampler.mip2_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16b16a16_uint.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.attachment_allocation.input_output_chain.10,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8_snorm.input.load.dont_care.clear_draw,Fail @@ -483,10 +479,8 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_uint dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8b8a8_unorm.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8_sint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_uint.input.dont_care.dont_care.clear_draw,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.fragment.combined_image_sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_snorm.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32_sfloat.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_spirv.image_2d_view_3d_image.fragment.sampler.mip2_layer15_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r32_sint.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_uint.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16_snorm.input.clear.dont_care.draw,Fail @@ -497,7 +491,6 @@ dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r8g8b8 dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32_sfloat.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16b16a16_uint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16_sfloat.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_spirv.image_2d_view_3d_image.fragment.sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r8g8b8a8_srgb.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16b16a16_uint.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16_sint.input.clear.dont_care.draw,Fail @@ -512,12 +505,10 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16_s dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_sint.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8g8_uint.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8g8b8a8_unorm.input.dont_care.dont_care.draw,Fail -dEQP-VK.pipeline.fast_linked_library.image_2d_view_3d_image.fragment.sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16b16a16_snorm.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.a8b8g8r8_snorm_pack32.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r32g32b32a32_uint.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.a8b8g8r8_unorm_pack32.input.clear.dont_care.draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_spirv.image_2d_view_3d_image.fragment.combined_image_sampler.mip0_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16_unorm.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16b16a16_uint.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16_sfloat.input.clear.dont_care.clear_draw,Fail @@ -525,8 +516,6 @@ dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r8_sno dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a8b8g8r8_sint_pack32.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.b8g8r8a8_unorm.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r8g8b8a8_uint.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.fragment.combined_image_sampler.mip2_layer0_sparse,Fail -dEQP-VK.pipeline.shader_object_unlinked_spirv.image_2d_view_3d_image.fragment.combined_image_sampler.mip2_layer0_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8_sint.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32_sfloat.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8_snorm.input.clear.dont_care.clear_draw,Fail @@ -545,7 +534,6 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32_sfloat.i dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.b8g8r8a8_srgb.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8g8_unorm.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8b8a8_uint.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.fragment.sampler.mip0_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a2b10g10r10_uint_pack32.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r8g8_unorm.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.a2r10g10b10_unorm_pack32.input.dont_care.dont_care.draw,Fail @@ -569,11 +557,9 @@ dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.b8g8r8 dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_sint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.a8b8g8r8_uint_pack32.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r8_sint.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_binary.image_2d_view_3d_image.fragment.combined_image_sampler.mip0_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a2b10g10r10_uint_pack32.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.a8b8g8r8_srgb_pack32.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16b16a16_uint.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.fast_linked_library.image_2d_view_3d_image.fragment.storage.mip2_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16b16a16_sfloat.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.b8g8r8a8_srgb.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8_uint.input.dont_care.dont_care.draw,Fail @@ -594,21 +580,16 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32_uint.input. dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32b32a32_sint.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_snorm.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.b8g8r8a8_unorm.input.clear.dont_care.draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_spirv.image_2d_view_3d_image.fragment.combined_image_sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8_uint.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32b32a32_sint.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8_uint.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16b16a16_sint.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_spirv.image_2d_view_3d_image.fragment.sampler.mip2_layer0_sparse,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.compute.storage.mip0_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r32_sfloat.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16_unorm.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16_unorm.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.compute.combined_image_sampler.mip0_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a2r10g10b10_unorm_pack32.input.dont_care.dont_care.draw,Fail nir-stress=dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32_uint.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16_uint.input.dont_care.dont_care.draw,Fail -dEQP-VK.pipeline.pipeline_library.image_2d_view_3d_image.fragment.combined_image_sampler.mip2_layer15_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8g8b8a8_sint.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8g8b8a8_unorm.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16_unorm.input.dont_care.dont_care.draw,Fail @@ -627,8 +608,6 @@ dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r32g32 nir-stress=dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.unused_attachment.loadopdontcare.storeopdontcare.stencilloadopdontcare.stencilstoreopdontcare,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.a8_unorm_khr.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.attachment_allocation.input_output_chain.21,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.fragment.combined_image_sampler.mip2_layer15_sparse,Fail -dEQP-VK.pipeline.shader_object_linked_spirv.image_2d_view_3d_image.fragment.sampler.mip2_layer0_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8_unorm.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a8b8g8r8_snorm_pack32.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8g8_snorm.input.clear.dont_care.clear_draw,Fail @@ -637,15 +616,12 @@ dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r32g32 dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8_unorm.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.a8b8g8r8_snorm_pack32.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32_uint.input.dont_care.dont_care.draw,Fail -dEQP-VK.pipeline.fast_linked_library.image_2d_view_3d_image.fragment.sampler.mip2_layer15_sparse,Fail -dEQP-VK.pipeline.fast_linked_library.image_2d_view_3d_image.fragment.storage.mip0_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r8g8_snorm.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r32g32_sfloat.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_uint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.a8b8g8r8_srgb_pack32.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16_sfloat.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_sint.input.dont_care.dont_care.draw,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.fragment.storage.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16_sfloat.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16b16a16_sint.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16_sint.input.clear.dont_care.clear_draw,Fail @@ -658,7 +634,6 @@ dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r32g32 dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8_uint.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16_snorm.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32b32a32_sfloat.input.load.dont_care.clear_draw,Fail -dEQP-VK.pipeline.shader_object_unlinked_binary.image_2d_view_3d_image.fragment.combined_image_sampler.mip2_layer0_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16_sfloat.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.a8b8g8r8_uint_pack32.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8g8_uint.input.dont_care.dont_care.clear_draw,Fail @@ -667,17 +642,14 @@ dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.a8b8g8 dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_sfloat.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r5g6b5_unorm_pack16.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8_sint.input.dont_care.dont_care.clear_draw,Fail -dEQP-VK.pipeline.pipeline_library.image_2d_view_3d_image.fragment.combined_image_sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32_sint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16_sint.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a8_unorm_khr.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.sparse_resources.image_block_shapes.2d_array.g8b8g8r8_422_unorm.samples_1,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16b16a16_sfloat.input.clear.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.a2b10g10r10_unorm_pack32.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.fast_linked_library.image_2d_view_3d_image.fragment.combined_image_sampler.mip2_layer15_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.attachment_allocation.input_output_chain.21,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r8_sint.input.clear.dont_care.draw,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.fragment.storage.mip2_layer0_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16b16a16_sfloat.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8_uint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16_sfloat.input.clear.dont_care.clear_draw,Fail @@ -685,12 +657,10 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8g8b8a8 dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r5g6b5_unorm_pack16.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r8_sint.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r16g16_snorm.input.clear.dont_care.draw,Fail -dEQP-VK.pipeline.shader_object_linked_binary.image_2d_view_3d_image.fragment.combined_image_sampler.mip0_layer63_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.a8b8g8r8_sint_pack32.input.dont_care.dont_care.draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16_sint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r16g16_uint.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8g8b8a8_srgb.input.clear.dont_care.draw,Fail -dEQP-VK.pipeline.shader_object_linked_spirv.image_2d_view_3d_image.fragment.storage.mip2_layer15_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.r16g16b16a16_sint.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8g8_snorm.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16b16a16_snorm.input.load.dont_care.clear_draw,Fail @@ -715,10 +685,8 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_unor dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16_sfloat.input.clear.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.r8_uint.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16b16a16_sfloat.input.clear.dont_care.clear_draw,Fail -dEQP-VK.pipeline.fast_linked_library.image_2d_view_3d_image.fragment.storage.mip2_layer15_sparse,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.formats.r16g16_uint.input.load.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.suballocation.formats.a8b8g8r8_sint_pack32.input.load.dont_care.clear_draw,Fail -dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.fragment.combined_image_sampler.mip0_layer0_sparse,Fail dEQP-VK.dynamic_rendering.graphics_pipeline_library.dedicated_allocation.formats.a8b8g8r8_uint_pack32.input.dont_care.dont_care.clear_draw,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment_allocation.input_output_chain.20,Fail dEQP-VK.dynamic_rendering.primary_cmd_buff.suballocation.formats.r32g32_uint.input.load.dont_care.clear_draw,Fail diff --git a/src/gallium/frontends/lavapipe/lvp_image.c b/src/gallium/frontends/lavapipe/lvp_image.c index 0522ed17f97..d60d47b11a1 100644 --- a/src/gallium/frontends/lavapipe/lvp_image.c +++ b/src/gallium/frontends/lavapipe/lvp_image.c @@ -362,6 +362,9 @@ lvp_create_imageview(const struct lvp_image_view *iv, VkFormat plane_format, uns } else { view.u.tex.first_layer = iv->vk.base_array_layer, view.u.tex.last_layer = iv->vk.base_array_layer + iv->vk.layer_count - 1; + + if (view.resource->target == PIPE_TEXTURE_3D) + view.u.tex.is_2d_view_of_3d = true; } view.u.tex.level = iv->vk.base_mip_level; return view;