llvmpipe: memset empty images in the key
This fixes a bunch of valgrind warnings in dEQP-VK.pipeline.pipeline_library.descriptor_limits.fragment_shader.storage_images_63 Cc: mesa-stable Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
This commit is contained in:
@@ -649,6 +649,9 @@ make_variant_key(struct llvmpipe_context *lp,
|
||||
struct lp_image_static_state *lp_image;
|
||||
lp_image = lp_cs_variant_key_images(key);
|
||||
key->nr_images = shader->info.base.file_max[TGSI_FILE_IMAGE] + 1;
|
||||
if (key->nr_images)
|
||||
memset(lp_image, 0,
|
||||
key->nr_images * sizeof *lp_image);
|
||||
for (i = 0; i < key->nr_images; ++i) {
|
||||
if (shader->info.base.file_mask[TGSI_FILE_IMAGE] & (1 << i)) {
|
||||
lp_sampler_static_texture_state_image(&lp_image[i].image_state,
|
||||
|
@@ -4510,6 +4510,10 @@ make_variant_key(struct llvmpipe_context *lp,
|
||||
|
||||
struct lp_image_static_state *lp_image = lp_fs_variant_key_images(key);
|
||||
key->nr_images = shader->info.base.file_max[TGSI_FILE_IMAGE] + 1;
|
||||
|
||||
if (key->nr_images)
|
||||
memset(lp_image, 0,
|
||||
key->nr_images * sizeof *lp_image);
|
||||
for (unsigned i = 0; i < key->nr_images; ++i) {
|
||||
if (shader->info.base.file_mask[TGSI_FILE_IMAGE] & (1 << i)) {
|
||||
lp_sampler_static_texture_state_image(&lp_image[i].image_state,
|
||||
|
Reference in New Issue
Block a user