radv: unconditionally store the binary code in radv_shader

We will (temporarily) use it to serialize shader binaries
with the common vk_pipeline_cache.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
This commit is contained in:
Daniel Schürmann
2023-03-31 16:08:59 +02:00
committed by Marge Bot
parent 5303a57964
commit efbf0e70eb
2 changed files with 4 additions and 8 deletions
+4 -6
View File
@@ -1696,12 +1696,10 @@ static bool
radv_shader_binary_upload(struct radv_device *device, const struct radv_shader_binary *binary,
struct radv_shader *shader, void *dest_ptr)
{
if (device->thread_trace.bo) {
shader->code = calloc(shader->code_size, 1);
if (!shader->code) {
radv_shader_unref(device, shader);
return false;
}
shader->code = calloc(shader->code_size, 1);
if (!shader->code) {
radv_shader_unref(device, shader);
return false;
}
if (binary->type == RADV_BINARY_TYPE_RTLD) {
-2
View File
@@ -517,8 +517,6 @@ struct radv_shader {
struct radv_shader_info info;
uint8_t sha1[SHA1_DIGEST_LENGTH];
/* sqtt only */
void *code;
/* debug only */