summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri_drawable.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsapountzis@gmail.com>2010-03-25 17:01:52 +0200
committerGeorge Sapountzis <gsapountzis@gmail.com>2010-03-25 17:01:52 +0200
commit96c152b4b066f6e3583821ad44ec8a527ab55e05 (patch)
treea03463242ee16bf59d879d3c4cc785dfc7a30675 /src/gallium/state_trackers/dri/dri_drawable.c
parenta21c30308db206467a54394b1ddda444861ee9b6 (diff)
downloadexternal_mesa3d-96c152b4b066f6e3583821ad44ec8a527ab55e05.zip
external_mesa3d-96c152b4b066f6e3583821ad44ec8a527ab55e05.tar.gz
external_mesa3d-96c152b4b066f6e3583821ad44ec8a527ab55e05.tar.bz2
st/dri: make get_texture into validate_att
This is a wrapper around dri_st_framebuffer_validate for a single attachment. Also, call validate through hook to make it more generic.
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_drawable.c')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 930387f..4e2300d 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -48,8 +48,11 @@ void dri2_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
{
struct dri_context *ctx = dri_context(pDRICtx);
struct dri_drawable *drawable = dri_drawable(dPriv);
- struct pipe_texture *pt =
- dri_get_st_framebuffer_texture(drawable->stfb, ST_ATTACHMENT_FRONT_LEFT);
+ struct pipe_texture *pt;
+
+ dri_st_framebuffer_validate_att(drawable->stfb, ST_ATTACHMENT_FRONT_LEFT);
+
+ pt = drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
if (pt) {
ctx->st->teximage(ctx->st,