mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
anv: don't leave anv_batch fields undefined
Because the extend_cb vfunc is not initialized, there is a risk that the emission code calls into a random pointer. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Rohan Garg <rohan.garg@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14418>
This commit is contained in:
parent
8685a505e7
commit
1d40d53e03
1 changed files with 5 additions and 4 deletions
|
|
@ -159,11 +159,12 @@ static VkResult
|
|||
init_render_queue_state(struct anv_queue *queue)
|
||||
{
|
||||
struct anv_device *device = queue->device;
|
||||
struct anv_batch batch;
|
||||
|
||||
uint32_t cmds[64];
|
||||
batch.start = batch.next = cmds;
|
||||
batch.end = (void *) cmds + sizeof(cmds);
|
||||
struct anv_batch batch = {
|
||||
.start = cmds,
|
||||
.next = cmds,
|
||||
.end = (void *) cmds + sizeof(cmds),
|
||||
};
|
||||
|
||||
anv_batch_emit(&batch, GENX(PIPELINE_SELECT), ps) {
|
||||
#if GFX_VER >= 9
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue