summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-14 22:36:28 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commit2108b73cf37b103cea51a906711733afbbb5a7af (patch)
tree33d80b25442cb550545d31ae41938474fe2c7e1b /src/mesa
parent91579254db234cbeb60948063c5f30400d1a7e6c (diff)
st/mesa: use precomputed st_fb_orientation
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_list.h6
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c6
-rw-r--r--src/mesa/state_tracker/st_atom_scissor.c2
-rw-r--r--src/mesa/state_tracker/st_atom_viewport.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_atom_list.h b/src/mesa/state_tracker/st_atom_list.h
index 81a93082a03..b76854e8b60 100644
--- a/src/mesa/state_tracker/st_atom_list.h
+++ b/src/mesa/state_tracker/st_atom_list.h
@@ -8,10 +8,7 @@ ST_STATE(ST_NEW_TES_STATE, st_update_tep)
ST_STATE(ST_NEW_TCS_STATE, st_update_tcp)
ST_STATE(ST_NEW_VS_STATE, st_update_vp)
-ST_STATE(ST_NEW_RASTERIZER, st_update_rasterizer)
ST_STATE(ST_NEW_POLY_STIPPLE, st_update_polygon_stipple)
-ST_STATE(ST_NEW_VIEWPORT, st_update_viewport)
-ST_STATE(ST_NEW_SCISSOR, st_update_scissor)
ST_STATE(ST_NEW_WINDOW_RECTANGLES, st_update_window_rectangles)
ST_STATE(ST_NEW_BLEND, st_update_blend)
ST_STATE(ST_NEW_BLEND_COLOR, st_update_blend_color)
@@ -36,8 +33,11 @@ ST_STATE(ST_NEW_GS_IMAGES, st_bind_gs_images)
ST_STATE(ST_NEW_FS_IMAGES, st_bind_fs_images)
ST_STATE(ST_NEW_FB_STATE, st_update_framebuffer_state) /* depends on update_*_texture and bind_*_images */
+ST_STATE(ST_NEW_RASTERIZER, st_update_rasterizer) /* depends on update_framebuffer_state */
ST_STATE(ST_NEW_SAMPLE_MASK, st_update_sample_mask) /* depends on update_framebuffer_state */
ST_STATE(ST_NEW_SAMPLE_SHADING, st_update_sample_shading)
+ST_STATE(ST_NEW_SCISSOR, st_update_scissor) /* depends on update_framebuffer_state */
+ST_STATE(ST_NEW_VIEWPORT, st_update_viewport) /* depends on update_framebuffer_state */
ST_STATE(ST_NEW_VS_CONSTANTS, st_update_vs_constants)
ST_STATE(ST_NEW_TCS_CONSTANTS, st_update_tcs_constants)
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 6e17562d5aa..e38896068e8 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -86,7 +86,7 @@ void st_update_rasterizer( struct st_context *st )
* must match OpenGL conventions so FBOs use Y=0=BOTTOM. In that
* case, we must invert Y and flip the notion of front vs. back.
*/
- if (st_fb_orientation(ctx->DrawBuffer) == Y_0_BOTTOM) {
+ if (st->state.fb_orientation == Y_0_BOTTOM) {
/* Drawing to an FBO. The viewport will be inverted. */
raster->front_ccw ^= 1;
}
@@ -174,7 +174,7 @@ void st_update_rasterizer( struct st_context *st )
if (ctx->Point.PointSprite) {
/* origin */
if ((ctx->Point.SpriteOrigin == GL_UPPER_LEFT) ^
- (st_fb_orientation(ctx->DrawBuffer) == Y_0_BOTTOM))
+ (st->state.fb_orientation == Y_0_BOTTOM))
raster->sprite_coord_mode = PIPE_SPRITE_COORD_UPPER_LEFT;
else
raster->sprite_coord_mode = PIPE_SPRITE_COORD_LOWER_LEFT;
@@ -269,7 +269,7 @@ void st_update_rasterizer( struct st_context *st )
ctx->Color._ClampFragmentColor;
raster->half_pixel_center = 1;
- if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP)
+ if (st->state.fb_orientation == Y_0_TOP)
raster->bottom_edge_rule = 1;
/* _NEW_TRANSFORM */
if (ctx->Transform.ClipOrigin == GL_UPPER_LEFT)
diff --git a/src/mesa/state_tracker/st_atom_scissor.c b/src/mesa/state_tracker/st_atom_scissor.c
index d3450be01e9..ccd6e8ebd35 100644
--- a/src/mesa/state_tracker/st_atom_scissor.c
+++ b/src/mesa/state_tracker/st_atom_scissor.c
@@ -82,7 +82,7 @@ st_update_scissor( struct st_context *st )
/* Now invert Y if needed.
* Gallium drivers use the convention Y=0=top for surfaces.
*/
- if (st_fb_orientation(fb) == Y_0_TOP) {
+ if (st->state.fb_orientation == Y_0_TOP) {
miny = fb->Height - scissor[i].maxy;
maxy = fb->Height - scissor[i].miny;
scissor[i].miny = miny;
diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c
index 900f0617caa..1fc8908f9f7 100644
--- a/src/mesa/state_tracker/st_atom_viewport.c
+++ b/src/mesa/state_tracker/st_atom_viewport.c
@@ -47,7 +47,7 @@ st_update_viewport( struct st_context *st )
unsigned i;
/* _NEW_BUFFERS
*/
- if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
+ if (st->state.fb_orientation == Y_0_TOP) {
/* Drawing to a window. The corresponding gallium surface uses
* Y=0=TOP but OpenGL is Y=0=BOTTOM. So we need to invert the viewport.
*/