[Mesa-dev] [PATCH] radv: Fix resolve shader creation memory leak.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Wed May 10 23:28:58 UTC 2017
We processed fs key 3 multiple times, resulting in overwriting the
pointer in the meta struct and hence only freeing one of them.
Fixes: 69136f4e633 "radv/meta: add resolve pass using fragment/vertex shaders"
Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
---
src/amd/vulkan/radv_meta_resolve_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_meta_resolve_fs.c b/src/amd/vulkan/radv_meta_resolve_fs.c
index e583808b2d1..d5fb39a0a80 100644
--- a/src/amd/vulkan/radv_meta_resolve_fs.c
+++ b/src/amd/vulkan/radv_meta_resolve_fs.c
@@ -176,7 +176,6 @@ static VkFormat pipeline_formats[] = {
VK_FORMAT_R8G8B8A8_UNORM,
VK_FORMAT_R8G8B8A8_UINT,
VK_FORMAT_R8G8B8A8_SINT,
- VK_FORMAT_R8G8B8A8_SRGB,
VK_FORMAT_R16G16B16A16_UNORM,
VK_FORMAT_R16G16B16A16_SNORM,
VK_FORMAT_R16G16B16A16_UINT,
@@ -202,6 +201,7 @@ create_resolve_pipeline(struct radv_device *device,
else if (vk_format_is_srgb(format))
is_srgb = true;
+ assert(!device->meta_state.resolve_fragment.rc[samples_log2].render_pass[fs_key]);
struct radv_shader_module fs = { .nir = NULL };
fs.nir = build_resolve_fragment_shader(device, is_integer, is_srgb, samples);
struct radv_shader_module vs = {
--
2.12.2
More information about the mesa-dev
mailing list