Mesa (master): i965: Store the dispatch width in the WM compile struct.

Eric Anholt anholt at kemper.freedesktop.org
Wed Aug 12 19:51:26 UTC 2009


Module: Mesa
Branch: master
Commit: 0eb819a2d175cab139f8c672b6d44148b2c99a4e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0eb819a2d175cab139f8c672b6d44148b2c99a4e

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Aug 11 16:02:54 2009 -0700

i965: Store the dispatch width in the WM compile struct.

I'll be using this in merging brw_wm_emit.c and brw_wm_glsl.c

---

 src/mesa/drivers/dri/i965/brw_wm.c |    2 ++
 src/mesa/drivers/dri/i965/brw_wm.h |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index d381add..ce8d0a4 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -171,9 +171,11 @@ static void do_wm_prog( struct brw_context *brw,
     * differently from "simple" shaders.
     */
    if (fp->isGLSL) {
+      c->dispatch_width = 8;
       brw_wm_glsl_emit(brw, c);
    }
    else {
+      c->dispatch_width = 16;
       brw_wm_non_glsl_emit(brw, c);
    }
 
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 7a46b1d..972c257 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -260,6 +260,7 @@ struct brw_wm_compile {
    GLuint tmp_index;
    GLuint tmp_max;
    GLuint subroutines[BRW_WM_MAX_SUBROUTINE];
+   GLuint dispatch_width;
 
    /** we may need up to 3 constants per instruction (if use_const_buffer) */
    struct {




More information about the mesa-commit mailing list