Lines Matching refs:surf

84    struct vdp_surface *surf = (struct vdp_surface *)entry->key;
87 if (surf->state == GL_SURFACE_MAPPED_NV) {
88 GLintptr surfaces[] = { (GLintptr)surf };
93 free(surf);
118 struct vdp_surface *surf;
136 surf = CALLOC_STRUCT( vdp_surface );
137 if (surf == NULL) {
142 surf->vdpSurface = vdpSurface;
143 surf->target = target;
144 surf->access = GL_READ_WRITE;
145 surf->state = GL_SURFACE_REGISTERED_NV;
146 surf->output = isOutput;
153 free(surf);
161 free(surf);
172 free(surf);
182 _mesa_reference_texobj(&surf->textures[i], tex);
185 _mesa_set_add(ctx->vdpSurfaces, surf);
187 return (GLintptr)surf;
225 struct vdp_surface *surf = (struct vdp_surface *)surface;
233 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
243 struct vdp_surface *surf = (struct vdp_surface *)surface;
257 entry = _mesa_set_search(ctx->vdpSurfaces, surf);
264 if (surf->textures[i]) {
265 surf->textures[i]->Immutable = GL_FALSE;
266 _mesa_reference_texobj(&surf->textures[i], NULL);
271 free(surf);
278 struct vdp_surface *surf = (struct vdp_surface *)surface;
286 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
301 values[0] = surf->state;
310 struct vdp_surface *surf = (struct vdp_surface *)surface;
318 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
330 if (surf->state == GL_SURFACE_MAPPED_NV) {
335 surf->access = access;
350 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
352 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
357 if (surf->state == GL_SURFACE_MAPPED_NV) {
364 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
365 unsigned numTextureNames = surf->output ? 1 : 4;
369 struct gl_texture_object *tex = surf->textures[j];
373 image = _mesa_get_tex_image(ctx, tex, surf->target, 0);
382 ctx->Driver.VDPAUMapSurface(ctx, surf->target, surf->access,
383 surf->output, tex, image,
384 surf->vdpSurface, j);
388 surf->state = GL_SURFACE_MAPPED_NV;
404 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
406 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
411 if (surf->state != GL_SURFACE_MAPPED_NV) {
418 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
419 unsigned numTextureNames = surf->output ? 1 : 4;
423 struct gl_texture_object *tex = surf->textures[j];
428 image = _mesa_select_tex_image(tex, surf->target, 0);
430 ctx->Driver.VDPAUUnmapSurface(ctx, surf->target, surf->access,
431 surf->output, tex, image,
432 surf->vdpSurface, j);
439 surf->state = GL_SURFACE_REGISTERED_NV;