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