From 1024a66fc4ff34a03ecfdf3ec053cb874fb206fe Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 22 Feb 2016 15:23:06 -0800 Subject: anv: Emit 3DSTATE_URB_* via a loop. Rather than keeping separate {vs,hs,ds,gs}_start fields, we now store an array indexed by the shader stage (MESA_SHADER_*). The 3DSTATE_URB_* commands are also sequentially numbered. This makes it easy to just emit them in a loop. This simplifies the code a little, and also will make it easier to add more credible HS and DS code later. --- src/intel/vulkan/anv_private.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/intel/vulkan/anv_private.h') diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index b1b4d265b89..3e3cbf09a68 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1410,12 +1410,9 @@ struct anv_pipeline { uint32_t scratch_start[MESA_SHADER_STAGES]; uint32_t total_scratch; struct { - uint32_t vs_start; - uint32_t vs_size; - uint32_t nr_vs_entries; - uint32_t gs_start; - uint32_t gs_size; - uint32_t nr_gs_entries; + uint32_t start[MESA_SHADER_GEOMETRY + 1]; + uint32_t size[MESA_SHADER_GEOMETRY + 1]; + uint32_t entries[MESA_SHADER_GEOMETRY + 1]; } urb; VkShaderStageFlags active_stages; -- cgit v1.2.3