i965: Store 4x MSAA sample positions in a scalar value, not an array.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Feb 2014 00:34:22 +0000 (16:34 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Feb 2014 16:18:29 +0000 (08:18 -0800)
Storing a single value in an array is rather pointless.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_multisample_state.h
src/mesa/drivers/dri/i965/gen6_multisample_state.c
src/mesa/drivers/dri/i965/gen8_multisample_state.c

index 79566f0bb236665d33809dfcfb7aae142b2182db..2e0250004da5f25a629cc26bcad9d8d23bc8cc47 100644 (file)
@@ -32,7 +32,7 @@
  * e     3
  */
 static const uint32_t
-brw_multisample_positions_4x[] = { 0xae2ae662 };
+brw_multisample_positions_4x = 0xae2ae662;
 
 /**
  * Sample positions are based on a solution to the "8 queens" puzzle.
index fd3dd0e53637bb221c0a2992d59922703b679e77..cdc9ef8f075f0a9391f6964504921a017fe42af8 100644 (file)
@@ -39,7 +39,7 @@ gen6_get_sample_position(struct gl_context *ctx,
       result[0] = result[1] = 0.5f;
       return;
    case 4:
-      bits = brw_multisample_positions_4x[0] >> (8 * index);
+      bits = brw_multisample_positions_4x >> (8 * index);
       break;
    case 8:
       bits = brw_multisample_positions_8x[index >> 2] >> (8 * (index & 3));
@@ -74,7 +74,7 @@ gen6_emit_3dstate_multisample(struct brw_context *brw,
       break;
    case 4:
       number_of_multisamples = MS_NUMSAMPLES_4;
-      sample_positions_3210 = brw_multisample_positions_4x[0];
+      sample_positions_3210 = brw_multisample_positions_4x;
       break;
    case 8:
       number_of_multisamples = MS_NUMSAMPLES_8;
index ad273e4d42408867bc04674d36b1fe6b574d1e4e..e137efe0d30a4a1484b877d8262362978529cedb 100644 (file)
@@ -85,7 +85,7 @@ gen8_emit_3dstate_sample_pattern(struct brw_context *brw)
    OUT_BATCH(brw_multisample_positions_8x[0]); /* sample positions 3210 */
 
    /* 4x MSAA */
-   OUT_BATCH(brw_multisample_positions_4x[0]);
+   OUT_BATCH(brw_multisample_positions_4x);
 
    /* 2x and 1x MSAA patterns
     * XXX: need to program 2x.