aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-09-13 01:05:08 +0200
committerMarek Olšák <[email protected]>2012-09-30 18:57:57 +0200
commitd37e6b15ad545106d48af5c8abb75d0e28895d43 (patch)
tree561f633c3083ee5df032124e1bb53f46c9d2befd /src/gallium/auxiliary/util
parentd1b929a13713e740c06e3abc8666fe56b513a41a (diff)
st/mesa: implement decompress_with_blit using gallium blit
Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_surface.c30
-rw-r--r--src/gallium/auxiliary/util/u_surface.h11
2 files changed, 5 insertions, 36 deletions
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index fcfff148fe4..7fd6b36753b 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -66,11 +66,9 @@ u_surface_default_template(struct pipe_surface *surf,
* \return TRUE for success, FALSE if failure
*/
boolean
-util_create_rgba_surface(struct pipe_context *pipe,
- uint width, uint height,
- uint bind,
- struct pipe_resource **textureOut,
- struct pipe_surface **surfaceOut)
+util_create_rgba_texture(struct pipe_context *pipe,
+ uint width, uint height, uint bind,
+ struct pipe_resource **textureOut)
{
static const enum pipe_format rgbaFormats[] = {
PIPE_FORMAT_B8G8R8A8_UNORM,
@@ -113,33 +111,11 @@ util_create_rgba_surface(struct pipe_context *pipe,
/* create surface */
u_surface_default_template(&surf_templ, *textureOut, bind);
- /* create surface / view into texture */
- *surfaceOut = pipe->create_surface(pipe,
- *textureOut,
- &surf_templ);
- if (!*surfaceOut) {
- pipe_resource_reference(textureOut, NULL);
- return FALSE;
- }
-
return TRUE;
}
/**
- * Release the surface and texture from util_create_rgba_surface().
- */
-void
-util_destroy_rgba_surface(struct pipe_resource *texture,
- struct pipe_surface *surface)
-{
- pipe_surface_reference(&surface, NULL);
- pipe_resource_reference(&texture, NULL);
-}
-
-
-
-/**
* Fallback function for pipe->resource_copy_region().
* Note: (X,Y)=(0,0) is always the upper-left corner.
*/
diff --git a/src/gallium/auxiliary/util/u_surface.h b/src/gallium/auxiliary/util/u_surface.h
index 1117b78da7a..6bcb63f3dad 100644
--- a/src/gallium/auxiliary/util/u_surface.h
+++ b/src/gallium/auxiliary/util/u_surface.h
@@ -44,16 +44,9 @@ u_surface_default_template(struct pipe_surface *view,
unsigned bind);
extern boolean
-util_create_rgba_surface(struct pipe_context *ctx,
+util_create_rgba_texture(struct pipe_context *ctx,
uint width, uint height, uint bind,
- struct pipe_resource **textureOut,
- struct pipe_surface **surfaceOut);
-
-
-extern void
-util_destroy_rgba_surface(struct pipe_resource *texture,
- struct pipe_surface *surface);
-
+ struct pipe_resource **textureOut);
extern void