Stencil blits from targets other than GL_TEXTURE_2D or GL_TEXTURE_2D_MULTISAMPLE are probably broken
Submitted by Ian Romanick
Assigned to Ian Romanick
The setup_program function in brw_meta_stencil_blit.c (http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c#n282) can only generate shader variations for GL_TEXTURE_2D and GL_TEXTURE_2D_MULTISAMPLE. However, if I add an assertion
assert(target == GL_TEXTURE_2D || target == GL_TEXTURE_2D_MULTISAMPLE);
at the single caller of the function, the arb_stencil_texturing-blit_corrupts_state test (http://patchwork.freedesktop.org/patch/70427/) fails the assertion for every other target. That indicates to me that blits from those other targets probably don't work.
We need a test like arb_stencil_texturing-blit_corrupts_state that verifies the result of blitting from every possible texture target. It shouldn't be too hard to adapt the existing arb_stencil_texturing-draw test.