Lines Matching refs:r300

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