summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_state_emit.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-08-08 12:28:21 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-08 12:30:27 +0100
commit715acc7622255f7cc99d632c57aac14af4bac89a (patch)
tree69fb9946c5e434c8796b95089a0761ea23148e3b /src/mesa/pipe/i915simple/i915_state_emit.c
parentcf3fb4e3ef16ec1ab08fdbe418afe15c48df73fc (diff)
The i915simple driver now runs well enough to lock up hardware.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state_emit.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_state_emit.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state_emit.c b/src/mesa/pipe/i915simple/i915_state_emit.c
index c0539daa6e..4aa7e28a86 100644
--- a/src/mesa/pipe/i915simple/i915_state_emit.c
+++ b/src/mesa/pipe/i915simple/i915_state_emit.c
@@ -42,7 +42,7 @@
static unsigned translate_format( unsigned format )
{
switch (format) {
- case PIPE_FORMAT_U_R8_G8_B8_A8:
+ case PIPE_FORMAT_U_A8_R8_G8_B8:
return COLOR_BUF_ARGB8888;
case PIPE_FORMAT_U_R5_G6_B5:
return COLOR_BUF_RGB565;
@@ -212,8 +212,11 @@ i915_emit_hardware_state(struct i915_context *i915 )
{
- unsigned cformat = i915->framebuffer.cbufs[0]->format;
- unsigned zformat = i915->framebuffer.zbuf->format;
+ unsigned cformat = translate_format( i915->framebuffer.cbufs[0]->format );
+ unsigned zformat = 0;
+
+ if (i915->framebuffer.zbuf)
+ zformat = translate_depth_format( i915->framebuffer.zbuf->format );
OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
@@ -221,8 +224,8 @@ i915_emit_hardware_state(struct i915_context *i915 )
DSTORG_VERT_BIAS(0x8) | /* .5 */
LOD_PRECLAMP_OGL |
TEX_DEFAULT_COLOR_OGL |
- translate_format( cformat ) |
- translate_depth_format( zformat ));
+ cformat |
+ zformat );
}
{