Closed Bug 1627413 Opened 4 years ago Closed 4 years ago

Software WebRender lacks support for supplying LOD bias when sampling 2DArrays (reftests/filters/svg-filter-composite.yaml)

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: jimb, Assigned: jimb)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The code generated for the call to texture in sampleInUvRect passes 0 for the level-of-detail bias argument. This means it calls glsl::texture(sampler2DArray, vec3, Float) , which is stubbed out.

Since the bias to the LOD calculation is zero, it's unclear to me why sampleInUvRect needs to pass that argument at all.

Comments in the code suggest that Firefox does not use mipmaps, but Servo does. Servo doesn't use Software WebRender, so I wonder if that definition of texture in SWGL could just call the next overload that takes no bias argument.

Blocks: sw-wr
Priority: -- → P3

Same problem: reftests/filters/svg-filter-offset.yaml

This seems to be responsible for all current crashes in reftests/filters (12 tests).

Of course, once we fix this that might uncover more crashes, but this is at least entailed in those.

I'm the one who wrote that call to texture, I'm not sure why I passed 0 for LOD bias. I believe it should be okay to just remove it. Also this shader is currently not used by Firefox or Servo at the moment, but hopefully that will change soon once I have finished more work on SVG filter support.

Oh, neat. Thanks!

The sampleInUvRect function in gfx/wr/webrender/res/cs_svg_filter.glsl calls
texture, passing the optional third argument that specifies a bias to the
sampler's level-of-detail calculation, used for mipmap interpolation. However,
the texture override in gfx/wr/swgl/src/glsl.h that accepts this parameter
is stubbed out, with an assert(0). This causes twelve tests in
gfx/wr/wrench/reftests/filters to crash.

Nothing in Firefox uses mipmaps, and Servo doesn't use Software WebRender, so it
should be fine for that call to texture to simply not pass the level-of-detail
bias.

This patch makes that change.

Assignee: nobody → jimb
Status: NEW → ASSIGNED
Pushed by jblandy@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/89e164da5af7
WebRender: Don't pass level-of-detail bias value to GLSL texture function. r=cbrewster
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: