summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx/nv04_surface_2d.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-04-18 08:38:03 -0600
committerBrian Paul <brianp@vmware.com>2010-04-18 08:38:03 -0600
commitd7c336dc49f980cd129ebc159e11cd3ed9500e68 (patch)
tree908b6ae985728fde1efd3d60f20ac2db26b75838 /src/gallium/drivers/nvfx/nv04_surface_2d.c
parentf9ea7a2ea94275a3783dbc24ce8e6fec2930f493 (diff)
nvfx: move declarations before code to silence warnings
Diffstat (limited to 'src/gallium/drivers/nvfx/nv04_surface_2d.c')
-rw-r--r--src/gallium/drivers/nvfx/nv04_surface_2d.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/nvfx/nv04_surface_2d.c b/src/gallium/drivers/nvfx/nv04_surface_2d.c
index a1507bbb3c..4ed574227d 100644
--- a/src/gallium/drivers/nvfx/nv04_surface_2d.c
+++ b/src/gallium/drivers/nvfx/nv04_surface_2d.c
@@ -497,6 +497,9 @@ struct nv04_surface*
nv04_surface_wrap_for_render(struct pipe_screen *pscreen,
struct nv04_surface_2d* eng2d, struct nv04_surface* ns)
{
+ struct pipe_resource templ;
+ struct pipe_resource* temp_tex;
+ struct nv04_surface* temp_ns;
int temp_flags;
temp_flags = (ns->base.usage |
@@ -506,7 +509,6 @@ nv04_surface_wrap_for_render(struct pipe_screen *pscreen,
ns->base.usage = (PIPE_BIND_BLIT_SOURCE |
PIPE_BIND_BLIT_DESTINATION);
- struct pipe_resource templ;
memset(&templ, 0, sizeof(templ));
templ.format = ns->base.texture->format;
templ.target = PIPE_TEXTURE_2D;
@@ -520,8 +522,8 @@ nv04_surface_wrap_for_render(struct pipe_screen *pscreen,
templ.bind = ns->base.texture->bind | PIPE_BIND_RENDER_TARGET;
- struct pipe_resource* temp_tex = pscreen->resource_create(pscreen, &templ);
- struct nv04_surface* temp_ns = (struct nv04_surface*)pscreen->get_tex_surface(pscreen, temp_tex, 0, 0, 0, temp_flags);
+ temp_tex = pscreen->resource_create(pscreen, &templ);
+ temp_ns = (struct nv04_surface*)pscreen->get_tex_surface(pscreen, temp_tex, 0, 0, 0, temp_flags);
temp_ns->backing = ns;
if(ns->base.usage & PIPE_BIND_BLIT_SOURCE)