• Home
  • Raw
  • Download

Lines Matching refs:svga

49 svga_hwtnl_create(struct svga_context *svga)  in svga_hwtnl_create()  argument
55 hwtnl->svga = svga; in svga_hwtnl_create()
57 hwtnl->cmd.swc = svga->swc; in svga_hwtnl_create()
91 struct svga_screen *svgascreen = svga_screen(hwtnl->svga->pipe.screen); in svga_hwtnl_set_flatshade()
194 struct svga_context *svga = hwtnl->svga; in draw_vgpu9() local
211 if (svga->state.hw_draw.num_backed_views) { in draw_vgpu9()
212 for (i = 0; i < svga->state.hw_draw.num_views; i++) { in draw_vgpu9()
213 struct svga_hw_view_state *view = &svga->state.hw_draw.views[i]; in draw_vgpu9()
217 svga_validate_sampler_view(svga, view->v); in draw_vgpu9()
223 handle = svga_buffer_handle(svga, hwtnl->cmd.vbufs[j].buffer.resource, in draw_vgpu9()
233 handle = svga_buffer_handle(svga, hwtnl->cmd.prim_ib[i], in draw_vgpu9()
244 if (svga->rebind.flags.rendertargets) { in draw_vgpu9()
245 ret = svga_reemit_framebuffer_bindings(svga); in draw_vgpu9()
251 if (svga->rebind.flags.texture_samplers) { in draw_vgpu9()
252 ret = svga_reemit_tss_bindings(svga); in draw_vgpu9()
258 if (svga->rebind.flags.vs) { in draw_vgpu9()
259 ret = svga_reemit_vs_bindings(svga); in draw_vgpu9()
265 if (svga->rebind.flags.fs) { in draw_vgpu9()
266 ret = svga_reemit_fs_bindings(svga); in draw_vgpu9()
273 svga->curr.framebuffer.cbufs[0] ? in draw_vgpu9()
274 svga_surface(svga->curr.framebuffer.cbufs[0])->handle : NULL, in draw_vgpu9()
346 validate_sampler_resources(struct svga_context *svga) in validate_sampler_resources() argument
350 assert(svga_have_vgpu10(svga)); in validate_sampler_resources()
353 unsigned count = svga->curr.num_sampler_views[shader]; in validate_sampler_resources()
364 svga_pipe_sampler_view(svga->curr.sampler_views[shader][i]); in validate_sampler_resources()
368 surfaces[i] = svga_buffer_handle(svga, sv->base.texture, in validate_sampler_resources()
381 svga->curr.rast->templ.poly_stipple_enable) { in validate_sampler_resources()
383 svga_fs_variant(svga->state.hw_draw.fs)->pstipple_sampler_unit; in validate_sampler_resources()
385 svga->polygon_stipple.sampler_view; in validate_sampler_resources()
393 if (svga->rebind.flags.texture_samplers) { in validate_sampler_resources()
396 ret = svga->swc->resource_rebind(svga->swc, in validate_sampler_resources()
406 svga->rebind.flags.texture_samplers = FALSE; in validate_sampler_resources()
413 validate_constant_buffers(struct svga_context *svga) in validate_constant_buffers() argument
417 assert(svga_have_vgpu10(svga)); in validate_constant_buffers()
424 if (svga->rebind.flags.constbufs) { in validate_constant_buffers()
425 buffer = svga_buffer(svga->state.hw_draw.constbuf[shader][0]); in validate_constant_buffers()
427 ret = svga->swc->resource_rebind(svga->swc, in validate_constant_buffers()
443 enabled_constbufs = svga->state.hw_draw.enabled_constbufs[shader] & ~1u; in validate_constant_buffers()
446 buffer = svga_buffer(svga->curr.constbufs[shader][i].buffer); in validate_constant_buffers()
452 handle = svga_buffer_handle(svga, &buffer->b.b, in validate_constant_buffers()
455 handle = svga->state.hw_draw.constbufoffsets[shader][i].handle; in validate_constant_buffers()
457 if (svga->rebind.flags.constbufs && handle) { in validate_constant_buffers()
458 ret = svga->swc->resource_rebind(svga->swc, in validate_constant_buffers()
467 svga->rebind.flags.constbufs = FALSE; in validate_constant_buffers()
484 last_command_was_draw(const struct svga_context *svga) in last_command_was_draw() argument
486 switch (SVGA3D_GetLastCommand(svga->swc)) { in last_command_was_draw()
526 struct svga_context *svga = hwtnl->svga; in validate_vertex_buffers() local
534 assert(svga_have_vgpu10(svga)); in validate_vertex_buffers()
548 vbuffer_handles[i] = svga_buffer_handle(svga, &sbuf->b.b, in validate_vertex_buffers()
563 for (; i < svga->state.hw_draw.num_vbuffers; i++) { in validate_vertex_buffers()
574 vbuffer_handles[i] = svga_buffer_handle(svga, &sbuf->b.b, in validate_vertex_buffers()
588 for (; i < svga->state.hw_draw.num_vbuffers; i++) { in validate_vertex_buffers()
594 if (svga->state.hw_draw.layout_id != hwtnl->cmd.vdecl_layout_id) { in validate_vertex_buffers()
596 SVGA3D_vgpu10_SetInputLayout(svga->swc, in validate_vertex_buffers()
601 svga->state.hw_draw.layout_id = hwtnl->cmd.vdecl_layout_id; in validate_vertex_buffers()
606 so_vertex_count_handle = svga_buffer_handle(svga, in validate_vertex_buffers()
642 if (vbuf_count != svga->state.hw_draw.num_vbuffers || in validate_vertex_buffers()
646 svga->state.hw_draw.vbuffer_attrs, in validate_vertex_buffers()
647 svga->state.hw_draw.vbuffers)) { in validate_vertex_buffers()
655 num_vbuffers = MAX2(vbuf_count, svga->state.hw_draw.num_vbuffers); in validate_vertex_buffers()
681 &svga->state.hw_draw.vbuffer_attrs[i], in validate_vertex_buffers()
682 &svga->state.hw_draw.vbuffers[i]); in validate_vertex_buffers()
700 SVGA3D_vgpu10_SetVertexBuffers(svga->swc, in validate_vertex_buffers()
718 svga->state.hw_draw.num_vbuffers = last_vbuf + 1; in validate_vertex_buffers()
719 memcpy(svga->state.hw_draw.vbuffer_attrs, vbuffer_attrs, in validate_vertex_buffers()
722 pipe_resource_reference(&svga->state.hw_draw.vbuffers[i], in validate_vertex_buffers()
732 if (vbuffer_handles[i] && !last_command_was_draw(svga)) { in validate_vertex_buffers()
734 svga->swc->resource_rebind(svga->swc, vbuffer_handles[i], in validate_vertex_buffers()
755 struct svga_context *svga = hwtnl->svga; in validate_index_buffer() local
757 svga_buffer_handle(svga, ib, PIPE_BIND_INDEX_BUFFER); in validate_index_buffer()
768 if (ib != svga->state.hw_draw.ib || in validate_index_buffer()
769 indexFormat != svga->state.hw_draw.ib_format || in validate_index_buffer()
770 range->indexArray.offset != svga->state.hw_draw.ib_offset) { in validate_index_buffer()
774 SVGA3D_vgpu10_SetIndexBuffer(svga->swc, ib_handle, in validate_index_buffer()
780 pipe_resource_reference(&svga->state.hw_draw.ib, ib); in validate_index_buffer()
781 svga->state.hw_draw.ib_format = indexFormat; in validate_index_buffer()
782 svga->state.hw_draw.ib_offset = range->indexArray.offset; in validate_index_buffer()
788 if (!last_command_was_draw(svga)) { in validate_index_buffer()
789 enum pipe_error ret = svga->swc->resource_rebind(svga->swc, in validate_index_buffer()
812 struct svga_context *svga = hwtnl->svga; in draw_vgpu10() local
816 assert(svga_have_vgpu10(svga)); in draw_vgpu10()
824 if (svga->rebind.val) { in draw_vgpu10()
825 ret = svga_rebind_framebuffer_bindings(svga); in draw_vgpu10()
829 ret = svga_rebind_shaders(svga); in draw_vgpu10()
834 ret = svga_rebind_stream_output_targets(svga); in draw_vgpu10()
845 ret = validate_sampler_resources(svga); in draw_vgpu10()
849 ret = validate_constant_buffers(svga); in draw_vgpu10()
864 indirect_handle = svga_buffer_handle(svga, indirect->buffer, in draw_vgpu10()
874 if (svga->state.hw_draw.topology != range->primType) { in draw_vgpu10()
875 ret = SVGA3D_vgpu10_SetTopology(svga->swc, range->primType); in draw_vgpu10()
879 svga->state.hw_draw.topology = range->primType; in draw_vgpu10()
885 ret = SVGA3D_sm5_DrawIndexedInstancedIndirect(svga->swc, in draw_vgpu10()
890 ret = SVGA3D_vgpu10_DrawIndexedInstanced(svga->swc, in draw_vgpu10()
899 ret = SVGA3D_vgpu10_DrawIndexed(svga->swc, in draw_vgpu10()
910 if (svga->state.hw_draw.ib_format != SVGA3D_FORMAT_INVALID || in draw_vgpu10()
911 svga->state.hw_draw.ib != NULL) { in draw_vgpu10()
913 ret = SVGA3D_vgpu10_SetIndexBuffer(svga->swc, NULL, in draw_vgpu10()
917 pipe_resource_reference(&svga->state.hw_draw.ib, NULL); in draw_vgpu10()
918 svga->state.hw_draw.ib_format = SVGA3D_FORMAT_INVALID; in draw_vgpu10()
921 assert(svga->state.hw_draw.ib == NULL); in draw_vgpu10()
925 ret = SVGA3D_vgpu10_DrawAuto(svga->swc); in draw_vgpu10()
928 ret = SVGA3D_sm5_DrawInstancedIndirect(svga->swc, in draw_vgpu10()
933 ret = SVGA3D_vgpu10_DrawInstanced(svga->swc, in draw_vgpu10()
941 ret = SVGA3D_vgpu10_Draw(svga->swc, in draw_vgpu10()
969 SVGA_STATS_TIME_PUSH(svga_sws(hwtnl->svga), SVGA_STATS_TIME_HWTNLFLUSH); in svga_hwtnl_flush()
971 if (!svga_have_vgpu10(hwtnl->svga) && hwtnl->cmd.prim_count) { in svga_hwtnl_flush()
976 SVGA_STATS_TIME_POP(svga_screen(hwtnl->svga->pipe.screen)->sws); in svga_hwtnl_flush()
1004 assert(!svga_have_vgpu10(hwtnl->svga)); in check_draw_params()
1157 SVGA_STATS_TIME_PUSH(svga_sws(hwtnl->svga), SVGA_STATS_TIME_HWTNLPRIM); in svga_hwtnl_prim()
1159 if (svga_have_vgpu10(hwtnl->svga)) { in svga_hwtnl_prim()
1161 SVGA_RETRY(hwtnl->svga, draw_vgpu10(hwtnl, range, vcount, min_index, in svga_hwtnl_prim()
1195 SVGA_STATS_TIME_POP(svga_screen(hwtnl->svga->pipe.screen)->sws); in svga_hwtnl_prim()