projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i965: Also do constant propagation for the second operand of CMP.
[mesa.git]
/
src
/
mesa
/
drivers
/
dri
/
i965
/
gen6_sf_state.c
diff --git
a/src/mesa/drivers/dri/i965/gen6_sf_state.c
b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index a0322784685820614e72d1146743e542877dc9e8..6c88338195801c0cd0398e47e7f71a9e63877514 100644
(file)
--- a/
src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/
src/mesa/drivers/dri/i965/gen6_sf_state.c
@@
-68,7
+68,7
@@
upload_sf_state(struct brw_context *brw)
/* CACHE_NEW_VS_PROG */
uint32_t num_inputs = brw_count_bits(brw->vs.prog_data->outputs_written);
uint32_t num_outputs = brw_count_bits(brw->fragment_program->Base.InputsRead);
/* CACHE_NEW_VS_PROG */
uint32_t num_inputs = brw_count_bits(brw->vs.prog_data->outputs_written);
uint32_t num_outputs = brw_count_bits(brw->fragment_program->Base.InputsRead);
- uint32_t dw1, dw2, dw3, dw4;
+ uint32_t dw1, dw2, dw3, dw4
, dw16
;
int i;
/* _NEW_BUFFER */
GLboolean render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
int i;
/* _NEW_BUFFER */
GLboolean render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
@@
-82,6
+82,7
@@
upload_sf_state(struct brw_context *brw)
GEN6_SF_STATISTICS_ENABLE;
dw3 = 0;
dw4 = 0;
GEN6_SF_STATISTICS_ENABLE;
dw3 = 0;
dw4 = 0;
+ dw16 = 0;
/* _NEW_POLYGON */
if ((ctx->Polygon.FrontFace == GL_CCW) ^ render_to_fbo)
/* _NEW_POLYGON */
if ((ctx->Polygon.FrontFace == GL_CCW) ^ render_to_fbo)
@@
-129,7
+130,7
@@
upload_sf_state(struct brw_context *brw)
dw4 |= U_FIXED(CLAMP(ctx->Point.Size, 0.125, 225.875), 3) <<
GEN6_SF_POINT_WIDTH_SHIFT;
dw4 |= U_FIXED(CLAMP(ctx->Point.Size, 0.125, 225.875), 3) <<
GEN6_SF_POINT_WIDTH_SHIFT;
- if (
render_to_fbo
)
+ if (
ctx->Point.SpriteOrigin == GL_LOWER_LEFT
)
dw1 |= GEN6_SF_POINT_SPRITE_LOWERLEFT;
/* _NEW_LIGHT */
dw1 |= GEN6_SF_POINT_SPRITE_LOWERLEFT;
/* _NEW_LIGHT */
@@
-143,6
+144,13
@@
upload_sf_state(struct brw_context *brw)
(1 << GEN6_SF_TRIFAN_PROVOKE_SHIFT);
}
(1 << GEN6_SF_TRIFAN_PROVOKE_SHIFT);
}
+ if (ctx->Point.PointSprite) {
+ for (i = 0; i < 8; i++) {
+ if (ctx->Point.CoordReplace[i])
+ dw16 |= (1 << i);
+ }
+ }
+
BEGIN_BATCH(20);
OUT_BATCH(CMD_3D_SF_STATE << 16 | (20 - 2));
OUT_BATCH(dw1);
BEGIN_BATCH(20);
OUT_BATCH(CMD_3D_SF_STATE << 16 | (20 - 2));
OUT_BATCH(dw1);
@@
-172,7
+180,7
@@
upload_sf_state(struct brw_context *brw)
}
OUT_BATCH(attr_overrides);
}
}
OUT_BATCH(attr_overrides);
}
- OUT_BATCH(
0
); /* point sprite texcoord bitmask */
+ OUT_BATCH(
dw16
); /* point sprite texcoord bitmask */
OUT_BATCH(0); /* constant interp bitmask */
OUT_BATCH(0); /* wrapshortest enables 0-7 */
OUT_BATCH(0); /* wrapshortest enables 8-15 */
OUT_BATCH(0); /* constant interp bitmask */
OUT_BATCH(0); /* wrapshortest enables 0-7 */
OUT_BATCH(0); /* wrapshortest enables 8-15 */