i965/gen6: Add a spec citation about push constant packet requirements.
authorEric Anholt <eric@anholt.net>
Wed, 21 May 2014 21:31:31 +0000 (14:31 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 2 Jul 2014 19:45:59 +0000 (12:45 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen6_wm_state.c

index db0e3aaaef7c809f20c89f95aef651246855d1dd..047e036f5b66641ca8c3cf750244d9993ad57dab 100644 (file)
@@ -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);