mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-25 03:58:19 +02:00
nir/serialize: restore ray query variables
The ray query status of a variable is tracked in the nir_variable::data. We need to store it in the serialization otherwise restoring NIR from a cache will drop the annotation. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes:5a9cdab170("nir: track variables representing ray queries") Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16059> (cherry picked from commita4c5521ea9)
This commit is contained in:
parent
95d522f475
commit
6da016cded
2 changed files with 6 additions and 2 deletions
|
|
@ -841,7 +841,7 @@
|
|||
"description": "nir/serialize: restore ray query variables",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "5a9cdab170502039bf0330c42295decbfdfa4c6f"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ union packed_var {
|
|||
unsigned data_encoding:2;
|
||||
unsigned type_same_as_last:1;
|
||||
unsigned interface_type_same_as_last:1;
|
||||
unsigned _pad:1;
|
||||
unsigned ray_query:1;
|
||||
unsigned num_members:16;
|
||||
} u;
|
||||
};
|
||||
|
|
@ -284,6 +284,8 @@ write_variable(write_ctx *ctx, const nir_variable *var)
|
|||
flags.u.data_encoding = var_encode_full;
|
||||
}
|
||||
|
||||
flags.u.ray_query = var->data.ray_query;
|
||||
|
||||
blob_write_uint32(ctx->blob, flags.u32);
|
||||
|
||||
if (!flags.u.type_same_as_last) {
|
||||
|
|
@ -385,6 +387,8 @@ read_variable(read_ctx *ctx)
|
|||
ctx->last_var_data = var->data;
|
||||
}
|
||||
|
||||
var->data.ray_query = flags.u.ray_query;
|
||||
|
||||
var->num_state_slots = flags.u.num_state_slots;
|
||||
if (var->num_state_slots != 0) {
|
||||
var->state_slots = ralloc_array(var, nir_state_slot,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue