Lines Matching defs:svga
48 svga_texture_copy_region(struct svga_context *svga,
59 assert(svga_have_vgpu10(svga));
71 SVGA_RETRY(svga, SVGA3D_vgpu10_PredCopyRegion
72 (svga->swc, dst_handle, dstSubResource,
78 svga_texture_copy_handle(struct svga_context *svga,
90 assert(svga);
118 SVGA_RETRY(svga, SVGA3D_BeginSurfaceCopy(svga->swc,
124 SVGA_FIFOCommitAll(svga->swc);
131 svga_texture_copy_handle_resource(struct svga_context *svga,
159 svga_texture_copy_region(svga, src_tex->handle,
165 svga_texture_copy_handle(svga,
182 svga_texture_view_surface(struct svga_context *svga,
195 struct svga_screen *ss = svga_screen(svga->pipe.screen);
201 "svga: Create surface view: layer %d zslice %d mips %d..%d\n",
264 svga_texture_copy_handle_resource(svga, tex, handle,
289 struct svga_context *svga = svga_context(pipe);
365 if (svga_have_vgpu10(svga)) {
395 s->handle = svga_texture_view_surface(svga, tex, bind, flags,
422 svga->hud.num_surface_views++;
436 struct svga_context *svga = svga_context(pipe);
441 SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_CREATESURFACE);
453 if (svga_have_vgpu10(svga) || svga_screen(screen)->debug.no_surface_view)
458 SVGA_STATS_TIME_POP(svga_sws(svga));
468 create_backed_surface_view(struct svga_context *svga, struct svga_surface *s,
476 SVGA_STATS_TIME_PUSH(svga_sws(svga),
479 backed_view = svga_create_surface_view(&svga->pipe,
488 SVGA_STATS_TIME_POP(svga_sws(svga));
515 svga_texture_copy_handle_resource(svga, tex, bs->handle,
524 assert(s->backed->base.context == &svga->pipe);
535 svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
540 assert(svga_have_vgpu10(svga));
543 SVGA_STATS_TIME_PUSH(svga_sws(svga),
555 if (svga_check_sampler_view_resource_collision(svga, s->handle, shader)) {
559 s = create_backed_surface_view(svga, s, TRUE);
562 svga->state.hw_draw.has_backed_views = TRUE;
573 if (s && s->base.context != &svga->pipe) {
574 s = create_backed_surface_view(svga, s, FALSE);
577 svga->state.hw_draw.has_backed_views = TRUE;
593 SVGA_RETRY(svga, SVGA3D_InvalidateGBSurface(svga->swc, stex->handle));
610 s->view_id = util_bitmask_add(svga->surface_view_id_bm);
611 ret = SVGA3D_vgpu10_DefineDepthStencilView(svga->swc,
636 s->view_id = util_bitmask_add(svga->surface_view_id_bm);
637 ret = SVGA3D_vgpu10_DefineRenderTargetView(svga->swc,
647 util_bitmask_clear(svga->surface_view_id_bm, s->view_id);
653 SVGA_STATS_TIME_POP(svga_sws(svga));
664 struct svga_context *svga = svga_context(pipe);
698 assert(svga_have_vgpu10(svga));
700 SVGA_RETRY(svga, SVGA3D_vgpu10_DestroyDepthStencilView(svga->swc,
704 SVGA_RETRY(svga, SVGA3D_vgpu10_DestroyRenderTargetView(svga->swc,
707 util_bitmask_clear(svga->surface_view_id_bm, s->view_id);
714 svga->hud.num_surface_views--;
749 svga_mark_surfaces_dirty(struct svga_context *svga)
752 struct svga_hw_clear_state *hw = &svga->state.hw_clear;
754 if (svga_have_vgpu10(svga)) {
766 for (i = 0; i < svga->curr.framebuffer.nr_cbufs; i++) {
767 if (svga->curr.framebuffer.cbufs[i])
768 svga_mark_surface_dirty(svga->curr.framebuffer.cbufs[i]);
770 if (svga->curr.framebuffer.zsbuf)
771 svga_mark_surface_dirty(svga->curr.framebuffer.zsbuf);
781 svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf,
834 if (svga_have_vgpu10(svga)) {
841 svga_texture_copy_region(svga,
850 svga_texture_copy_handle(svga,
881 svga_propagate_rendertargets(struct svga_context *svga)
886 if (!svga->state.hw_draw.has_backed_views)
889 /* Note that we examine the svga->state.hw_draw.framebuffer surfaces,
890 * not the svga->curr.framebuffer surfaces, because it's the former
893 for (i = 0; i < svga->state.hw_clear.num_rendertargets; i++) {
894 struct pipe_surface *s = svga->state.hw_clear.rtv[i];
896 svga_propagate_surface(svga, s, FALSE);
900 if (svga->state.hw_clear.dsv) {
901 svga_propagate_surface(svga, svga->state.hw_clear.dsv, FALSE);
993 svga_init_surface_functions(struct svga_context *svga)
995 svga->pipe.create_surface = svga_create_surface;
996 svga->pipe.surface_destroy = svga_surface_destroy;
997 svga->pipe.get_sample_position = svga_get_sample_position;