iris: Use blob_write_uint32 for num_system_values
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 11 Aug 2020 15:04:28 +0000 (10:04 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 12 Aug 2020 10:11:06 +0000 (10:11 +0000)
We read it with blob_read_uint32; we should write it as uint32 as well.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280>

src/gallium/drivers/iris/iris_disk_cache.c

index f03860f263bd72db4b0ae567c332f7cd3829c117..f55a83487a7b76e0facb732fa8aee45c096c0129 100644 (file)
@@ -111,7 +111,7 @@ iris_disk_cache_store(struct disk_cache *cache,
     */
    blob_write_bytes(&blob, shader->prog_data, brw_prog_data_size(stage));
    blob_write_bytes(&blob, shader->map, shader->prog_data->program_size);
-   blob_write_bytes(&blob, &shader->num_system_values, sizeof(unsigned));
+   blob_write_uint32(&blob, shader->num_system_values);
    blob_write_bytes(&blob, shader->system_values,
                     shader->num_system_values * sizeof(enum brw_param_builtin));
    blob_write_bytes(&blob, prog_data->param,