[Mesa-dev] [PATCH 1/2] i965: Fix missing dirty bits related to is_drawing_points/lines.
Kenneth Graunke
kenneth at whitecape.org
Mon Aug 29 22:05:43 UTC 2016
calculate_attr_overrides() uses is_drawing_points(), which depends
on tessellation and geometry program state.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/gen6_clip_state.c | 4 ++++
src/mesa/drivers/dri/i965/gen7_sf_state.c | 13 ++++++++++---
src/mesa/drivers/dri/i965/gen8_sf_state.c | 8 ++++++--
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index 4a3f7f9..1edefb0 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -230,6 +230,9 @@ upload_clip_state(struct brw_context *brw)
else
enable = GEN6_CLIP_ENABLE;
+ /* _NEW_POLYGON,
+ * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_TES_PROG_DATA | BRW_NEW_PRIMITIVE
+ */
if (!brw_is_drawing_points(brw) && !brw_is_drawing_lines(brw))
dw2 |= GEN6_CLIP_XY_TEST;
@@ -281,6 +284,7 @@ const struct brw_tracked_state gen7_clip_state = {
BRW_NEW_META_IN_PROGRESS |
BRW_NEW_PRIMITIVE |
BRW_NEW_RASTERIZER_DISCARD |
+ BRW_NEW_TES_PROG_DATA |
BRW_NEW_VUE_MAP_GEOM_OUT,
},
.emit = upload_clip_state,
diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c
index ba0592a..ffe92a6 100644
--- a/src/mesa/drivers/dri/i965/gen7_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c
@@ -59,8 +59,10 @@ upload_sbe_state(struct brw_context *brw)
}
dw1 |= point_sprite_origin;
- /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM
- * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | BRW_NEW_FS_PROG_DATA
+ /* _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM,
+ * BRW_NEW_FS_PROG_DATA | BRW_NEW_FRAGMENT_PROGRAM |
+ * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_PRIMITIVE | BRW_NEW_TES_PROG_DATA |
+ * BRW_NEW_VUE_MAP_GEOM_OUT
*/
uint32_t urb_entry_read_length;
uint32_t urb_entry_read_offset;
@@ -96,6 +98,7 @@ const struct brw_tracked_state gen7_sbe_state = {
BRW_NEW_FRAGMENT_PROGRAM |
BRW_NEW_FS_PROG_DATA |
BRW_NEW_GEOMETRY_PROGRAM |
+ BRW_NEW_TES_PROG_DATA |
BRW_NEW_PRIMITIVE |
BRW_NEW_VUE_MAP_GEOM_OUT,
},
@@ -187,7 +190,9 @@ upload_sf_state(struct brw_context *brw)
dw2 |= GEN6_SF_CULL_NONE;
}
- /* _NEW_SCISSOR _NEW_POLYGON BRW_NEW_GEOMETRY_PROGRAM BRW_NEW_PRIMITIVE */
+ /* _NEW_SCISSOR | _NEW_POLYGON,
+ * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_PRIMITIVE | BRW_NEW_TES_PROG_DATA
+ */
if (ctx->Scissor.EnableFlags ||
brw_is_drawing_points(brw) || brw_is_drawing_lines(brw))
dw2 |= GEN6_SF_SCISSOR_ENABLE;
@@ -256,7 +261,9 @@ const struct brw_tracked_state gen7_sf_state = {
_NEW_SCISSOR,
.brw = BRW_NEW_BLORP |
BRW_NEW_CONTEXT |
+ BRW_NEW_GEOMETRY_PROGRAM |
BRW_NEW_PRIMITIVE |
+ BRW_NEW_TES_PROG_DATA |
BRW_NEW_VUE_MAP_GEOM_OUT,
},
.emit = upload_sf_state,
diff --git a/src/mesa/drivers/dri/i965/gen8_sf_state.c b/src/mesa/drivers/dri/i965/gen8_sf_state.c
index 0c4f1df..cf3e680 100644
--- a/src/mesa/drivers/dri/i965/gen8_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_sf_state.c
@@ -60,8 +60,10 @@ upload_sbe(struct brw_context *brw)
else
dw1 |= GEN6_SF_POINT_SPRITE_UPPERLEFT;
- /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM |
- * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | BRW_NEW_FS_PROG_DATA
+ /* _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM,
+ * BRW_NEW_FS_PROG_DATA | BRW_NEW_FRAGMENT_PROGRAM |
+ * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_PRIMITIVE | BRW_NEW_TES_PROG_DATA |
+ * BRW_NEW_VUE_MAP_GEOM_OUT
*/
calculate_attr_overrides(brw, attr_overrides,
&point_sprite_enables,
@@ -137,6 +139,8 @@ const struct brw_tracked_state gen8_sbe_state = {
BRW_NEW_CONTEXT |
BRW_NEW_FRAGMENT_PROGRAM |
BRW_NEW_FS_PROG_DATA |
+ BRW_NEW_GEOMETRY_PROGRAM |
+ BRW_NEW_TES_PROG_DATA |
BRW_NEW_VUE_MAP_GEOM_OUT,
},
.emit = upload_sbe,
--
2.9.3
More information about the mesa-dev
mailing list