Mesa (master): galahad: galahad_context_blit

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Oct 12 17:38:38 UTC 2012


Module: Mesa
Branch: master
Commit: 2a4105cbc067dcd38057a877d606e9493e9ed53a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a4105cbc067dcd38057a877d606e9493e9ed53a

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Oct 12 18:36:22 2012 +0100

galahad: galahad_context_blit

must unwrap.

---

 src/gallium/drivers/galahad/glhd_context.c |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index 92ca4a6..3400a4d 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -723,27 +723,31 @@ galahad_context_resource_copy_region(struct pipe_context *_pipe,
 
 static void
 galahad_context_blit(struct pipe_context *_pipe,
-                     const struct pipe_blit_info *info)
+                     const struct pipe_blit_info *_info)
 {
    struct galahad_context *glhd_pipe = galahad_context(_pipe);
    struct pipe_context *pipe = glhd_pipe->pipe;
+   struct pipe_blit_info info = *_info;
 
-   if (info->dst.box.width < 0 ||
-       info->dst.box.height < 0)
+   info.dst.resource = galahad_resource_unwrap(info.dst.resource);
+   info.src.resource = galahad_resource_unwrap(info.src.resource);
+
+   if (info.dst.box.width < 0 ||
+       info.dst.box.height < 0)
       glhd_error("Destination dimensions are negative");
 
-   if (info->filter != PIPE_TEX_FILTER_NEAREST &&
-       info->src.resource->target != PIPE_TEXTURE_3D &&
-       info->dst.box.depth != info->src.box.depth)
+   if (info.filter != PIPE_TEX_FILTER_NEAREST &&
+       info.src.resource->target != PIPE_TEXTURE_3D &&
+       info.dst.box.depth != info.src.box.depth)
       glhd_error("Filtering in z-direction on non-3D texture");
 
-   if (util_format_is_depth_or_stencil(info->dst.format) !=
-       util_format_is_depth_or_stencil(info->src.format))
+   if (util_format_is_depth_or_stencil(info.dst.format) !=
+       util_format_is_depth_or_stencil(info.src.format))
       glhd_error("Invalid format conversion: %s <- %s\n",
-                 util_format_name(info->dst.format),
-                 util_format_name(info->src.format));
+                 util_format_name(info.dst.format),
+                 util_format_name(info.src.format));
 
-   pipe->blit(pipe, info);
+   pipe->blit(pipe, &info);
 }
 
 static void




More information about the mesa-commit mailing list