Lines Matching refs:surf
87 struct vdp_surface *surf = (struct vdp_surface *)entry->key;
90 if (surf->state == GL_SURFACE_MAPPED_NV) {
91 GLintptr surfaces[] = { (GLintptr)surf };
96 FREE(surf);
121 struct vdp_surface *surf;
139 surf = CALLOC_STRUCT( vdp_surface );
140 if (surf == NULL) {
145 surf->vdpSurface = vdpSurface;
146 surf->target = target;
147 surf->access = GL_READ_WRITE;
148 surf->state = GL_SURFACE_REGISTERED_NV;
149 surf->output = isOutput;
156 free(surf);
164 free(surf);
175 free(surf);
185 _mesa_reference_texobj(&surf->textures[i], tex);
188 _mesa_set_add(ctx->vdpSurfaces, surf);
190 return (GLintptr)surf;
228 struct vdp_surface *surf = (struct vdp_surface *)surface;
236 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
246 struct vdp_surface *surf = (struct vdp_surface *)surface;
260 entry = _mesa_set_search(ctx->vdpSurfaces, surf);
267 if (surf->textures[i]) {
268 surf->textures[i]->Immutable = GL_FALSE;
269 _mesa_reference_texobj(&surf->textures[i], NULL);
274 free(surf);
281 struct vdp_surface *surf = (struct vdp_surface *)surface;
289 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
304 values[0] = surf->state;
313 struct vdp_surface *surf = (struct vdp_surface *)surface;
321 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
333 if (surf->state == GL_SURFACE_MAPPED_NV) {
338 surf->access = access;
353 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
355 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
360 if (surf->state == GL_SURFACE_MAPPED_NV) {
367 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
368 unsigned numTextureNames = surf->output ? 1 : 4;
372 struct gl_texture_object *tex = surf->textures[j];
376 image = _mesa_get_tex_image(ctx, tex, surf->target, 0);
385 st_vdpau_map_surface(ctx, surf->target, surf->access,
386 surf->output, tex, image,
387 surf->vdpSurface, j);
391 surf->state = GL_SURFACE_MAPPED_NV;
407 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
409 if (!_mesa_set_search(ctx->vdpSurfaces, surf)) {
414 if (surf->state != GL_SURFACE_MAPPED_NV) {
421 struct vdp_surface *surf = (struct vdp_surface *)surfaces[i];
422 unsigned numTextureNames = surf->output ? 1 : 4;
426 struct gl_texture_object *tex = surf->textures[j];
431 image = _mesa_select_tex_image(tex, surf->target, 0);
433 st_vdpau_unmap_surface(ctx, surf->target, surf->access,
434 surf->output, tex, image,
435 surf->vdpSurface, j);
442 surf->state = GL_SURFACE_REGISTERED_NV;