Lines Matching full:r300
35 3. on R300/400, HiZ is disabled if depth test is EQUAL
42 static enum r300_hiz_func r300_get_hiz_func(struct r300_context *r300)
44 struct r300_dsa_state *dsa = r300->dsa_state.state;
64 static unsigned r300_get_sc_hz_max(struct r300_context *r300)
66 struct r300_dsa_state *dsa = r300->dsa_state.state;
72 static boolean r300_is_hiz_func_valid(struct r300_context *r300)
74 struct r300_dsa_state *dsa = r300->dsa_state.state;
77 if (r300->hiz_func == HIZ_FUNC_NONE)
81 if (r300->hiz_func == HIZ_FUNC_MAX &&
86 if (r300->hiz_func == HIZ_FUNC_MIN &&
99 static boolean r300_hiz_allowed(struct r300_context *r300)
101 struct r300_dsa_state *dsa = r300->dsa_state.state;
102 struct r300_screen *r300screen = r300->screen;
104 if (r300_fragment_shader_writes_depth(r300_fs(r300)))
107 if (r300->query_current)
111 if (!r300_is_hiz_func_valid(r300))
131 static void r300_update_hyperz(struct r300_context* r300)
134 (struct r300_hyperz_state*)r300->hyperz_state.state;
136 (struct pipe_framebuffer_state*)r300->fb_state.state;
137 struct r300_dsa_state *dsa = r300->dsa_state.state;
146 if (r300->cbzb_clear) {
151 if (!zstex || !r300->hyperz_enabled)
160 if (r300->screen->caps.is_r500) {
166 if (r300->zmask_decompress) {
181 if (r300->zmask_in_use && !r300->locked_zbuffer) {
188 if (r300->hiz_in_use && !r300->locked_zbuffer) {
190 if (!r300_hiz_allowed(r300)) {
194 r300->hiz_in_use = FALSE;
198 DBG(r300, DBG_HYPERZ, "r300: Z-func: %i\n", dsa->dsa.depth.func);
201 if (r300->hiz_func == HIZ_FUNC_NONE) {
202 r300->hiz_func = r300_get_hiz_func(r300);
207 (r300->hiz_func == HIZ_FUNC_MIN ? R300_HIZ_MIN : R300_HIZ_MAX);
210 r300_get_sc_hz_max(r300);
212 if (r300->screen->caps.is_r500) {
257 static void r300_update_ztop(struct r300_context* r300)
260 (struct r300_ztop_state*)r300->ztop_state.state;
291 if (r300_dsa_writes_depth_stencil(r300->dsa_state.state) &&
292 (r300_dsa_alpha_test_enabled(r300->dsa_state.state) || /* (1) */
293 r300_fs(r300)->shader->info.uses_kill)) { /* (2) */
295 } else if (r300_fragment_shader_writes_depth(r300_fs(r300))) { /* (5) */
297 } else if (r300->query_current) { /* (6) */
303 r300_mark_atom_dirty(r300, &r300->ztop_state);
306 void r300_update_hyperz_state(struct r300_context* r300)
308 r300_update_ztop(r300);
310 if (r300->hyperz_state.dirty) {
311 r300_update_hyperz(r300);