[Mesa-dev] [PATCH] mesa: fix texture updates for ATI_fragment_shader

Marek Olšák maraeo at gmail.com
Tue Oct 17 01:08:22 UTC 2017


On Sun, Oct 15, 2017 at 7:10 PM, Miklós Máté <mtmkls at gmail.com> wrote:
> Hi,
>
> I'd like to ask you to revert this change.
>
> As Ian Romanick pointed out this makes ATI_fs behave like ARB_fp, however
> there is a major difference between the two: with ATI_fs there is no way of
> knowing the texture targets until the draw call. When an ATI_fs is created,
> st_init_atifs_prog() sets every texture target to TEXTURE_2D_BIT, and
> st_fixup_atifs() sets the correct one, but unfortunately
> _mesa_update_texture_state() is called between them. After this patch
> update_program_texture_state() validates the texture targets to match the
> bound texture units, and thus rejects sampling from cube maps. This results
> in broken rendering in Knights of the Old Republic.

OK, I can revert the commit. I think the easiest way to fix the crash
I was seeing is to check for NULL in texObj->_Current in st/mesa.

Marek


More information about the mesa-dev mailing list