diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/common/gen_urb_config.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/intel/common/gen_urb_config.c b/src/intel/common/gen_urb_config.c index 0b632149cd9..1440dd713e9 100644 --- a/src/intel/common/gen_urb_config.c +++ b/src/intel/common/gen_urb_config.c @@ -195,8 +195,14 @@ gen_get_urb_config(const struct gen_device_info *devinfo, } /* Lay out the URB in pipeline order: push constants, VS, HS, DS, GS. */ - start[0] = push_constant_chunks; - for (int i = MESA_SHADER_TESS_CTRL; i <= MESA_SHADER_GEOMETRY; i++) { - start[i] = start[i - 1] + chunks[i - 1]; + int next = push_constant_chunks; + for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) { + if (entries[i]) { + start[i] = next; + next += chunks[i]; + } else { + /* Just put disabled stages at the beginning. */ + start[i] = 0; + } } } |