这是indexloc提供的服务,不要输入任何密码
Skip to content

Compat: sample locations don't match the spec in OpenGL #4804

@greggman

Description

@greggman

Running this test, which sets each sample of a 4 count multisample texture to a different color and then uses textureLoad(multisampledTexture, vec2u(0), sample_index) to read each of the samples to a storage buffer in Chrome on Linux AMD OpenGL gets different results than the other APIs

normal results

sample_index: 0  value: 1,0,0,0  si: 0
sample_index: 1  value: 0,1,0,0  si: 1
sample_index: 2  value: 0,0,1,0  si: 2
sample_index: 3  value: 0,0,0,1  si: 3

GL results

sample_index: 0  value: 1,0,0,0  si: 0
sample_index: 1  value: 0,0,0,1  si: 3
sample_index: 2  value: 0,0,1,0  si: 2
sample_index: 3  value: 0,1,0,0  si: 1

I ran into this issue writing the textureLoad WGSL tests

We think maybe swizzling the index in textureLoad on the GL backend is enough to fix this? If not, another solution is to disallow textureLoad on texture_multisample_2d<???> textures in compat. other ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions