summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-07-11 18:32:48 +0200
committerMarek Olšák <[email protected]>2011-07-11 23:45:01 +0200
commit2df4b6117b27acb4ea46222b47353ffb9f513204 (patch)
treefa22fa775ccdb922e2d6c77dda43d711d84dc3ea /src/mesa
parentab4d629613d5a7a8a94f3fe3f1acac347f39e2ec (diff)
st/mesa: get rid of unnecessary 'goto' in DrawPixels
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index f25656acb49..d3e6aefdb79 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -988,11 +988,12 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
else if (format == GL_DEPTH_COMPONENT)
write_depth = GL_TRUE;
- if (write_stencil) {
- enum pipe_format tex_format;
- /* can we write to stencil if not fallback */
- if (!pipe->screen->get_param(pipe->screen, PIPE_CAP_SHADER_STENCIL_EXPORT))
- goto stencil_fallback;
+ if (write_stencil &&
+ !pipe->screen->get_param(pipe->screen, PIPE_CAP_SHADER_STENCIL_EXPORT)) {
+ /* software fallback */
+ draw_stencil_pixels(ctx, x, y, width, height, format, type,
+ unpack, pixels);
+ return;
}
/* Mesa state should be up to date by now */
@@ -1083,11 +1084,6 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
pipe_resource_reference(&pt, NULL);
}
}
- return;
-
-stencil_fallback:
- draw_stencil_pixels(ctx, x, y, width, height, format, type,
- unpack, pixels);
}