[Mesa-dev] [PATCH 27/27] i965: Enable push constants for UBOs

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Tue Apr 28 13:08:24 PDT 2015


Switches on push constants whenever we have UBO entries.

Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/drivers/dri/i965/gen7_wm_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c
index 923414e..1dfe697 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c
@@ -152,7 +152,7 @@ upload_ps_state(struct brw_context *brw)
 
    dw4 |= (brw->max_wm_threads - 1) << max_threads_shift;
 
-   if (prog_data->base.nr_params > 0)
+   if (prog_data->base.nr_params > 0 || prog_data->base.nr_ubo_params > 0)
       dw4 |= GEN7_PS_PUSH_CONSTANT_ENABLE;
 
    /* From the IVB PRM, volume 2 part 1, page 287:
-- 
1.9.1



More information about the mesa-dev mailing list