mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
iris: Also properly restore INTERFACE_DESCRIPTOR_DATA buffer object
We were at least cleaning up this reference, but we were failing to pin it in iris_restore_compute_saved_bos.
This commit is contained in:
parent
340df53d6a
commit
d6683e118f
2 changed files with 10 additions and 4 deletions
|
|
@ -713,6 +713,7 @@ struct iris_context {
|
|||
struct pipe_resource *blend;
|
||||
struct pipe_resource *index_buffer;
|
||||
struct pipe_resource *cs_thread_ids;
|
||||
struct pipe_resource *cs_desc;
|
||||
} last_res;
|
||||
|
||||
/** Records the size of variable-length state for INTEL_DEBUG=bat */
|
||||
|
|
|
|||
|
|
@ -4362,6 +4362,13 @@ iris_restore_compute_saved_bos(struct iris_context *ice,
|
|||
if (sampler_res)
|
||||
iris_use_pinned_bo(batch, iris_resource_bo(sampler_res), false);
|
||||
|
||||
if ((clean & IRIS_DIRTY_SAMPLER_STATES_CS) &&
|
||||
(clean & IRIS_DIRTY_BINDINGS_CS) &&
|
||||
(clean & IRIS_DIRTY_CONSTANTS_CS) &&
|
||||
(clean & IRIS_DIRTY_CS)) {
|
||||
iris_use_optional_res(batch, ice->state.last_res.cs_desc, false);
|
||||
}
|
||||
|
||||
if (clean & IRIS_DIRTY_CS) {
|
||||
struct iris_compiled_shader *shader = ice->shaders.prog[stage];
|
||||
|
||||
|
|
@ -5531,7 +5538,6 @@ iris_upload_compute_state(struct iris_context *ice,
|
|||
IRIS_DIRTY_BINDINGS_CS |
|
||||
IRIS_DIRTY_CONSTANTS_CS |
|
||||
IRIS_DIRTY_CS)) {
|
||||
struct pipe_resource *desc_res = NULL;
|
||||
uint32_t desc[GENX(INTERFACE_DESCRIPTOR_DATA_length)];
|
||||
|
||||
iris_pack_state(GENX(INTERFACE_DESCRIPTOR_DATA), desc, idd) {
|
||||
|
|
@ -5547,10 +5553,8 @@ iris_upload_compute_state(struct iris_context *ice,
|
|||
GENX(INTERFACE_DESCRIPTOR_DATA_length) * sizeof(uint32_t);
|
||||
load.InterfaceDescriptorDataStartAddress =
|
||||
emit_state(batch, ice->state.dynamic_uploader,
|
||||
&desc_res, desc, sizeof(desc), 64);
|
||||
&ice->state.last_res.cs_desc, desc, sizeof(desc), 64);
|
||||
}
|
||||
|
||||
pipe_resource_reference(&desc_res, NULL);
|
||||
}
|
||||
|
||||
uint32_t group_size = grid->block[0] * grid->block[1] * grid->block[2];
|
||||
|
|
@ -5658,6 +5662,7 @@ iris_destroy_state(struct iris_context *ice)
|
|||
pipe_resource_reference(&ice->state.last_res.blend, NULL);
|
||||
pipe_resource_reference(&ice->state.last_res.index_buffer, NULL);
|
||||
pipe_resource_reference(&ice->state.last_res.cs_thread_ids, NULL);
|
||||
pipe_resource_reference(&ice->state.last_res.cs_desc, NULL);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue