lavapipe: stop storing texture handle for samplers

this is never used

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
This commit is contained in:
Mike Blumenkrantz 2024-10-24 11:09:24 -04:00 committed by Marge Bot
parent 15e23f3781
commit caf50d6723
2 changed files with 3 additions and 8 deletions

View file

@ -2532,11 +2532,12 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateSampler(
memcpy(&state.border_color, &border_color, sizeof(border_color));
simple_mtx_lock(&device->queue.lock);
sampler->texture_handle = (void *)(uintptr_t)device->queue.ctx->create_texture_handle(device->queue.ctx, NULL, &state);
struct lp_texture_handle *texture_handle = (void *)(uintptr_t)device->queue.ctx->create_texture_handle(device->queue.ctx, NULL, &state);
sampler->desc.texture.sampler_index = texture_handle->sampler_index;
device->queue.ctx->delete_texture_handle(device->queue.ctx, (uint64_t)(uintptr_t)texture_handle);
simple_mtx_unlock(&device->queue.lock);
lp_jit_sampler_from_pipe(&sampler->desc.sampler, &state);
sampler->desc.texture.sampler_index = sampler->texture_handle->sampler_index;
*pSampler = lvp_sampler_to_handle(sampler);
@ -2554,10 +2555,6 @@ VKAPI_ATTR void VKAPI_CALL lvp_DestroySampler(
if (!_sampler)
return;
simple_mtx_lock(&device->queue.lock);
device->queue.ctx->delete_texture_handle(device->queue.ctx, (uint64_t)(uintptr_t)sampler->texture_handle);
simple_mtx_unlock(&device->queue.lock);
vk_sampler_destroy(&device->vk, pAllocator, &sampler->vk);
}

View file

@ -312,8 +312,6 @@ struct lvp_image_view {
struct lvp_sampler {
struct vk_sampler vk;
struct lp_descriptor desc;
struct lp_texture_handle *texture_handle;
};
struct lvp_descriptor_set_binding_layout {