summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-01-10 15:23:56 +0100
committerMarek Olšák <[email protected]>2013-01-10 15:37:10 +0100
commit2f89949b666889a61196657511b1dee4418ae865 (patch)
tree6eef5376233fe2964e69a909c3ea21a5e8cdc594 /src/gallium/drivers/r300/r300_emit.c
parent9a07b6bd747e776aa55029e18ab11d3b8569ee61 (diff)
r300g: don't set sample positions to the pixel center if MSAA is disabled
but an MSAA resource is bound. This effectively makes the MSAA disable switch not affect rasterization, but it still affects the alpha-to-one and alpha-to-coverage states. This hardware just lacks a proper MSAA disable switch. This fixes graphics corruption in sauerbraten. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59194
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 825038a9dc9..cb6c46e5e6c 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -566,7 +566,7 @@ void r300_emit_fb_state_pipelined(struct r300_context *r300,
struct pipe_framebuffer_state* fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
- unsigned i, num_samples, num_cbufs = fb->nr_cbufs;
+ unsigned i, num_cbufs = fb->nr_cbufs;
unsigned mspos0, mspos1;
CS_LOCALS(r300);
@@ -593,14 +593,10 @@ void r300_emit_fb_state_pipelined(struct r300_context *r300,
OUT_CS(R300_US_OUT_FMT_UNUSED);
}
- /* Multisampling. Depends on framebuffer sample count.
- * These are pipelined regs and as such cannot be moved
- * to the AA state.
+ /* Set sample positions. It depends on the framebuffer sample count.
+ * These are pipelined regs and as such cannot be moved to the AA state.
*/
- num_samples = r300->msaa_enable ? r300->num_samples : 1;
-
- /* Sample positions. */
- switch (num_samples) {
+ switch (r300->num_samples) {
default:
mspos0 = r300_get_mspos(0, sample_locs_1x);
mspos1 = r300_get_mspos(1, sample_locs_1x);