Skip to content

vrend: don't change the readback format for emulated BGRA unless bgraswz is active

When reading back a BGRA surface the client expects the data in BGRA order, and when we emulate the format by using a swizzled BGRA on GLES we still have to use the original format information to read back the data.

However, this results in mesa internally swizzling the RGBA data to BGRA ordering on the CPU. This performance hit can be avoided for applications that only blit or render to BGRA surfaces, because here we can set the bgraswz tweak that does the szizzling on the GPU when drawing or blitting to a BGRA surface and then we can read the data back as is.

With that for vtest the bgraswz tweak becomes purley a performance tweak. Replaying a trace of The Raven Remastered showed a 1% increase of performance when enabling the bgraswz tweak.

Closes #174 (closed)

@gurchetansingh @jbates Could you check whether this makes results bgraswz as a fix for the incorrect color rendering becoming unnecessary on crossvm?

Merge request reports