anv: move BaseVertexID/BaseInstanceID vertex buffer index to 31
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sun, 29 Jan 2017 02:46:12 +0000 (02:46 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 2 Feb 2017 01:32:48 +0000 (01:32 +0000)
v2: use define for buffer ID (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c
src/intel/vulkan/genX_pipeline.c

index 1cf33b76c64a8fde1b6e0d6907244c2899c043a3..9418a1447077e02e9bbec343bffdf80eaa209d76 100644 (file)
@@ -96,6 +96,8 @@ extern "C" {
 #define MAX_DYNAMIC_BUFFERS 16
 #define MAX_IMAGES 8
 
+#define ANV_SVGS_VB_INDEX    MAX_VBS
+
 #define anv_printflike(a, b) __attribute__((__format__(__printf__, a, b)))
 
 static inline uint32_t
index b6b7f7475ce6575f7db3e131cfaabc37d79187d2..d3fc95ea185db4d02d6bf41902c3c7249492f2e5 100644 (file)
@@ -1595,7 +1595,7 @@ emit_base_vertex_instance_bo(struct anv_cmd_buffer *cmd_buffer,
 
    GENX(VERTEX_BUFFER_STATE_pack)(&cmd_buffer->batch, p + 1,
       &(struct GENX(VERTEX_BUFFER_STATE)) {
-         .VertexBufferIndex = 32, /* Reserved for this */
+         .VertexBufferIndex = ANV_SVGS_VB_INDEX, /* Reserved for this */
          .AddressModifyEnable = true,
          .BufferPitch = 0,
 #if (GEN_GEN >= 8)
index d3a9d4302e54f38f05920e12b31723e3a81c4176..318db20581d9b935a2bb239a0b80594690e3f6ad 100644 (file)
@@ -187,7 +187,7 @@ emit_vertex_input(struct anv_pipeline *pipeline,
                            VFCOMP_STORE_SRC : VFCOMP_STORE_0;
 
       struct GENX(VERTEX_ELEMENT_STATE) element = {
-         .VertexBufferIndex = 32, /* Reserved for this */
+         .VertexBufferIndex = ANV_SVGS_VB_INDEX,
          .Valid = true,
          .SourceElementFormat = ISL_FORMAT_R32G32_UINT,
          .Component0Control = base_ctrl,