summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2024-03-11 15:15:09 -0400
committerMarge Bot <emma+marge@anholt.net>2024-03-12 20:39:56 +0000
commitc85768e3804d2e6a9ee3a0f33e31f31530ecea0c (patch)
treeb6d36af0e60b07de0b781b0dc818fb50ff948214
parent8fa413fef05ceaf4e811d2c564e766431c1d6701 (diff)
zink: delete faked_e5sparse
this never actually worked, and I'm not sure why I added it from testing Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
-rw-r--r--src/gallium/drivers/zink/zink_bo.c3
-rw-r--r--src/gallium/drivers/zink/zink_resource.c4
-rw-r--r--src/gallium/drivers/zink/zink_screen.c7
-rw-r--r--src/gallium/drivers/zink/zink_types.h1
4 files changed, 1 insertions, 14 deletions
diff --git a/src/gallium/drivers/zink/zink_bo.c b/src/gallium/drivers/zink/zink_bo.c
index be23cc6343e..97fbae6de0d 100644
--- a/src/gallium/drivers/zink/zink_bo.c
+++ b/src/gallium/drivers/zink/zink_bo.c
@@ -970,9 +970,6 @@ zink_bo_commit(struct zink_context *ctx, struct zink_resource *res, unsigned lev
struct zink_bo *bo = res->obj->bo;
VkSemaphore cur_sem = VK_NULL_HANDLE;
- if (screen->faked_e5sparse && res->base.b.format == PIPE_FORMAT_R9G9B9E5_FLOAT)
- return true;
-
simple_mtx_lock(&screen->queue_lock);
simple_mtx_lock(&bo->lock);
if (res->base.b.target == PIPE_BUFFER) {
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index dcd4f1359bd..f2d8f667c74 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -1590,10 +1590,6 @@ resource_create(struct pipe_screen *pscreen,
if (templ2.flags & PIPE_RESOURCE_FLAG_SPARSE &&
(util_res_sample_count(templ) == 1 || screen->info.feats.features.shaderStorageImageMultisample))
templ2.bind |= PIPE_BIND_SHADER_IMAGE;
- if (screen->faked_e5sparse && templ->format == PIPE_FORMAT_R9G9B9E5_FLOAT) {
- templ2.flags &= ~PIPE_RESOURCE_FLAG_SPARSE;
- res->base.b.flags &= ~PIPE_RESOURCE_FLAG_SPARSE;
- }
res->obj = resource_object_create(screen, &templ2, whandle, &linear, res->modifiers, res->modifiers_count, loader_private, user_mem);
if (!res->obj) {
free(res->modifiers);
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 48462d7dc8e..495c835d1c2 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -2663,13 +2663,8 @@ zink_get_sparse_texture_virtual_page_size(struct pipe_screen *pscreen,
flags,
VK_IMAGE_TILING_OPTIMAL,
&prop_count, props);
- if (!prop_count) {
- if (pformat == PIPE_FORMAT_R9G9B9E5_FLOAT) {
- screen->faked_e5sparse = true;
- goto hack_it_up;
- }
+ if (!prop_count)
return 0;
- }
}
if (size) {
diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h
index 739838d0dce..3d8f6a58ed0 100644
--- a/src/gallium/drivers/zink/zink_types.h
+++ b/src/gallium/drivers/zink/zink_types.h
@@ -1499,7 +1499,6 @@ struct zink_screen {
bool need_decompose_attrs;
bool need_2D_zs;
bool need_2D_sparse;
- bool faked_e5sparse; //drivers may not expose R9G9B9E5 but cts requires it
bool can_hic_shader_read;
uint32_t gfx_queue;