summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_state.h
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-08-08 17:23:10 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-08-19 03:11:29 -0700
commit4c3acf94dadd71f35e7dfc0b2a1371e38b3f0e04 (patch)
treed48dc70731fe94fa929ba7e5932000b76b137c8c /src/mesa/drivers/dri/i965/brw_state.h
parent04f3594cd5c1ba756f89d868ba4e4b7c50e1572e (diff)
downloadexternal_mesa3d-4c3acf94dadd71f35e7dfc0b2a1371e38b3f0e04.zip
external_mesa3d-4c3acf94dadd71f35e7dfc0b2a1371e38b3f0e04.tar.gz
external_mesa3d-4c3acf94dadd71f35e7dfc0b2a1371e38b3f0e04.tar.bz2
i965/state: Move is_drawing_lines/points to gen6_clip_state.c
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h55
1 files changed, 3 insertions, 52 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index fc66593..8990485 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -406,63 +406,14 @@ void brw_upload_clip_prog(struct brw_context *brw);
/* brw_sf.c */
void brw_upload_sf_prog(struct brw_context *brw);
+bool brw_is_drawing_points(const struct brw_context *brw);
+bool brw_is_drawing_lines(const struct brw_context *brw);
+
/* gen7_l3_state.c */
void
gen7_restore_default_l3_config(struct brw_context *brw);
static inline bool
-is_drawing_points(const struct brw_context *brw)
-{
- /* Determine if the primitives *reaching the SF* are points */
- /* _NEW_POLYGON */
- if (brw->ctx.Polygon.FrontMode == GL_POINT ||
- brw->ctx.Polygon.BackMode == GL_POINT) {
- return true;
- }
-
- if (brw->geometry_program) {
- /* BRW_NEW_GEOMETRY_PROGRAM */
- return brw->geometry_program->OutputType == GL_POINTS;
- } else if (brw->tes.prog_data) {
- /* BRW_NEW_TES_PROG_DATA */
- return brw->tes.prog_data->output_topology ==
- BRW_TESS_OUTPUT_TOPOLOGY_POINT;
- } else {
- /* BRW_NEW_PRIMITIVE */
- return brw->primitive == _3DPRIM_POINTLIST;
- }
-}
-
-static inline bool
-is_drawing_lines(const struct brw_context *brw)
-{
- /* Determine if the primitives *reaching the SF* are points */
- /* _NEW_POLYGON */
- if (brw->ctx.Polygon.FrontMode == GL_LINE ||
- brw->ctx.Polygon.BackMode == GL_LINE) {
- return true;
- }
-
- if (brw->geometry_program) {
- /* BRW_NEW_GEOMETRY_PROGRAM */
- return brw->geometry_program->OutputType == GL_LINE_STRIP;
- } else if (brw->tes.prog_data) {
- /* BRW_NEW_TES_PROG_DATA */
- return brw->tes.prog_data->output_topology ==
- BRW_TESS_OUTPUT_TOPOLOGY_LINE;
- } else {
- /* BRW_NEW_PRIMITIVE */
- switch (brw->primitive) {
- case _3DPRIM_LINELIST:
- case _3DPRIM_LINESTRIP:
- case _3DPRIM_LINELOOP:
- return true;
- }
- }
- return false;
-}
-
-static inline bool
use_state_point_size(const struct brw_context *brw)
{
const struct gl_context *ctx = &brw->ctx;