aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_multisample_state.c
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2015-09-16 11:48:42 +0100
committerNeil Roberts <[email protected]>2015-11-05 10:33:15 +0100
commit20250e854eca3209133d592d98559ac474a5f60f (patch)
tree29b4028b8f7cb1f49f0817cbc733c838df5c80a3 /src/mesa/drivers/dri/i965/gen6_multisample_state.c
parent5048da974e68a05b86a0cec494e1380e81978684 (diff)
i965: Program 16x MSAA sample positions.
This is the standard pattern used by the other 3D graphics API. BDW has slots for these values, but they aren't actually used until SKL. Even though the documentation for BDW says they must be zero, it doesn't seem to cause any harm to program them anyway. The comment above for the 8x sample positions says that the hardware implements centroid interpolation by picking the centre-most sample that is inside the primitive. That implies that it might be worthwhile to pick a pattern that includes 0.5,0.5. However by experimentation this doesn't seem to actually be the case. With the sample positions in this patch, if I modify the piglit test below so that it instead reports the centroid position, it reports 0.492188,0.421875 which doesn't match any of the positions. If I modify the sample positions so that they include one at exactly 0.5,0.5 it doesn't help and it reports another position which is even further from the center for some reason. arb_gpu_shader5-interpolateAtSample-different Kenneth Graunke experimented with some other patterns that have a higher standard deviation but I think after some discussion it was decided that it would be better to pick the same pattern as the other graphics API in case there are games that rely on this pattern. (Based on a patch by Kenneth Graunke) Cc: Kenneth Graunke <[email protected]> Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_multisample_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_multisample_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_multisample_state.c b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
index 8444c0c9bae..49c6ebabfba 100644
--- a/src/mesa/drivers/dri/i965/gen6_multisample_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
@@ -48,6 +48,9 @@ gen6_get_sample_position(struct gl_context *ctx,
case 8:
bits = brw_multisample_positions_8x[index >> 2] >> (8 * (index & 3));
break;
+ case 16:
+ bits = brw_multisample_positions_16x[index >> 2] >> (8 * (index & 3));
+ break;
default:
unreachable("Not implemented");
}