Module: Mesa Branch: master Commit: 289aef771df79726b5463b2d6d22bb8531846ec1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=289aef771df79726b5463b2d6d22bb8531846ec1
Author: Lionel Landwerlin <[email protected]> Date: Sun Jan 29 02:46:12 2017 +0000 anv: move BaseVertexID/BaseInstanceID vertex buffer index to 31 v2: use define for buffer ID (Jason) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> --- src/intel/vulkan/anv_private.h | 2 ++ src/intel/vulkan/genX_cmd_buffer.c | 2 +- src/intel/vulkan/genX_pipeline.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 1cf33b7..9418a14 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -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 diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index b6b7f74..d3fc95e 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -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) diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index d3a9d43..318db20 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -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, _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
