diff options
author | Eric Anholt <[email protected]> | 2012-01-20 13:19:10 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-01-24 16:20:21 -0800 |
commit | f6e82cd2a18b0edebe3e4102fc93b552e708935a (patch) | |
tree | b876e6c70e1ddb8a8faa9e821d367727d64094ac /src/mesa/drivers/dri/i965/gen6_cc.c | |
parent | 04b4880d7c9a5882100ca6a19d42a8c012b174f6 (diff) |
i965/gen6+: Work around GPU hangs with logic ops on integer textures.
This doesn't result in correct rendering -- GL requires that logic ops
work, while the hardware specs say it doesn't do them. I'm not sure
how we would want to handle this.
NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_cc.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_cc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c index dada09ca7dd..8a805fa6d77 100644 --- a/src/mesa/drivers/dri/i965/gen6_cc.c +++ b/src/mesa/drivers/dri/i965/gen6_cc.c @@ -79,9 +79,14 @@ gen6_upload_blend_state(struct brw_context *brw) /* _NEW_COLOR */ if (ctx->Color.ColorLogicOpEnabled) { /* Floating point RTs should have no effect from LogicOp, - * except for disabling of blending + * except for disabling of blending. + * + * From the Sandy Bridge PRM, Vol 2 Par 1, Section 8.1.11, "Logic Ops", + * + * "Logic Ops are only supported on *_UNORM surfaces (excluding + * _SRGB variants), otherwise Logic Ops must be DISABLED." */ - if (rb_type != GL_FLOAT) { + if (rb_type == GL_UNSIGNED_NORMALIZED) { blend[b].blend1.logic_op_enable = 1; blend[b].blend1.logic_op_func = intel_translate_logic_op(ctx->Color.LogicOp); |