cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

landmann
Journeyman III

DX9: sRGB write-enabled clearing fails in case AA is enabled

Without AA enabled a RT clear with D3DRS_SRGBWRITEENABLE set to TRUE does what one expects, clearing the RT with the proper sRGB value.

With AA enabled this does not work. Why?

What trick is needed to activate it without using a custom pixel shader?

 PS: Of course simple to reproduce , just toggle the SRGBWRITEENABLE RS before any clear call in one of the simple DX9 samples. You see a nice background flickering which vanishes once AA is enabled.

0 Likes
2 Replies
landmann
Journeyman III

So I finally got an answer from devrel here: The ATI driver assumes that all rendering is done in linear color space in case AA is enabled. Something one could argue on (e.g. linear color space is only needed during the _downsampling_ process).

And therefore the ATI driver just completely ignores the SRGBWRITEENABLE flag in the AA case.

At least for a clear operation it would be possible to do the color conversion in the driver before issuing it on the GPU. We only have 8 bits per color for the clear operation, so depending on the value sRGB or linear based encoding could be beneficial.

Summa summarum: Please either fix the driver or return an appropriate error code.

 

0 Likes

What's the graphic card you are using? Radeon HD 5000 series or something else?

0 Likes