/external/chromium_org/third_party/mesa/src/src/gallium/drivers/svga/ |
D | svga_context.c | 56 struct svga_context *svga = svga_context( pipe ); in svga_destroy() local 59 svga_cleanup_framebuffer( svga ); in svga_destroy() 60 svga_cleanup_tss_binding( svga ); in svga_destroy() 62 svga_hwtnl_destroy( svga->hwtnl ); in svga_destroy() 64 svga_cleanup_vertex_state(svga); in svga_destroy() 66 svga->swc->destroy(svga->swc); in svga_destroy() 68 svga_destroy_swtnl( svga ); in svga_destroy() 70 u_upload_destroy( svga->upload_vb ); in svga_destroy() 71 u_upload_destroy( svga->upload_ib ); in svga_destroy() 73 util_bitmask_destroy( svga->vs_bm ); in svga_destroy() [all …]
|
D | svga_swtnl_draw.c | 39 svga_swtnl_draw_vbo(struct svga_context *svga, in svga_swtnl_draw_vbo() argument 45 struct draw_context *draw = svga->swtnl.draw; in svga_swtnl_draw_vbo() 50 assert(!svga->dirty); in svga_swtnl_draw_vbo() 51 assert(svga->state.sw.need_swtnl); in svga_swtnl_draw_vbo() 55 svga->state.sw.in_swtnl_draw = TRUE; in svga_swtnl_draw_vbo() 57 ret = svga_update_state(svga, SVGA_STATE_SWTNL_DRAW); in svga_swtnl_draw_vbo() 59 svga_context_flush(svga, NULL); in svga_swtnl_draw_vbo() 60 ret = svga_update_state(svga, SVGA_STATE_SWTNL_DRAW); in svga_swtnl_draw_vbo() 61 svga->swtnl.new_vbuf = TRUE; in svga_swtnl_draw_vbo() 68 for (i = 0; i < svga->curr.num_vertex_buffers; i++) { in svga_swtnl_draw_vbo() [all …]
|
D | svga_state_rss.c | 44 #define EMIT_RS(svga, value, token, fail) \ argument 46 assert(SVGA3D_RS_##token < Elements(svga->state.hw_draw.rs)); \ 47 if (svga->state.hw_draw.rs[SVGA3D_RS_##token] != value) { \ 49 svga->state.hw_draw.rs[SVGA3D_RS_##token] = value; \ 53 #define EMIT_RS_FLOAT(svga, fvalue, token, fail) \ argument 56 assert(SVGA3D_RS_##token < Elements(svga->state.hw_draw.rs)); \ 57 if (svga->state.hw_draw.rs[SVGA3D_RS_##token] != value) { \ 59 svga->state.hw_draw.rs[SVGA3D_RS_##token] = value; \ 80 emit_rss(struct svga_context *svga, unsigned dirty) in emit_rss() argument 82 struct svga_screen *screen = svga_screen(svga->pipe.screen); in emit_rss() [all …]
|
D | svga_pipe_draw.c | 56 svga_user_buffer_range(struct svga_context *svga, in svga_user_buffer_range() argument 61 const struct pipe_vertex_element *ve = svga->curr.velems->velem; in svga_user_buffer_range() 69 for (i=0; i < svga->curr.velems->count; i++) { in svga_user_buffer_range() 71 &svga->curr.vb[ve[i].vertex_buffer_index]; in svga_user_buffer_range() 82 for (i=0; i < svga->curr.velems->count; i++) { in svga_user_buffer_range() 84 &svga->curr.vb[ve[i].vertex_buffer_index]; in svga_user_buffer_range() 92 svga->dirty |= SVGA_NEW_VBUFFER; in svga_user_buffer_range() 117 svga_upload_user_buffers(struct svga_context *svga, in svga_upload_user_buffers() argument 122 const struct pipe_vertex_element *ve = svga->curr.velems->velem; in svga_upload_user_buffers() 126 svga_user_buffer_range(svga, start, count, instance_count); in svga_upload_user_buffers() [all …]
|
D | svga_state_need_swtnl.c | 75 update_need_swvfetch( struct svga_context *svga, in update_need_swvfetch() argument 81 if (!svga->curr.velems) { in update_need_swvfetch() 86 for (i = 0; i < svga->curr.velems->count; i++) { in update_need_swvfetch() 87 …svga->state.sw.ve_format[i] = svga_translate_vertex_format(svga->curr.velems->velem[i].src_format); in update_need_swvfetch() 88 if (svga->state.sw.ve_format[i] == SVGA3D_DECLTYPE_MAX) { in update_need_swvfetch() 95 if (need_swvfetch != svga->state.sw.need_swvfetch) { in update_need_swvfetch() 96 svga->state.sw.need_swvfetch = need_swvfetch; in update_need_swvfetch() 97 svga->dirty |= SVGA_NEW_NEED_SWVFETCH; in update_need_swvfetch() 115 update_need_pipeline( struct svga_context *svga, in update_need_pipeline() argument 120 struct svga_vertex_shader *vs = svga->curr.vs; in update_need_pipeline() [all …]
|
D | svga_state_tss.c | 38 void svga_cleanup_tss_binding(struct svga_context *svga) in svga_cleanup_tss_binding() argument 41 unsigned count = MAX2( svga->curr.num_sampler_views, in svga_cleanup_tss_binding() 42 svga->state.hw_draw.num_views ); in svga_cleanup_tss_binding() 45 struct svga_hw_view_state *view = &svga->state.hw_draw.views[i]; in svga_cleanup_tss_binding() 48 pipe_sampler_view_reference( &svga->curr.sampler_views[i], NULL ); in svga_cleanup_tss_binding() 67 update_tss_binding(struct svga_context *svga, in update_tss_binding() argument 70 boolean reemit = svga->rebind.texture_samplers; in update_tss_binding() 72 unsigned count = MAX2( svga->curr.num_sampler_views, in update_tss_binding() 73 svga->state.hw_draw.num_views ); in update_tss_binding() 82 const struct svga_sampler_state *s = svga->curr.sampler[i]; in update_tss_binding() [all …]
|
D | svga_pipe_vertex.c | 42 struct svga_context *svga = svga_context(pipe); in svga_set_vertex_buffers() local 47 if (count == svga->curr.num_vertex_buffers && in svga_set_vertex_buffers() 48 memcmp(svga->curr.vb, buffers, count * sizeof buffers[0]) == 0) in svga_set_vertex_buffers() 53 pipe_resource_reference(&svga->curr.vb[i].buffer, buffers[i].buffer); in svga_set_vertex_buffers() 58 for ( ; i < svga->curr.num_vertex_buffers; i++) in svga_set_vertex_buffers() 59 pipe_resource_reference(&svga->curr.vb[i].buffer, NULL); in svga_set_vertex_buffers() 62 memcpy(svga->curr.vb, buffers, count * sizeof buffers[0]); in svga_set_vertex_buffers() 63 svga->curr.num_vertex_buffers = count; in svga_set_vertex_buffers() 64 svga->curr.any_user_vertex_buffers = any_user_buffer; in svga_set_vertex_buffers() 66 svga->dirty |= SVGA_NEW_VBUFFER; in svga_set_vertex_buffers() [all …]
|
D | svga_swtnl_backend.c | 50 struct svga_context *svga = svga_render->svga; in svga_vbuf_render_get_vertex_info() local 52 svga_swtnl_update_vdecl(svga); in svga_vbuf_render_get_vertex_info() 64 struct svga_context *svga = svga_render->svga; in svga_vbuf_render_allocate_vertices() local 65 struct pipe_screen *screen = svga->pipe.screen; in svga_vbuf_render_allocate_vertices() 71 svga->swtnl.new_vdecl = TRUE; in svga_vbuf_render_allocate_vertices() 74 if (svga->swtnl.new_vbuf) in svga_vbuf_render_allocate_vertices() 76 svga->swtnl.new_vbuf = FALSE; in svga_vbuf_render_allocate_vertices() 93 svga_context_flush(svga, NULL); in svga_vbuf_render_allocate_vertices() 104 svga->swtnl.new_vdecl = TRUE; in svga_vbuf_render_allocate_vertices() 112 if (svga->swtnl.new_vdecl) in svga_vbuf_render_allocate_vertices() [all …]
|
D | svga_pipe_misc.c | 37 struct svga_context *svga = svga_context(pipe); in svga_set_scissor_state() local 39 memcpy( &svga->curr.scissor, scissor, sizeof(*scissor) ); in svga_set_scissor_state() 40 svga->dirty |= SVGA_NEW_SCISSOR; in svga_set_scissor_state() 51 void svga_cleanup_framebuffer(struct svga_context *svga) in svga_cleanup_framebuffer() argument 53 struct pipe_framebuffer_state *curr = &svga->curr.framebuffer; in svga_cleanup_framebuffer() 54 struct pipe_framebuffer_state *hw = &svga->state.hw_clear.framebuffer; in svga_cleanup_framebuffer() 75 struct svga_context *svga = svga_context(pipe); in svga_set_framebuffer_state() local 76 struct pipe_framebuffer_state *dst = &svga->curr.framebuffer; in svga_set_framebuffer_state() 93 svga_hwtnl_flush_retry( svga ); in svga_set_framebuffer_state() 97 svga_propagate_surface(svga, dst->cbufs[i]); in svga_set_framebuffer_state() [all …]
|
D | svga_swtnl_state.c | 48 static void set_draw_viewport( struct svga_context *svga ) in set_draw_viewport() argument 50 struct pipe_viewport_state vp = svga->curr.viewport; in set_draw_viewport() 54 switch (svga->curr.reduced_prim) { in set_draw_viewport() 64 if (svga->curr.rast->need_pipeline & SVGA_PIPELINE_FLAG_LINES) in set_draw_viewport() 83 draw_set_viewport_state(svga->swtnl.draw, &vp); in set_draw_viewport() 87 update_swtnl_draw( struct svga_context *svga, in update_swtnl_draw() argument 90 draw_flush( svga->swtnl.draw ); in update_swtnl_draw() 93 draw_bind_vertex_shader(svga->swtnl.draw, in update_swtnl_draw() 94 svga->curr.vs->draw_shader); in update_swtnl_draw() 97 draw_bind_fragment_shader(svga->swtnl.draw, in update_swtnl_draw() [all …]
|
D | svga_state_fs.c | 103 static enum pipe_error compile_fs( struct svga_context *svga, in compile_fs() argument 129 result->id = util_bitmask_add(svga->fs_bm); in compile_fs() 135 ret = SVGA3D_DefineShader(svga->swc, in compile_fs() 151 util_bitmask_clear( svga->fs_bm, result->id ); in compile_fs() 164 make_fs_key(const struct svga_context *svga, in make_fs_key() argument 178 if (!svga->state.sw.need_swtnl) { in make_fs_key() 181 key->light_twoside = svga->curr.rast->templ.light_twoside; in make_fs_key() 182 key->front_ccw = svga->curr.rast->templ.front_ccw; in make_fs_key() 199 if (svga->curr.blend->need_white_fragments) { in make_fs_key() 208 for (i = 0; i < svga->curr.num_sampler_views; i++) { in make_fs_key() [all …]
|
D | svga_state.c | 122 update_state(struct svga_context *svga, in update_state() argument 130 ret = svga_hwtnl_flush( svga->hwtnl ); in update_state() 153 ret = atoms[i]->update( svga, *state ); in update_state() 176 ret = atoms[i]->update( svga, *state ); in update_state() 189 svga_update_state(struct svga_context *svga, unsigned max_level) in svga_update_state() argument 191 struct svga_screen *screen = svga_screen(svga->pipe.screen); in svga_update_state() 199 if (svga->state.texture_timestamp != screen->texture_timestamp) { in svga_update_state() 200 svga->state.texture_timestamp = screen->texture_timestamp; in svga_update_state() 201 svga->dirty |= SVGA_NEW_TEXTURE; in svga_update_state() 205 svga->dirty |= svga->state.dirty[i]; in svga_update_state() [all …]
|
D | svga_pipe_fs.c | 48 struct svga_context *svga = svga_context(pipe); in svga_create_fs_state() local 61 fs->base.id = svga->debug.shader_id++; in svga_create_fs_state() 67 fs->draw_shader = draw_create_fragment_shader(svga->swtnl.draw, templ); in svga_create_fs_state() 82 struct svga_context *svga = svga_context(pipe); in svga_bind_fs_state() local 84 svga->curr.fs = fs; in svga_bind_fs_state() 85 svga->dirty |= SVGA_NEW_FS; in svga_bind_fs_state() 91 struct svga_context *svga = svga_context(pipe); in svga_delete_fs_state() local 96 svga_hwtnl_flush_retry( svga ); in svga_delete_fs_state() 98 draw_delete_fragment_shader(svga->swtnl.draw, fs->draw_shader); in svga_delete_fs_state() 103 ret = SVGA3D_DestroyShader(svga->swc, in svga_delete_fs_state() [all …]
|
/external/mesa3d/src/gallium/drivers/svga/ |
D | svga_context.c | 56 struct svga_context *svga = svga_context( pipe ); in svga_destroy() local 59 svga_cleanup_framebuffer( svga ); in svga_destroy() 60 svga_cleanup_tss_binding( svga ); in svga_destroy() 62 svga_hwtnl_destroy( svga->hwtnl ); in svga_destroy() 64 svga_cleanup_vertex_state(svga); in svga_destroy() 66 svga->swc->destroy(svga->swc); in svga_destroy() 68 svga_destroy_swtnl( svga ); in svga_destroy() 70 u_upload_destroy( svga->upload_vb ); in svga_destroy() 71 u_upload_destroy( svga->upload_ib ); in svga_destroy() 73 util_bitmask_destroy( svga->vs_bm ); in svga_destroy() [all …]
|
D | svga_swtnl_draw.c | 39 svga_swtnl_draw_vbo(struct svga_context *svga, in svga_swtnl_draw_vbo() argument 45 struct draw_context *draw = svga->swtnl.draw; in svga_swtnl_draw_vbo() 50 assert(!svga->dirty); in svga_swtnl_draw_vbo() 51 assert(svga->state.sw.need_swtnl); in svga_swtnl_draw_vbo() 55 svga->state.sw.in_swtnl_draw = TRUE; in svga_swtnl_draw_vbo() 57 ret = svga_update_state(svga, SVGA_STATE_SWTNL_DRAW); in svga_swtnl_draw_vbo() 59 svga_context_flush(svga, NULL); in svga_swtnl_draw_vbo() 60 ret = svga_update_state(svga, SVGA_STATE_SWTNL_DRAW); in svga_swtnl_draw_vbo() 61 svga->swtnl.new_vbuf = TRUE; in svga_swtnl_draw_vbo() 68 for (i = 0; i < svga->curr.num_vertex_buffers; i++) { in svga_swtnl_draw_vbo() [all …]
|
D | svga_state_rss.c | 44 #define EMIT_RS(svga, value, token, fail) \ argument 46 assert(SVGA3D_RS_##token < Elements(svga->state.hw_draw.rs)); \ 47 if (svga->state.hw_draw.rs[SVGA3D_RS_##token] != value) { \ 49 svga->state.hw_draw.rs[SVGA3D_RS_##token] = value; \ 53 #define EMIT_RS_FLOAT(svga, fvalue, token, fail) \ argument 56 assert(SVGA3D_RS_##token < Elements(svga->state.hw_draw.rs)); \ 57 if (svga->state.hw_draw.rs[SVGA3D_RS_##token] != value) { \ 59 svga->state.hw_draw.rs[SVGA3D_RS_##token] = value; \ 80 emit_rss(struct svga_context *svga, unsigned dirty) in emit_rss() argument 82 struct svga_screen *screen = svga_screen(svga->pipe.screen); in emit_rss() [all …]
|
D | svga_pipe_draw.c | 56 svga_user_buffer_range(struct svga_context *svga, in svga_user_buffer_range() argument 61 const struct pipe_vertex_element *ve = svga->curr.velems->velem; in svga_user_buffer_range() 69 for (i=0; i < svga->curr.velems->count; i++) { in svga_user_buffer_range() 71 &svga->curr.vb[ve[i].vertex_buffer_index]; in svga_user_buffer_range() 82 for (i=0; i < svga->curr.velems->count; i++) { in svga_user_buffer_range() 84 &svga->curr.vb[ve[i].vertex_buffer_index]; in svga_user_buffer_range() 92 svga->dirty |= SVGA_NEW_VBUFFER; in svga_user_buffer_range() 117 svga_upload_user_buffers(struct svga_context *svga, in svga_upload_user_buffers() argument 122 const struct pipe_vertex_element *ve = svga->curr.velems->velem; in svga_upload_user_buffers() 126 svga_user_buffer_range(svga, start, count, instance_count); in svga_upload_user_buffers() [all …]
|
D | svga_state_need_swtnl.c | 75 update_need_swvfetch( struct svga_context *svga, in update_need_swvfetch() argument 81 if (!svga->curr.velems) { in update_need_swvfetch() 86 for (i = 0; i < svga->curr.velems->count; i++) { in update_need_swvfetch() 87 …svga->state.sw.ve_format[i] = svga_translate_vertex_format(svga->curr.velems->velem[i].src_format); in update_need_swvfetch() 88 if (svga->state.sw.ve_format[i] == SVGA3D_DECLTYPE_MAX) { in update_need_swvfetch() 95 if (need_swvfetch != svga->state.sw.need_swvfetch) { in update_need_swvfetch() 96 svga->state.sw.need_swvfetch = need_swvfetch; in update_need_swvfetch() 97 svga->dirty |= SVGA_NEW_NEED_SWVFETCH; in update_need_swvfetch() 115 update_need_pipeline( struct svga_context *svga, in update_need_pipeline() argument 120 struct svga_vertex_shader *vs = svga->curr.vs; in update_need_pipeline() [all …]
|
D | svga_state_tss.c | 38 void svga_cleanup_tss_binding(struct svga_context *svga) in svga_cleanup_tss_binding() argument 41 unsigned count = MAX2( svga->curr.num_sampler_views, in svga_cleanup_tss_binding() 42 svga->state.hw_draw.num_views ); in svga_cleanup_tss_binding() 45 struct svga_hw_view_state *view = &svga->state.hw_draw.views[i]; in svga_cleanup_tss_binding() 48 pipe_sampler_view_reference( &svga->curr.sampler_views[i], NULL ); in svga_cleanup_tss_binding() 67 update_tss_binding(struct svga_context *svga, in update_tss_binding() argument 70 boolean reemit = svga->rebind.texture_samplers; in update_tss_binding() 72 unsigned count = MAX2( svga->curr.num_sampler_views, in update_tss_binding() 73 svga->state.hw_draw.num_views ); in update_tss_binding() 82 const struct svga_sampler_state *s = svga->curr.sampler[i]; in update_tss_binding() [all …]
|
D | svga_pipe_vertex.c | 42 struct svga_context *svga = svga_context(pipe); in svga_set_vertex_buffers() local 47 if (count == svga->curr.num_vertex_buffers && in svga_set_vertex_buffers() 48 memcmp(svga->curr.vb, buffers, count * sizeof buffers[0]) == 0) in svga_set_vertex_buffers() 53 pipe_resource_reference(&svga->curr.vb[i].buffer, buffers[i].buffer); in svga_set_vertex_buffers() 58 for ( ; i < svga->curr.num_vertex_buffers; i++) in svga_set_vertex_buffers() 59 pipe_resource_reference(&svga->curr.vb[i].buffer, NULL); in svga_set_vertex_buffers() 62 memcpy(svga->curr.vb, buffers, count * sizeof buffers[0]); in svga_set_vertex_buffers() 63 svga->curr.num_vertex_buffers = count; in svga_set_vertex_buffers() 64 svga->curr.any_user_vertex_buffers = any_user_buffer; in svga_set_vertex_buffers() 66 svga->dirty |= SVGA_NEW_VBUFFER; in svga_set_vertex_buffers() [all …]
|
D | svga_swtnl_backend.c | 50 struct svga_context *svga = svga_render->svga; in svga_vbuf_render_get_vertex_info() local 52 svga_swtnl_update_vdecl(svga); in svga_vbuf_render_get_vertex_info() 64 struct svga_context *svga = svga_render->svga; in svga_vbuf_render_allocate_vertices() local 65 struct pipe_screen *screen = svga->pipe.screen; in svga_vbuf_render_allocate_vertices() 71 svga->swtnl.new_vdecl = TRUE; in svga_vbuf_render_allocate_vertices() 74 if (svga->swtnl.new_vbuf) in svga_vbuf_render_allocate_vertices() 76 svga->swtnl.new_vbuf = FALSE; in svga_vbuf_render_allocate_vertices() 93 svga_context_flush(svga, NULL); in svga_vbuf_render_allocate_vertices() 104 svga->swtnl.new_vdecl = TRUE; in svga_vbuf_render_allocate_vertices() 112 if (svga->swtnl.new_vdecl) in svga_vbuf_render_allocate_vertices() [all …]
|
D | svga_pipe_misc.c | 37 struct svga_context *svga = svga_context(pipe); in svga_set_scissor_state() local 39 memcpy( &svga->curr.scissor, scissor, sizeof(*scissor) ); in svga_set_scissor_state() 40 svga->dirty |= SVGA_NEW_SCISSOR; in svga_set_scissor_state() 51 void svga_cleanup_framebuffer(struct svga_context *svga) in svga_cleanup_framebuffer() argument 53 struct pipe_framebuffer_state *curr = &svga->curr.framebuffer; in svga_cleanup_framebuffer() 54 struct pipe_framebuffer_state *hw = &svga->state.hw_clear.framebuffer; in svga_cleanup_framebuffer() 75 struct svga_context *svga = svga_context(pipe); in svga_set_framebuffer_state() local 76 struct pipe_framebuffer_state *dst = &svga->curr.framebuffer; in svga_set_framebuffer_state() 93 svga_hwtnl_flush_retry( svga ); in svga_set_framebuffer_state() 97 svga_propagate_surface(svga, dst->cbufs[i]); in svga_set_framebuffer_state() [all …]
|
D | svga_swtnl_state.c | 48 static void set_draw_viewport( struct svga_context *svga ) in set_draw_viewport() argument 50 struct pipe_viewport_state vp = svga->curr.viewport; in set_draw_viewport() 54 switch (svga->curr.reduced_prim) { in set_draw_viewport() 64 if (svga->curr.rast->need_pipeline & SVGA_PIPELINE_FLAG_LINES) in set_draw_viewport() 83 draw_set_viewport_state(svga->swtnl.draw, &vp); in set_draw_viewport() 87 update_swtnl_draw( struct svga_context *svga, in update_swtnl_draw() argument 90 draw_flush( svga->swtnl.draw ); in update_swtnl_draw() 93 draw_bind_vertex_shader(svga->swtnl.draw, in update_swtnl_draw() 94 svga->curr.vs->draw_shader); in update_swtnl_draw() 97 draw_bind_fragment_shader(svga->swtnl.draw, in update_swtnl_draw() [all …]
|
D | svga_state_fs.c | 103 static enum pipe_error compile_fs( struct svga_context *svga, in compile_fs() argument 129 result->id = util_bitmask_add(svga->fs_bm); in compile_fs() 135 ret = SVGA3D_DefineShader(svga->swc, in compile_fs() 151 util_bitmask_clear( svga->fs_bm, result->id ); in compile_fs() 164 make_fs_key(const struct svga_context *svga, in make_fs_key() argument 178 if (!svga->state.sw.need_swtnl) { in make_fs_key() 181 key->light_twoside = svga->curr.rast->templ.light_twoside; in make_fs_key() 182 key->front_ccw = svga->curr.rast->templ.front_ccw; in make_fs_key() 199 if (svga->curr.blend->need_white_fragments) { in make_fs_key() 208 for (i = 0; i < svga->curr.num_sampler_views; i++) { in make_fs_key() [all …]
|
D | svga_state.c | 122 update_state(struct svga_context *svga, in update_state() argument 130 ret = svga_hwtnl_flush( svga->hwtnl ); in update_state() 153 ret = atoms[i]->update( svga, *state ); in update_state() 176 ret = atoms[i]->update( svga, *state ); in update_state() 189 svga_update_state(struct svga_context *svga, unsigned max_level) in svga_update_state() argument 191 struct svga_screen *screen = svga_screen(svga->pipe.screen); in svga_update_state() 199 if (svga->state.texture_timestamp != screen->texture_timestamp) { in svga_update_state() 200 svga->state.texture_timestamp = screen->texture_timestamp; in svga_update_state() 201 svga->dirty |= SVGA_NEW_TEXTURE; in svga_update_state() 205 svga->dirty |= svga->state.dirty[i]; in svga_update_state() [all …]
|