[Mesa-dev] [PATCH 11/11] i965/gen6: Add a spec citation about push constant packet requirements.

Eric Anholt eric at anholt.net
Wed May 21 15:04:32 PDT 2014


---
 src/mesa/drivers/dri/i965/gen6_wm_state.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index db0e3aa..047e036 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -76,7 +76,14 @@ upload_wm_state(struct brw_context *brw)
    /* _NEW_BUFFERS */
    bool multisampled_fbo = ctx->DrawBuffer->Visual.samples > 1;
 
-    /* CACHE_NEW_WM_PROG */
+   /* CACHE_NEW_WM_PROG
+    *
+    * We can't fold this into gen6_upload_wm_push_constants(), because
+    * according to the SNB PRM, vol 2 part 1 section 7.2.2
+    * (3DSTATE_CONSTANT_PS [DevSNB]):
+    *
+    *     "[DevSNB]: This packet must be followed by WM_STATE."
+    */
    if (brw->wm.prog_data->base.nr_params == 0) {
       /* Disable the push constant buffers. */
       BEGIN_BATCH(5);
-- 
2.0.0.rc2



More information about the mesa-dev mailing list