diff options
author | Nicolai Hähnle <[email protected]> | 2016-02-07 23:33:44 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-03-10 18:22:00 -0500 |
commit | 784269aa404e9484e195032841025cee24af8058 (patch) | |
tree | 6783add32d867ed4f1865827c9305b131d4110f4 /src/gallium/SConscript | |
parent | 9ea00c6f6b2924befe41f6ef55244e6aa20c702a (diff) |
gallium/radeon: notify all contexts when cmasks are enabled/disabled
There is an annoying corner case that I stumbled across while looking into
piglit's arb_shader_image_load_store/execution/load-from-cleared-image.shader_test
(which can be easily adapted to demonstrate the bug without the
ARB_shader_image_load_store extension)
When we bind a texture and then clear it using glClear (by attaching it
to the current framebuffer) for the first time, we allocate a separate
cmask for the texture to do fast clear, but the corresponding bit in
compressed_colortex_mask is not set. Subsequent rendering will use
incorrect data.
Conversely, when a currently bound texture with an existing cmask is
exported leading to that cmask being disabled, the compressed_colortex_mask
bit will remain set, leading to an assertion later on in debug builds.
Since iterating through all contexts and/or remembering where every
texture is bound would be costly, and cmask enable/disable should be
rare, we will maintain a global counter to signal contexts that they
must update their compressed_colortex_masks.
This patch introduces the global counter, and subsequent patches will
do the mask update.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/SConscript')
0 files changed, 0 insertions, 0 deletions