v3dv: save and restore push constant state during meta operations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
committed by
Marge Bot
parent
441d3911b9
commit
5fc55e3a04
@@ -2841,6 +2841,13 @@ v3dv_cmd_buffer_meta_state_push(struct v3dv_cmd_buffer *cmd_buffer,
|
||||
memcpy(&state->meta.descriptor_state, &state->descriptor_state,
|
||||
sizeof(state->descriptor_state));
|
||||
}
|
||||
|
||||
/* FIXME: if we keep track of wether we have bound any push constant state
|
||||
* at all we could restruct this only to cases where it is actually
|
||||
* necessary.
|
||||
*/
|
||||
memcpy(state->meta.push_constants, cmd_buffer->push_constants_data,
|
||||
sizeof(state->meta.push_constants));
|
||||
}
|
||||
|
||||
/* This restores command buffer state after a meta operation
|
||||
@@ -2889,6 +2896,9 @@ v3dv_cmd_buffer_meta_state_pop(struct v3dv_cmd_buffer *cmd_buffer,
|
||||
state->descriptor_state.valid = 0;
|
||||
}
|
||||
|
||||
memcpy(cmd_buffer->push_constants_data, state->meta.push_constants,
|
||||
sizeof(state->meta.push_constants));
|
||||
|
||||
state->meta.pipeline = VK_NULL_HANDLE;
|
||||
state->meta.framebuffer = VK_NULL_HANDLE;
|
||||
state->meta.pass = VK_NULL_HANDLE;
|
||||
|
||||
@@ -770,6 +770,8 @@ struct v3dv_cmd_buffer_state {
|
||||
struct v3dv_dynamic_state dynamic;
|
||||
|
||||
struct v3dv_descriptor_state descriptor_state;
|
||||
|
||||
uint32_t push_constants[MAX_PUSH_CONSTANTS_SIZE / 4];
|
||||
} meta;
|
||||
|
||||
/* Command buffer state for queries */
|
||||
|
||||
Reference in New Issue
Block a user