diff options
author | Dave Airlie <airlied@redhat.com> | 2009-10-14 16:53:12 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-10-14 16:53:12 +1000 |
commit | c1bee7bdea470b6b5dcebef9aacc8fe4feca687c (patch) | |
tree | d58eb285c84f7b9510565be37c5df0f742fd679d /src/gallium/drivers/r300/r300_state.c | |
parent | 210481ae16e966865dcf9f1fd5f5dfabf4dc28bc (diff) |
r300g: fixup arb occulsion query support.
1: add rv530 support
- num z pipes cap
- add proper start/finish query options for rv530
2: convert to use linked list properly.
3: add flushing required check.
4: initial Z top disabling support.
TODO:
make it actually work on my rv530.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 3cef285dee..d8533ac168 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -190,6 +190,7 @@ static void* r300_create_dsa_state(struct pipe_context* pipe, const struct pipe_depth_stencil_alpha_state* state) { + struct r300_context* r300 = r300_context(pipe); struct r300_dsa_state* dsa = CALLOC_STRUCT(r300_dsa_state); /* Depth test setup. */ @@ -247,11 +248,15 @@ static void* R300_FG_ALPHA_FUNC_ENABLE; dsa->alpha_reference = CLAMP(state->alpha.ref_value * 1023.0f, 0, 1023); - } else { - /* XXX need to fix this to be dynamically set - dsa->z_buffer_top = R300_ZTOP_ENABLE; */ } + dsa->z_buffer_top = R300_ZTOP_ENABLE; + /* XXX TODO: add frag prog rules for ztop disable */ + if (state->alpha.enabled && state->alpha.func != PIPE_FUNC_ALWAYS) + dsa->z_buffer_top = R300_ZTOP_DISABLE; + if (!is_empty_list(&r300->query_list)) + dsa->z_buffer_top = R300_ZTOP_DISABLE; + return (void*)dsa; } |