diff options
author | Keith Whitwell <[email protected]> | 2007-08-09 11:19:09 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2007-08-09 11:23:18 +0100 |
commit | 93b6e8aeac8ee410ee49cecd28a785efe5c2b1e3 (patch) | |
tree | fb9337f90642b43759d070e0abf99a096c9676a5 | |
parent | c046174eb047c95e25f31390019f04f310ae2b8e (diff) |
Tweaks to state emit, acheives first hw triangles from a pipe driver.
-rw-r--r-- | src/mesa/pipe/i915simple/Makefile | 1 | ||||
-rw-r--r-- | src/mesa/pipe/i915simple/i915_batch.h | 2 | ||||
-rw-r--r-- | src/mesa/pipe/i915simple/i915_state_emit.c | 24 | ||||
-rw-r--r-- | src/mesa/pipe/i915simple/i915_state_fragprog.c | 2 |
4 files changed, 20 insertions, 9 deletions
diff --git a/src/mesa/pipe/i915simple/Makefile b/src/mesa/pipe/i915simple/Makefile index f8b14220fbc..93d9c6cf012 100644 --- a/src/mesa/pipe/i915simple/Makefile +++ b/src/mesa/pipe/i915simple/Makefile @@ -12,6 +12,7 @@ DRIVER_SOURCES = \ i915_context.c \ i915_context.c \ i915_debug.c \ + i915_debug_fp.c \ i915_regions.c \ i915_state.c \ i915_state_derived.c \ diff --git a/src/mesa/pipe/i915simple/i915_batch.h b/src/mesa/pipe/i915simple/i915_batch.h index b4ca8c38da7..8a35ff6a3aa 100644 --- a/src/mesa/pipe/i915simple/i915_batch.h +++ b/src/mesa/pipe/i915simple/i915_batch.h @@ -45,7 +45,7 @@ #define ADVANCE_BATCH() #define FLUSH_BATCH() do { \ -/* i915_dump_batchbuffer( i915, i915->batch_start, BEGIN_BATCH(0, 0) ); */ \ + i915_dump_batchbuffer( i915, i915->batch_start, BEGIN_BATCH(0, 0) ); \ i915->winsys->batch_flush( i915->winsys ); \ i915->batch_start = BEGIN_BATCH(0, 0); \ } while (0) diff --git a/src/mesa/pipe/i915simple/i915_state_emit.c b/src/mesa/pipe/i915simple/i915_state_emit.c index 4aa7e28a867..aeb2d6753f2 100644 --- a/src/mesa/pipe/i915simple/i915_state_emit.c +++ b/src/mesa/pipe/i915simple/i915_state_emit.c @@ -112,7 +112,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) /* Need to initialize this to zero. */ { - OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | (1)); + OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | (0)); OUT_BATCH(0); } @@ -138,6 +138,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) { /* Don't support twosided stencil yet */ OUT_BATCH(_3DSTATE_BACKFACE_STENCIL_OPS | BFO_ENABLE_STENCIL_TWO_SIDE | 0); + OUT_BATCH(0); } @@ -150,11 +151,10 @@ i915_emit_hardware_state(struct i915_context *i915 ) I1_LOAD_S(6) | (3)); - OUT_BATCH(0); - OUT_BATCH(S4_VFMT_XYZ | S4_VFMT_COLOR); - OUT_BATCH(0); - OUT_BATCH(S6_COLOR_WRITE_ENABLE | - (2 << S6_TRISTRIP_PV_SHIFT)); + OUT_BATCH(0xffffffff); + OUT_BATCH(0x00902440); // OUT_BATCH(S4_VFMT_XYZ | S4_VFMT_COLOR); + OUT_BATCH(0x00000002); + OUT_BATCH(0x00020216); // OUT_BATCH( S6_COLOR_WRITE_ENABLE | (2 << S6_TRISTRIP_PV_SHIFT)); } { @@ -167,7 +167,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) STENCIL_WRITE_MASK(0xff)); } - { + if (0) { OUT_BATCH(_3DSTATE_INDEPENDENT_ALPHA_BLEND_CMD | IAB_MODIFY_ENABLE | IAB_MODIFY_FUNC | @@ -175,6 +175,16 @@ i915_emit_hardware_state(struct i915_context *i915 ) IAB_MODIFY_DST_FACTOR); } + { + //3DSTATE_INDEPENDENT_ALPHA_BLEND (1 dwords): + OUT_BATCH(0x6ba008a1); + + //3DSTATE_CONSTANT_BLEND_COLOR (2 dwords): + OUT_BATCH(0x7d880000); + OUT_BATCH(0x00000000); + } + + if (i915->framebuffer.cbufs[0]) { struct pipe_region *cbuf_region = i915->framebuffer.cbufs[0]->region; diff --git a/src/mesa/pipe/i915simple/i915_state_fragprog.c b/src/mesa/pipe/i915simple/i915_state_fragprog.c index e4639bc2237..83f43befafa 100644 --- a/src/mesa/pipe/i915simple/i915_state_fragprog.c +++ b/src/mesa/pipe/i915simple/i915_state_fragprog.c @@ -50,7 +50,7 @@ static unsigned passthrough[] = A0_DEST_CHANNEL_ALL | (REG_TYPE_T << A0_SRC0_TYPE_SHIFT) | (T_DIFFUSE << A0_SRC0_NR_SHIFT)), - 0, + 0x01230000, /* .xyzw */ 0 }; |