summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_surfaces.c
diff options
context:
space:
mode:
authorXavier Chantry <[email protected]>2010-12-05 12:04:47 +0100
committerPatrice Mandin <[email protected]>2010-12-05 12:08:00 +0100
commitaf5345d9371e927019d51ce3ad198958f8cd42a9 (patch)
tree39bd4692e2df0a1430322c14ad6ea8be2f4b1e36 /src/gallium/auxiliary/util/u_surfaces.c
parent66d45567b4e2c6f2585789b68667e6c00b7567e1 (diff)
nvfx: fixes after array textures merge
Signed-off-by: Xavier Chantry <[email protected]> Signed-off-by: Patrice Mandin <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_surfaces.c')
-rw-r--r--src/gallium/auxiliary/util/u_surfaces.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_surfaces.c b/src/gallium/auxiliary/util/u_surfaces.c
index 45aa15e0447..fd55bd1830c 100644
--- a/src/gallium/auxiliary/util/u_surfaces.c
+++ b/src/gallium/auxiliary/util/u_surfaces.c
@@ -29,10 +29,11 @@
#include "util/u_inlines.h"
#include "util/u_memory.h"
-struct pipe_surface *
+boolean
util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
struct pipe_screen *pscreen, struct pipe_resource *pt,
- unsigned level, unsigned layer, unsigned flags)
+ unsigned level, unsigned layer, unsigned flags,
+ struct pipe_surface **res)
{
struct pipe_surface *ps;
@@ -53,12 +54,16 @@ util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
if(ps)
{
p_atomic_inc(&ps->reference.count);
- return ps;
+ *res = ps;
+ return FALSE;
}
ps = (struct pipe_surface *)CALLOC(1, surface_struct_size);
if(!ps)
- return NULL;
+ {
+ *res = NULL;
+ return FALSE;
+ }
pipe_surface_init(ps, pt, level, layer, flags);
@@ -67,7 +72,8 @@ util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
else
us->u.array[level] = ps;
- return ps;
+ *res = ps;
+ return TRUE;
}
void