OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbc3eb5
)
spirv: Use VERTEX_ID_ZERO_BASE for vertex id
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 28 Aug 2015 23:08:29 +0000
(16:08 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 28 Aug 2015 23:08:29 +0000
(16:08 -0700)
src/glsl/nir/spirv_to_nir.c
patch
|
blob
|
history
diff --git
a/src/glsl/nir/spirv_to_nir.c
b/src/glsl/nir/spirv_to_nir.c
index
b09196c
..
3cbaf3c
100644
(file)
--- a/
src/glsl/nir/spirv_to_nir.c
+++ b/
src/glsl/nir/spirv_to_nir.c
@@
-644,7
+644,10
@@
vtn_get_builtin_location(SpvBuiltIn builtin, int *location,
/* XXX figure this out */
unreachable("unhandled builtin");
case SpvBuiltInVertexId:
- *location = SYSTEM_VALUE_VERTEX_ID;
+ /* Vulkan defines VertexID to be zero-based and reserves the new
+ * builtin keyword VertexIndex to indicate the non-zero-based value.
+ */
+ *location = SYSTEM_VALUE_VERTEX_ID_ZERO_BASE;
*mode = nir_var_system_value;
break;
case SpvBuiltInInstanceId: