Skip to content
Snippets Groups Projects
Commit 1d40d53e authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Marge Bot
Browse files

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: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: default avatarRohan Garg <rohan.garg@intel.com>
Part-of: <mesa/mesa!14418>
parent 8685a505
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment