diff options
author | Chris Forbes <[email protected]> | 2014-12-08 20:37:00 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2015-03-14 15:55:17 +1300 |
commit | f68a973dfb8926ac872b0b0e3b4b5c2163389d06 (patch) | |
tree | ce9febf22177565009692ef80b21114745096938 /src/mesa | |
parent | 8ed1b65b62665810291562b59f1e983f7a78a0fc (diff) |
i965/gen4-5: Cope with immutable-format texture revalidation
This is unfortunately sometimes necessary due to rebasing levels when
rendering into them.
16 piglits crash -> pass, when building mesa with debug enabled.
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_validate.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c index 0bf0393803f..1d827683b99 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c @@ -98,10 +98,17 @@ intel_finalize_mipmap_tree(struct brw_context *brw, GLuint unit) return true; } - /* Immutable textures should not get this far -- they should have been - * created in a validated state, and nothing can invalidate them. + /* On recent generations, immutable textures should not get this far + * -- they should have been created in a validated state, and nothing + * can invalidate them. + * + * Unfortunately, this is not true on pre-Sandybridge hardware -- when + * rendering into an immutable-format depth texture we may have to rebase + * the rendered levels to meet alignment requirements. + * + * FINISHME: Avoid doing this. */ - assert(!tObj->Immutable); + assert(!tObj->Immutable || brw->gen < 6); firstImage = intel_texture_image(tObj->Image[0][tObj->BaseLevel]); |