projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5644b1c
)
anv: Mask out invalid stages in foreach_stage
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 23 Dec 2015 19:24:23 +0000
(11:24 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 23 Dec 2015 21:49:56 +0000
(13:49 -0800)
src/vulkan/anv_private.h
patch
|
blob
|
history
diff --git
a/src/vulkan/anv_private.h
b/src/vulkan/anv_private.h
index b632f6e85a989376d50ee86eb9421af962ff0a9a..6bd1895249287317f1b90671083a678fc3e838b8 100644
(file)
--- a/
src/vulkan/anv_private.h
+++ b/
src/vulkan/anv_private.h
@@
-1235,8
+1235,11
@@
mesa_to_vk_shader_stage(gl_shader_stage mesa_stage)
return (1 << mesa_stage);
}
+#define ANV_STAGE_MASK ((1 << MESA_SHADER_STAGES) - 1)
+
#define anv_foreach_stage(stage, stage_bits) \
- for (gl_shader_stage stage, __tmp = (gl_shader_stage)(stage_bits);\
+ for (gl_shader_stage stage, \
+ __tmp = (gl_shader_stage)((stage_bits) & ANV_STAGE_MASK); \
stage = __builtin_ffs(__tmp) - 1, __tmp; \
__tmp &= ~(1 << (stage)))