iris: rzalloc iris_compiled_shader so memcmp works even if padding creeps in
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 16 Jun 2018 17:15:24 +0000 (10:15 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_program_cache.c

index 2e9846df73273bf754458b3fa0b91ea4164cf5d4..8a55dc91cc7c559fe96e027e696ac5ae375c3fd2 100644 (file)
@@ -215,8 +215,8 @@ iris_upload_shader(struct iris_context *ice,
    struct gen_device_info *devinfo = &screen->devinfo;
    struct hash_table *cache = ice->shaders.cache;
    struct iris_compiled_shader *shader =
-      ralloc_size(cache, sizeof(struct iris_compiled_shader) +
-                  ice->vtbl.derived_program_state_size(cache_id));
+      rzalloc_size(cache, sizeof(struct iris_compiled_shader) +
+                   ice->vtbl.derived_program_state_size(cache_id));
    const struct iris_compiled_shader *existing =
       find_existing_assembly(cache, assembly, prog_data->program_size);