[Mesa-dev] [PATCH 3/4 dri] st/dri: sync the sw/ changes to dri_drawable.c
nobled
nobled at dreamwidth.org
Wed Oct 19 17:16:40 PDT 2011
The sw copy needs to go away. It's already missing several
new patches to the original.
---
.../state_trackers/dri/common/dri_drawable.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c
b/src/gallium/state_trackers/dri/common/dri_drawable.c
index 340404e..7cf7219 100644
--- a/src/gallium/state_trackers/dri/common/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/common/dri_drawable.c
@@ -203,14 +203,15 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
{
struct dri_context *ctx = dri_context(pDRICtx);
struct dri_drawable *drawable = dri_drawable(dPriv);
- struct pipe_resource *pt;
+ struct pipe_resource *res;
dri_drawable_validate_att(drawable, ST_ATTACHMENT_FRONT_LEFT);
- pt = drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
+ /* Use the pipe resource associated with the X drawable */
+ res = drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
- if (pt) {
- enum pipe_format internal_format = pt->format;
+ if (res) {
+ enum pipe_format internal_format = res->format;
if (format == __DRI_TEXTURE_FORMAT_RGB) {
/* only need to cover the formats recognized by dri_fill_st_visual */
@@ -226,9 +227,11 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
}
}
+ ctx->copy_drawable(ctx, dPriv, res);
+
ctx->st->teximage(ctx->st,
(target == GL_TEXTURE_2D) ? ST_TEXTURE_2D : ST_TEXTURE_RECT,
- 0, internal_format, pt, FALSE);
+ 0, internal_format, res, FALSE);
}
}
--
1.7.6.msysgit.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-st-dri-sync-the-sw-changes-to-dri_drawable.c.patch
Type: application/octet-stream
Size: 1842 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111019/9644c82e/attachment.obj>
More information about the mesa-dev
mailing list