diff options
author | Jason Ekstrand <[email protected]> | 2016-02-29 14:13:07 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-02-29 14:36:24 -0800 |
commit | 6986ae35adbd83ff4f3c84946e998db488416b72 (patch) | |
tree | cd388eca7f40ec264f0213b8b43a9eeb32084bee | |
parent | 51b618285d846295ef90fa49364d39eea4843801 (diff) |
anv/pipeline: Avoid a division by zero
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index df265842ccc..cbd3a21abd7 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -894,7 +894,7 @@ gen7_compute_urb_partition(struct anv_pipeline *pipeline) const unsigned stages = _mesa_bitcount(pipeline->active_stages & VK_SHADER_STAGE_ALL_GRAPHICS); - const unsigned size_per_stage = push_constant_kb / stages; + const unsigned size_per_stage = stages ? (push_constant_kb / stages) : 0; unsigned used_kb = 0; for (int i = MESA_SHADER_VERTEX; i < MESA_SHADER_FRAGMENT; i++) { |