diff options
author | Marek Olšák <maraeo@gmail.com> | 2011-01-09 05:34:36 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-01-09 06:14:23 +0100 |
commit | 3332229b3ba7a183a9f120ae4bbf9865e96df110 (patch) | |
tree | 244c11039fcd1b48d10c711f4b5534faa2926309 /src/gallium/drivers/r300/r300_context.h | |
parent | 69191d41231b95af7565e32393c5487163859d7e (diff) | |
download | external_mesa3d-3332229b3ba7a183a9f120ae4bbf9865e96df110.zip external_mesa3d-3332229b3ba7a183a9f120ae4bbf9865e96df110.tar.gz external_mesa3d-3332229b3ba7a183a9f120ae4bbf9865e96df110.tar.bz2 |
r300g: fix crash when flushing ZMASK
https://bugs.freedesktop.org/show_bug.cgi?id=32912
The fix is to call update_derived_state before user buffer uploads.
I've also moved some code around.
Unfortunately, there are still some ZMASK-related bugs which cause
misrendering, i.e. flushing doesn't always work and glean/fbo fails.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 1a14d2b..e09cf87 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -656,6 +656,22 @@ static INLINE struct r300_fragment_shader *r300_fs(struct r300_context *r300) return (struct r300_fragment_shader*)r300->fs.state; } +static INLINE void r300_mark_atom_dirty(struct r300_context *r300, + struct r300_atom *atom) +{ + atom->dirty = TRUE; + + if (!r300->first_dirty) { + r300->first_dirty = atom; + r300->last_dirty = atom+1; + } else { + if (atom < r300->first_dirty) + r300->first_dirty = atom; + else if (atom+1 > r300->last_dirty) + r300->last_dirty = atom+1; + } +} + struct pipe_context* r300_create_context(struct pipe_screen* screen, void *priv); @@ -672,10 +688,7 @@ void r300_init_state_functions(struct r300_context* r300); void r300_init_resource_functions(struct r300_context* r300); /* r300_blit.c */ -void r300_flush_depth_stencil(struct pipe_context *pipe, - struct pipe_resource *dst, - unsigned level, - unsigned layer); +void r300_flush_depth_textures(struct r300_context *r300); /* r300_query.c */ void r300_resume_query(struct r300_context *r300, @@ -710,21 +723,8 @@ void r300_mark_fb_state_dirty(struct r300_context *r300, enum r300_fb_state_change change); void r300_mark_fs_code_dirty(struct r300_context *r300); -static INLINE void r300_mark_atom_dirty(struct r300_context *r300, - struct r300_atom *atom) -{ - atom->dirty = TRUE; - - if (!r300->first_dirty) { - r300->first_dirty = atom; - r300->last_dirty = atom+1; - } else { - if (atom < r300->first_dirty) - r300->first_dirty = atom; - if (atom+1 > r300->last_dirty) - r300->last_dirty = atom+1; - } -} +/* r300_state_derived.c */ +void r300_update_derived_state(struct r300_context* r300); /* r300_debug.c */ void r500_dump_rs_block(struct r300_rs_block *rs); |