• Home
  • Raw
  • Download

Lines Matching refs:r300

38 void r300_emit_blend_state(struct r300_context* r300,  in r300_emit_blend_state()  argument
43 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_blend_state()
45 CS_LOCALS(r300); in r300_emit_blend_state()
63 void r300_emit_blend_color_state(struct r300_context* r300, in r300_emit_blend_color_state() argument
67 CS_LOCALS(r300); in r300_emit_blend_color_state()
72 void r300_emit_clip_state(struct r300_context* r300, in r300_emit_clip_state() argument
76 CS_LOCALS(r300); in r300_emit_clip_state()
81 void r300_emit_dsa_state(struct r300_context* r300, unsigned size, void* state) in r300_emit_dsa_state() argument
85 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_dsa_state()
86 boolean is_r500 = r300->screen->caps.is_r500; in r300_emit_dsa_state()
87 CS_LOCALS(r300); in r300_emit_dsa_state()
105 if (r300->alpha_to_coverage && r300->msaa_enable) { in r300_emit_dsa_state()
119 struct r300_context * r300, in get_rc_constant_state() argument
122 struct r300_textures_state* texstate = r300->textures_state.state; in get_rc_constant_state()
152 vec[0] = r300->viewport.scale[0]; in get_rc_constant_state()
153 vec[1] = r300->viewport.scale[1]; in get_rc_constant_state()
154 vec[2] = r300->viewport.scale[2]; in get_rc_constant_state()
159 vec[0] = r300->viewport.translate[0]; in get_rc_constant_state()
160 vec[1] = r300->viewport.translate[1]; in get_rc_constant_state()
161 vec[2] = r300->viewport.translate[2]; in get_rc_constant_state()
209 void r300_emit_fs(struct r300_context* r300, unsigned size, void *state) in r300_emit_fs() argument
211 struct r300_fragment_shader *fs = r300_fs(r300); in r300_emit_fs()
212 CS_LOCALS(r300); in r300_emit_fs()
217 void r300_emit_fs_constants(struct r300_context* r300, unsigned size, void *state) in r300_emit_fs_constants() argument
219 struct r300_fragment_shader *fs = r300_fs(r300); in r300_emit_fs_constants()
223 CS_LOCALS(r300); in r300_emit_fs_constants()
245 void r300_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, void *state) in r300_emit_fs_rc_constant_state() argument
247 struct r300_fragment_shader *fs = r300_fs(r300); in r300_emit_fs_rc_constant_state()
254 CS_LOCALS(r300); in r300_emit_fs_rc_constant_state()
264 get_rc_constant_state(data, r300, &constants->Constants[i]); in r300_emit_fs_rc_constant_state()
274 void r500_emit_fs(struct r300_context* r300, unsigned size, void *state) in r500_emit_fs() argument
276 struct r300_fragment_shader *fs = r300_fs(r300); in r500_emit_fs()
277 CS_LOCALS(r300); in r500_emit_fs()
282 void r500_emit_fs_constants(struct r300_context* r300, unsigned size, void *state) in r500_emit_fs_constants() argument
284 struct r300_fragment_shader *fs = r300_fs(r300); in r500_emit_fs_constants()
287 CS_LOCALS(r300); in r500_emit_fs_constants()
306 void r500_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, void *state) in r500_emit_fs_rc_constant_state() argument
308 struct r300_fragment_shader *fs = r300_fs(r300); in r500_emit_fs_rc_constant_state()
314 CS_LOCALS(r300); in r500_emit_fs_rc_constant_state()
324 get_rc_constant_state(data, r300, &constants->Constants[i]); in r500_emit_fs_rc_constant_state()
336 void r300_emit_gpu_flush(struct r300_context *r300, unsigned size, void *state) in r300_emit_gpu_flush() argument
340 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_gpu_flush()
343 CS_LOCALS(r300); in r300_emit_gpu_flush()
345 if (r300->cbzb_clear) { in r300_emit_gpu_flush()
352 DBG(r300, DBG_SCISSOR, in r300_emit_gpu_flush()
354 width, height, r300->cbzb_clear ? "YES" : "NO"); in r300_emit_gpu_flush()
361 if (r300->screen->caps.is_r500) { in r300_emit_gpu_flush()
377 void r300_emit_aa_state(struct r300_context *r300, unsigned size, void *state) in r300_emit_aa_state() argument
380 CS_LOCALS(r300); in r300_emit_aa_state()
399 void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state) in r300_emit_fb_state() argument
406 CS_LOCALS(r300); in r300_emit_fb_state()
410 if (r300->screen->caps.is_r500) { in r300_emit_fb_state()
414 if (fb->nr_cbufs && r300->fb_multiwrite) { in r300_emit_fb_state()
417 if (r300->cmask_in_use) { in r300_emit_fb_state()
434 if (r300->cmask_in_use && i == 0) { in r300_emit_fb_state()
437 OUT_CS_REG(R300_RB3D_COLOR_CLEAR_VALUE, r300->color_clear_value); in r300_emit_fb_state()
438 if (r300->screen->caps.is_r500 && r300->screen->info.drm_minor >= 29) { in r300_emit_fb_state()
440 OUT_CS(r300->color_clear_value_ar); in r300_emit_fb_state()
441 OUT_CS(r300->color_clear_value_gb); in r300_emit_fb_state()
447 if (r300->cbzb_clear) { in r300_emit_fb_state()
458 DBG(r300, DBG_CBZB, in r300_emit_fb_state()
474 if (r300->hyperz_enabled) { in r300_emit_fb_state()
487 void r300_emit_hyperz_state(struct r300_context *r300, in r300_emit_hyperz_state() argument
491 CS_LOCALS(r300); in r300_emit_hyperz_state()
499 void r300_emit_hyperz_end(struct r300_context *r300) in r300_emit_hyperz_end() argument
502 *(struct r300_hyperz_state*)r300->hyperz_state.state; in r300_emit_hyperz_end()
510 r300_emit_hyperz_state(r300, r300->hyperz_state.size, &z); in r300_emit_hyperz_end()
566 void r300_emit_fb_state_pipelined(struct r300_context *r300, in r300_emit_fb_state_pipelined() argument
590 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_fb_state_pipelined()
593 CS_LOCALS(r300); in r300_emit_fb_state_pipelined()
597 if (r300->fb_multiwrite) { in r300_emit_fb_state_pipelined()
621 switch (r300->num_samples) { in r300_emit_fb_state_pipelined()
646 void r300_emit_query_start(struct r300_context *r300, unsigned size, void*state) in r300_emit_query_start() argument
648 struct r300_query *query = r300->query_current; in r300_emit_query_start()
649 CS_LOCALS(r300); in r300_emit_query_start()
655 if (r300->screen->caps.family == CHIP_RV530) { in r300_emit_query_start()
665 static void r300_emit_query_end_frag_pipes(struct r300_context *r300, in r300_emit_query_end_frag_pipes() argument
668 struct r300_capabilities* caps = &r300->screen->caps; in r300_emit_query_end_frag_pipes()
669 uint32_t gb_pipes = r300->screen->info.r300_num_gb_pipes; in r300_emit_query_end_frag_pipes()
670 CS_LOCALS(r300); in r300_emit_query_end_frag_pipes()
688 OUT_CS_RELOC(r300->query_current); in r300_emit_query_end_frag_pipes()
694 OUT_CS_RELOC(r300->query_current); in r300_emit_query_end_frag_pipes()
702 OUT_CS_RELOC(r300->query_current); in r300_emit_query_end_frag_pipes()
708 OUT_CS_RELOC(r300->query_current); in r300_emit_query_end_frag_pipes()
721 static void rv530_emit_query_end_single_z(struct r300_context *r300, in rv530_emit_query_end_single_z() argument
724 CS_LOCALS(r300); in rv530_emit_query_end_single_z()
729 OUT_CS_RELOC(r300->query_current); in rv530_emit_query_end_single_z()
734 static void rv530_emit_query_end_double_z(struct r300_context *r300, in rv530_emit_query_end_double_z() argument
737 CS_LOCALS(r300); in rv530_emit_query_end_double_z()
742 OUT_CS_RELOC(r300->query_current); in rv530_emit_query_end_double_z()
745 OUT_CS_RELOC(r300->query_current); in rv530_emit_query_end_double_z()
750 void r300_emit_query_end(struct r300_context* r300) in r300_emit_query_end() argument
752 struct r300_capabilities *caps = &r300->screen->caps; in r300_emit_query_end()
753 struct r300_query *query = r300->query_current; in r300_emit_query_end()
762 if (r300->screen->info.r300_num_z_pipes == 2) in r300_emit_query_end()
763 rv530_emit_query_end_double_z(r300, query); in r300_emit_query_end()
765 rv530_emit_query_end_single_z(r300, query); in r300_emit_query_end()
767 r300_emit_query_end_frag_pipes(r300, query); in r300_emit_query_end()
779 void r300_emit_invariant_state(struct r300_context *r300, in r300_emit_invariant_state() argument
782 CS_LOCALS(r300); in r300_emit_invariant_state()
786 void r300_emit_rs_state(struct r300_context* r300, unsigned size, void* state) in r300_emit_rs_state() argument
789 CS_LOCALS(r300); in r300_emit_rs_state()
794 if (r300->zbuffer_bpp == 16) { in r300_emit_rs_state()
803 void r300_emit_rs_block_state(struct r300_context* r300, in r300_emit_rs_block_state() argument
810 CS_LOCALS(r300); in r300_emit_rs_block_state()
812 if (DBG_ON(r300, DBG_RS_BLOCK)) { in r300_emit_rs_block_state()
837 if (r300->screen->caps.is_r500) { in r300_emit_rs_block_state()
848 if (r300->screen->caps.is_r500) { in r300_emit_rs_block_state()
857 void r300_emit_sample_mask(struct r300_context *r300, in r300_emit_sample_mask() argument
861 CS_LOCALS(r300); in r300_emit_sample_mask()
869 void r300_emit_scissor_state(struct r300_context* r300, in r300_emit_scissor_state() argument
873 CS_LOCALS(r300); in r300_emit_scissor_state()
877 if (r300->screen->caps.is_r500) { in r300_emit_scissor_state()
891 void r300_emit_textures_state(struct r300_context *r300, in r300_emit_textures_state() argument
898 boolean has_us_format = r300->screen->caps.has_us_format; in r300_emit_textures_state()
899 CS_LOCALS(r300); in r300_emit_textures_state()
930 void r300_emit_vertex_arrays(struct r300_context* r300, int offset, in r300_emit_vertex_arrays() argument
933 struct pipe_vertex_buffer *vbuf = r300->vertex_buffer; in r300_emit_vertex_arrays()
934 struct pipe_vertex_element *velem = r300->velems->velem; in r300_emit_vertex_arrays()
937 unsigned vertex_array_count = r300->velems->count; in r300_emit_vertex_arrays()
940 unsigned *hw_format_size = r300->velems->format_size; in r300_emit_vertex_arrays()
942 CS_LOCALS(r300); in r300_emit_vertex_arrays()
1030 void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed) in r300_emit_vertex_arrays_swtcl() argument
1032 CS_LOCALS(r300); in r300_emit_vertex_arrays_swtcl()
1034 DBG(r300, DBG_SWTCL, "r300: Preparing vertex buffer %p for render, " in r300_emit_vertex_arrays_swtcl()
1035 "vertex size %d\n", r300->vbo, in r300_emit_vertex_arrays_swtcl()
1036 r300->vertex_info.size); in r300_emit_vertex_arrays_swtcl()
1047 OUT_CS(r300->vertex_info.size | in r300_emit_vertex_arrays_swtcl()
1048 (r300->vertex_info.size << 8)); in r300_emit_vertex_arrays_swtcl()
1049 OUT_CS(r300->draw_vbo_offset); in r300_emit_vertex_arrays_swtcl()
1052 assert(r300->vbo); in r300_emit_vertex_arrays_swtcl()
1054 OUT_CS(r300->rws->cs_lookup_buffer(r300->cs, r300->vbo) * 4); in r300_emit_vertex_arrays_swtcl()
1058 void r300_emit_vertex_stream_state(struct r300_context* r300, in r300_emit_vertex_stream_state() argument
1064 CS_LOCALS(r300); in r300_emit_vertex_stream_state()
1066 if (DBG_ON(r300, DBG_PSC)) { in r300_emit_vertex_stream_state()
1088 void r300_emit_pvs_flush(struct r300_context* r300, unsigned size, void* state) in r300_emit_pvs_flush() argument
1090 CS_LOCALS(r300); in r300_emit_pvs_flush()
1097 void r300_emit_vap_invariant_state(struct r300_context *r300, in r300_emit_vap_invariant_state() argument
1100 CS_LOCALS(r300); in r300_emit_vap_invariant_state()
1104 void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state) in r300_emit_vs_state() argument
1108 struct r300_screen* r300screen = r300->screen; in r300_emit_vs_state()
1120 CS_LOCALS(r300); in r300_emit_vs_state()
1141 (r300->clip_halfz ? R300_DX_CLIP_SPACE_DEF : 0) | in r300_emit_vs_state()
1152 OUT_CS_TABLE(code->fc_op_addrs.r300, R300_VS_MAX_FC_OPS); in r300_emit_vs_state()
1160 void r300_emit_vs_constants(struct r300_context* r300, in r300_emit_vs_constants() argument
1164 ((struct r300_vertex_shader*)r300->vs_state.state)->externals_count; in r300_emit_vs_constants()
1166 struct r300_vertex_shader *vs = (struct r300_vertex_shader*)r300->vs_state.state; in r300_emit_vs_constants()
1171 CS_LOCALS(r300); in r300_emit_vs_constants()
1179 (r300->screen->caps.is_r500 ? in r300_emit_vs_constants()
1195 (r300->screen->caps.is_r500 ? in r300_emit_vs_constants()
1207 void r300_emit_viewport_state(struct r300_context* r300, in r300_emit_viewport_state() argument
1211 CS_LOCALS(r300); in r300_emit_viewport_state()
1220 void r300_emit_hiz_clear(struct r300_context *r300, unsigned size, void *state) in r300_emit_hiz_clear() argument
1223 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_hiz_clear()
1225 CS_LOCALS(r300); in r300_emit_hiz_clear()
1233 OUT_CS(r300->hiz_clear_value); in r300_emit_hiz_clear()
1237 r300->hiz_in_use = TRUE; in r300_emit_hiz_clear()
1238 r300->hiz_func = HIZ_FUNC_NONE; in r300_emit_hiz_clear()
1239 r300_mark_atom_dirty(r300, &r300->hyperz_state); in r300_emit_hiz_clear()
1242 void r300_emit_zmask_clear(struct r300_context *r300, unsigned size, void *state) in r300_emit_zmask_clear() argument
1245 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_zmask_clear()
1247 CS_LOCALS(r300); in r300_emit_zmask_clear()
1259 r300->zmask_in_use = TRUE; in r300_emit_zmask_clear()
1260 r300_mark_atom_dirty(r300, &r300->hyperz_state); in r300_emit_zmask_clear()
1263 void r300_emit_cmask_clear(struct r300_context *r300, unsigned size, void *state) in r300_emit_cmask_clear() argument
1266 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_cmask_clear()
1268 CS_LOCALS(r300); in r300_emit_cmask_clear()
1280 r300->cmask_in_use = TRUE; in r300_emit_cmask_clear()
1281 r300_mark_fb_state_dirty(r300, R300_CHANGED_CMASK_ENABLE); in r300_emit_cmask_clear()
1284 void r300_emit_ztop_state(struct r300_context* r300, in r300_emit_ztop_state() argument
1288 CS_LOCALS(r300); in r300_emit_ztop_state()
1295 void r300_emit_texture_cache_inval(struct r300_context* r300, unsigned size, void* state) in r300_emit_texture_cache_inval() argument
1297 CS_LOCALS(r300); in r300_emit_texture_cache_inval()
1304 boolean r300_emit_buffer_validate(struct r300_context *r300, in r300_emit_buffer_validate() argument
1309 (struct pipe_framebuffer_state*)r300->fb_state.state; in r300_emit_buffer_validate()
1310 struct r300_aa_state *aa = (struct r300_aa_state*)r300->aa_state.state; in r300_emit_buffer_validate()
1312 (struct r300_textures_state*)r300->textures_state.state; in r300_emit_buffer_validate()
1318 if (r300->fb_state.dirty) { in r300_emit_buffer_validate()
1325 r300->rws->cs_add_buffer(r300->cs, tex->buf, in r300_emit_buffer_validate()
1336 r300->rws->cs_add_buffer(r300->cs, tex->buf, in r300_emit_buffer_validate()
1345 if (r300->aa_state.dirty) { in r300_emit_buffer_validate()
1347 r300->rws->cs_add_buffer(r300->cs, aa->dest->buf, in r300_emit_buffer_validate()
1353 if (r300->textures_state.dirty) { in r300_emit_buffer_validate()
1361 r300->rws->cs_add_buffer(r300->cs, tex->buf, in r300_emit_buffer_validate()
1367 if (r300->query_current) in r300_emit_buffer_validate()
1368 r300->rws->cs_add_buffer(r300->cs, r300->query_current->buf, in r300_emit_buffer_validate()
1373 if (r300->vbo) in r300_emit_buffer_validate()
1374 r300->rws->cs_add_buffer(r300->cs, r300->vbo, in r300_emit_buffer_validate()
1379 if (do_validate_vertex_buffers && r300->vertex_arrays_dirty) { in r300_emit_buffer_validate()
1380 struct pipe_vertex_buffer *vbuf = r300->vertex_buffer; in r300_emit_buffer_validate()
1381 struct pipe_vertex_buffer *last = r300->vertex_buffer + in r300_emit_buffer_validate()
1382 r300->nr_vertex_buffers; in r300_emit_buffer_validate()
1390 r300->rws->cs_add_buffer(r300->cs, r300_resource(buf)->buf, in r300_emit_buffer_validate()
1398 r300->rws->cs_add_buffer(r300->cs, r300_resource(index_buffer)->buf, in r300_emit_buffer_validate()
1404 if (!r300->rws->cs_validate(r300->cs)) { in r300_emit_buffer_validate()
1416 unsigned r300_get_num_dirty_dwords(struct r300_context *r300) in r300_get_num_dirty_dwords() argument
1421 foreach_dirty_atom(r300, atom) { in r300_get_num_dirty_dwords()
1433 unsigned r300_get_num_cs_end_dwords(struct r300_context *r300) in r300_get_num_cs_end_dwords() argument
1439 dwords += r300->hyperz_state.size + 2; /* emit_hyperz_end + zcache flush */ in r300_get_num_cs_end_dwords()
1440 if (r300->screen->caps.is_r500) in r300_get_num_cs_end_dwords()
1448 void r300_emit_dirty_state(struct r300_context* r300) in r300_emit_dirty_state() argument
1452 foreach_dirty_atom(r300, atom) { in r300_emit_dirty_state()
1454 atom->emit(r300, atom->size, atom->state); in r300_emit_dirty_state()
1459 r300->first_dirty = NULL; in r300_emit_dirty_state()
1460 r300->last_dirty = NULL; in r300_emit_dirty_state()
1461 r300->dirty_hw++; in r300_emit_dirty_state()