Lines Matching refs:surf

83    struct vdp_surface *surf = (struct vdp_surface *)entry->key;
86 if (surf->state == GL_SURFACE_MAPPED_NV) {
87 GLintptr surfaces[] = { (GLintptr)surf };
92 free(surf);
117 struct vdp_surface *surf;
135 surf = CALLOC_STRUCT( vdp_surface );
136 if (surf == NULL) {
141 surf->vdpSurface = vdpSurface;
142 surf->target = target;
143 surf->access = GL_READ_WRITE;
144 surf->state = GL_SURFACE_REGISTERED_NV;
145 surf->output = isOutput;
152 free(surf);
160 free(surf);
171 free(surf);
181 _mesa_reference_texobj(&surf->textures[i], tex);
184 _mesa_set_add(ctx->vdpSurfaces, surf);
186 return (GLintptr)surf;
224 struct vdp_surface *surf = (struct vdp_surface *)surface;
232 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
242 struct vdp_surface *surf = (struct vdp_surface *)surface;
256 entry = _mesa_set_search(ctx->vdpSurfaces, surf);
263 if (surf->textures[i]) {
264 surf->textures[i]->Immutable = GL_FALSE;
265 _mesa_reference_texobj(&surf->textures[i], NULL);
270 free(surf);
277 struct vdp_surface *surf = (struct vdp_surface *)surface;
285 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
300 values[0] = surf->state;
309 struct vdp_surface *surf = (struct vdp_surface *)surface;
317 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
329 if (surf->state == GL_SURFACE_MAPPED_NV) {
334 surf->access = access;
349 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
351 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
356 if (surf->state == GL_SURFACE_MAPPED_NV) {
363 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
364 unsigned numTextureNames = surf->output ? 1 : 4;
368 struct gl_texture_object *tex = surf->textures[j];
372 image = _mesa_get_tex_image(ctx, tex, surf->target, 0);
381 ctx->Driver.VDPAUMapSurface(ctx, surf->target, surf->access,
382 surf->output, tex, image,
383 surf->vdpSurface, j);
387 surf->state = GL_SURFACE_MAPPED_NV;
403 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
405 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
410 if (surf->state != GL_SURFACE_MAPPED_NV) {
417 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
418 unsigned numTextureNames = surf->output ? 1 : 4;
422 struct gl_texture_object *tex = surf->textures[j];
427 image = _mesa_select_tex_image(tex, surf->target, 0);
429 ctx->Driver.VDPAUUnmapSurface(ctx, surf->target, surf->access,
430 surf->output, tex, image,
431 surf->vdpSurface, j);
438 surf->state = GL_SURFACE_REGISTERED_NV;