Mesa (master): svga: remove local variable in create_backed_surface_view()
Brian Paul
brianp at kemper.freedesktop.org
Fri Aug 26 20:32:33 UTC 2016
Module: Mesa
Branch: master
Commit: c72dcd9a718628638957bfd99549bf788c2e6b36
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c72dcd9a718628638957bfd99549bf788c2e6b36
Author: Brian Paul <brianp at vmware.com>
Date: Thu Aug 25 15:04:52 2016 -0600
svga: remove local variable in create_backed_surface_view()
To simplify the code a bit.
Reviewed-by: Neha Bhende <bhenden at vmware.com>
---
src/gallium/drivers/svga/svga_surface.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 43a00c3..4b0b56c 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -370,12 +370,10 @@ svga_create_surface(struct pipe_context *pipe,
static struct svga_surface *
create_backed_surface_view(struct svga_context *svga, struct svga_surface *s)
{
- struct svga_surface *bs = s->backed;
-
SVGA_STATS_TIME_PUSH(svga_sws(svga),
SVGA_STATS_TIME_CREATEBACKEDSURFACEVIEW);
- if (!bs) {
+ if (!s->backed) {
struct svga_texture *tex = svga_texture(s->base.texture);
struct pipe_surface *backed_view;
@@ -386,15 +384,14 @@ create_backed_surface_view(struct svga_context *svga, struct svga_surface *s)
if (!backed_view)
return NULL;
- bs = svga_surface(backed_view);
- s->backed = bs;
+ s->backed = svga_surface(backed_view);
}
- svga_mark_surface_dirty(&bs->base);
+ svga_mark_surface_dirty(&s->backed->base);
SVGA_STATS_TIME_POP(svga_sws(svga));
- return bs;
+ return s->backed;
}
/**
More information about the mesa-commit
mailing list