diff options
author | Marek Olšák <[email protected]> | 2017-06-09 21:27:18 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | c19b08b079da566d5c377c1ff4fe0ae6ac980003 (patch) | |
tree | 244ce7af5c68d0a213d00052f928f75b2b0ada70 /src/mesa/drivers | |
parent | 480bf7731bf54ac936ec7edfa977aeeb377745b6 (diff) |
mesa: replace ctx->VertexProgram._TwoSideEnabled with a helper function
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_sf.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_state_upload.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index 0739306f30b..d92b5197fdd 100644 --- a/src/mesa/drivers/dri/i965/brw_sf.c +++ b/src/mesa/drivers/dri/i965/brw_sf.c @@ -34,6 +34,7 @@ #include "main/mtypes.h" #include "main/enums.h" #include "main/fbobject.h" +#include "main/state.h" #include "intel_batchbuffer.h" @@ -152,8 +153,7 @@ brw_upload_sf_prog(struct brw_context *brw) } /* _NEW_LIGHT | _NEW_PROGRAM */ - key.do_twoside_color = ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) || - ctx->VertexProgram._TwoSideEnabled); + key.do_twoside_color = _mesa_vertex_program_two_side_enabled(ctx); /* _NEW_POLYGON */ if (key.do_twoside_color) { diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index 8c6d3ff012e..b0e423f2f4d 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -31,6 +31,7 @@ #include "main/context.h" #include "main/enums.h" #include "main/macros.h" +#include "main/state.h" #include "brw_context.h" #if GEN_GEN == 6 @@ -1117,7 +1118,7 @@ genX(calculate_attr_overrides)(const struct brw_context *brw, genX(get_attr_override)(&attribute, &brw->vue_map_geom_out, *urb_entry_read_offset, attr, - brw->ctx.VertexProgram._TwoSideEnabled, + _mesa_vertex_program_two_side_enabled(ctx), &max_source_attr); } |