Closed Bug 1630481 Opened 1 year ago Closed 1 year ago

SWGL fails wrench reftest images/texture-rect.yaml


(Core :: Graphics: WebRender, defect)




Tracking Status
firefox77 --- fixed


(Reporter: lsalzman, Assigned: lsalzman)


(Blocks 1 open bug)



(1 file)

It appears that reftests/images/texture-rect.yaml is actually a broken test, because the wrench harness is broken in this case. If you look at the colorrect.png image it samples, the red square should show up before the blue square. However, the test's ref encodes the opposite, with the blue square before the red square.

This is because when texture swizzling is used in WR on BGRA images, the FormatDesc wrench queries tells it to use internal RGBA/external RGBA for the upload to pass through the BGRA data untouched, where WR expects the BGRA swizzle it does internally to map it to the proper texture sampling format in the shader later. However, this swizzle only gets applied to internal cached textures, never to external images...

You can observe this by removing "external: true" from the test, and the red and blue squares swap to now look like colorrect.png. SWGL also renders it in this order by default, since it never relied upon swizzling with WR. Somehow the brokenness just got encoded in the test ref, with SWGL taking the blame for the failure... It would similarly fail on any platform that did not provide texture swizzle.

Wrench doesn't do this swizzle when setting up external images, and in general, we don't rely on swizzling to be set up on external images anywhere else in Gecko, so it makes more sense to just force Wrench to use a hardwired external BGRA format to simulate that aspect for testing, as well as keeping things simple by preventing Wrench from ever having to know about that swizzling.

Pushed by
make Wrench force external BGRA8 images to known format to avoid needing swizzles. r=kvark
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.