[Mesa-dev] [PATCH 00/11] GL_ATI_fragment_shader support for Gallium

Miklós Máté mtmkls at gmail.com
Mon Feb 1 06:52:10 PST 2016


On 12/16/2015 03:18 AM, Roland Scheidegger wrote:
> Am 16.12.2015 um 00:05 schrieb Miklós Máté:
>> Hi,
>>
>> This series aims to improve the looks of Star Wars: Knights of the
>> Old Republic (via Wine), but features some additional cleanup as
>> well. The main component of the series is the implementation of
>> GL_ATI_fragment_shader for all Gallium drivers (though I could only
>> test it with radeonsi, llvmpipe, and softpipe). If this extension is
>> available, the game uses it quite extensively: perhaps the most
>> notable effect is the animated water ripples, but it also fixes the
>> grass, improves the specular on wet characters (e.g. the Selkath) and
>> it is used for regular texturing almost everywhere. The game has two
>> optional post-process effects that also depend on this extension:
>> framebuffer effects (light bloom, distortion), and soft shadows.
>> Patches 5&6 are needed to fix crashing with post-processing. With
>> current fglrx the grass is wrong, and post-process crashes, but my
>> previous Radeon cards ran this game perfectly on Windows.
>>
>> One other game that can use GL_ATI_fragment_shader is Doom 3, if
>> r_renderer="r200" instead of "best" (which means "arb2", if
>> GL_ARB_fragment_program is available). By default
>> image_useNormalCompression=0, which results in wrong lighting and
>> makes the specular overbright with r200. Setting it to 1 fixes r200,
>> but messes up arb2, setting it to 2 fixes both. The light interaction
>> is the same in r200 and arb2, but r200 doesn't have the heathaze
>> shader. Later idTech4 games don't support r200 anymore: in Quake 4
>> everything is green, in Prey the organic walls are black, and ETQW
>> has a completely revised renderer. I verified these with fglrx.
> I think the reason why noone was interested in making ATI_fs supported
> so far on anything other than r200 was that there just wasn't really
> anything depending on it. As doom3 could use arb_fs just fine...
> But I guess if wine can use it there's some more apps probably...
>
> FWIW I think quake4 should work fine. Back when I implemented this for
> r200, it was indeed broken and I traced that back to something broken in
> the main shader (can't remember what, something trivial like wrong tex
> unit used in an instruction). I reported that and got told it was
> already fixed in the game - however there was never a new demo released
> thus if you just have the demo it's still broken.
>
> Roland
Well, it's KotOR using this extension, Wine is just relaying the OpenGL 
calls. I was surprised to find out that this game uses OpenGL, because 
it was initially released on Xbox. BTW Wine can use ATI fs on r200 to 
emulate fix-function fragment processing, but it doesn't try to 
implement DX8 shaders with it (advertises shader model 0).

It's good to hear that the full version of Quake 4 is fixed, I only have 
the demo version. Now I know of 4 games that can use ATI fs: KotOR 1&2, 
Doom 3, Quake 4. Note that the new Steam version of KotOR 2 is 
completely rewritten, and doesn't use ATI fs anymore, but gog.com still 
only has the original version. KotOR 1 was also modernized by the same 
studio, but that is only available on mobile, and they don't plan to 
port it to PC.

MM


More information about the mesa-dev mailing list