util: remove LIST_IS_EMPTY macro
[mesa.git] / src / gallium / drivers / radeonsi / si_state_msaa.c
index f9387e75ed1e5ab47911091b9b4ead7ee7749217..0fa38918b20dd48e93553f0c150b072250b84fa7 100644 (file)
  *   Right half: {1,3,5,7,9,11,13,15}
  */
 
+/* Important note: We have to use the standard DX positions, because
+ * the primitive discard compute shader relies on them.
+ */
+
 /* 1x MSAA */
 static const uint32_t sample_locs_1x =
        FILL_SREG( 0, 0,   0, 0,   0, 0,   0, 0); /* S1, S2, S3 fields are not used by 1x */
@@ -101,6 +105,10 @@ static const uint64_t centroid_priority_4x = 0x3210321032103210ull;
 static const uint32_t sample_locs_8x[] = {
        FILL_SREG(-3,-5,   5, 1,  -1, 3,   7,-7),
        FILL_SREG(-7,-1,   3, 7,  -5, 5,   1,-3),
+       /* The following are unused by hardware, but we emit them to IBs
+        * instead of multiple SET_CONTEXT_REG packets. */
+       0,
+       0,
 };
 static const uint64_t centroid_priority_8x = 0x3546012735460127ull;
 
@@ -198,14 +206,14 @@ void si_init_msaa_functions(struct si_context *sctx)
 
        sctx->b.get_sample_position = si_get_sample_position;
 
-       si_get_sample_position(&sctx->b, 1, 0, sctx->sample_locations_1x[0]);
+       si_get_sample_position(&sctx->b, 1, 0, sctx->sample_positions.x1[0]);
 
        for (i = 0; i < 2; i++)
-               si_get_sample_position(&sctx->b, 2, i, sctx->sample_locations_2x[i]);
+               si_get_sample_position(&sctx->b, 2, i, sctx->sample_positions.x2[i]);
        for (i = 0; i < 4; i++)
-               si_get_sample_position(&sctx->b, 4, i, sctx->sample_locations_4x[i]);
+               si_get_sample_position(&sctx->b, 4, i, sctx->sample_positions.x4[i]);
        for (i = 0; i < 8; i++)
-               si_get_sample_position(&sctx->b, 8, i, sctx->sample_locations_8x[i]);
+               si_get_sample_position(&sctx->b, 8, i, sctx->sample_positions.x8[i]);
        for (i = 0; i < 16; i++)
-               si_get_sample_position(&sctx->b, 16, i, sctx->sample_locations_16x[i]);
+               si_get_sample_position(&sctx->b, 16, i, sctx->sample_positions.x16[i]);
 }