summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/vdpau.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/vdpau.c')
-rw-r--r--src/mesa/main/vdpau.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c
index 0efa56e4f41..44be3a37443 100644
--- a/src/mesa/main/vdpau.c
+++ b/src/mesa/main/vdpau.c
@@ -163,9 +163,10 @@ register_surface(struct gl_context *ctx, GLboolean isOutput,
return (GLintptr)NULL;
}
- if (tex->Target == 0)
+ if (tex->Target == 0) {
tex->Target = target;
- else if (tex->Target != target) {
+ tex->TargetIndex = _mesa_tex_target_to_index(ctx, target);
+ } else if (tex->Target != target) {
_mesa_unlock_texture(ctx, tex);
free(surf);
_mesa_error(ctx, GL_INVALID_OPERATION,