Skip to content

Conversation

@greggman
Copy link
Contributor

The spec specifies there is a maximum number of texture + sampler combinations and a maximum number of storage textures in vertex and fragment stages.

Test that you can use all of them at the same time to the maximum limit of the adapter.

@greggman greggman requested a review from shrekshao March 13, 2025 22:07
@greggman greggman force-pushed the expand_texture_sample_combo branch from 57933dd to de7f0b0 Compare March 13, 2025 22:07
@shrekshao
Copy link
Contributor

I ran this on linux google-chrome-unstable opengles compat and got this error log (exp color changed 32769 (0x0180) -> 32778 (0x0A80)):

webgpu:api,operation,sampling,sampler_texture:sample_texture_combos:
246.0000 ms

EXPECTATION FAILED: Texture level had unexpected contents:
 between 1,1,0 and 15,1,0 inclusive:
                            coords == X,Y,Z:       1,1,0       2,1,0       3,1,0       4,1,0       5,1,0       6,1,0       7,1,0 ...
  act. texel bytes (little-endian) ==    0x: 01 00 02 00 01 00 03 00 01 00 04 00 01 00 05 00 01 00 06 00 01 00 07 00 01 00 08 00 ...
                       act. colors ==   R,G:         1,2         1,3         1,4         1,5         1,6         1,7         1,8 ...
                       exp. colors ==   R,G:     32778,2     32778,3     32778,4     32778,5     32778,6     32778,7     32778,8 ...
        act. normal-ULPs-from-zero ==   R,G:         1,2         1,3         1,4         1,5         1,6         1,7         1,8 ...
        exp. normal-ULPs-from-zero ==   R,G:     32778,2     32778,3     32778,4     32778,5     32778,6     32778,7     32778,8 ...
                     tolerance ± 0
                  diff (act - exp) ==           -32777,0    -32777,0    -32777,0    -32777,0    -32777,0    -32777,0    -32777,0 ...
Error
    at TextureExpectations.eventualAsyncExpectation (http://localhost:8080/out/common/framework/fixture.js:254:24)
    at TextureExpectations.eventualExpectOK (http://localhost:8080/out/common/framework/fixture.js:396:10)
    at TextureExpectations.expectTexelViewComparisonIsOkInTexture (http://localhost:8080/out/webgpu/gpu_test.js:1945:12)
    at RunCaseSpecific.fn (http://localhost:8080/out/webgpu/api/operation/sampling/sampler_texture.spec.js:336:5)

@greggman
Copy link
Contributor Author

greggman commented Mar 13, 2025

Yes, the GL backend doesn't pass. That's the point

It also doesn't pass before this change.

@shrekshao
Copy link
Contributor

Oh but fails on linux core as well, is this expected?


webgpu:api,operation,sampling,sampler_texture:sample_texture_combos:
381.4000 ms

EXPECTATION FAILED: Texture level had unexpected contents:
 between 256,0,0 and 263,1,0 inclusive:
                            coords == X,Y,Z:     256,0,0     257,0,0     258,0,0     259,0,0     260,0,0     261,0,0     262,0,0 ...
  act. texel bytes (little-endian) ==    0x: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
                       act. colors ==   R,G:         0,0         0,0         0,0         0,0         0,0         0,0         0,0 ...
                       exp. colors ==   R,G:        17,0        18,0        19,0        20,0        21,0        22,0        23,0 ...
        act. normal-ULPs-from-zero ==   R,G:         0,0         0,0         0,0         0,0         0,0         0,0         0,0 ...
        exp. normal-ULPs-from-zero ==   R,G:        17,0        18,0        19,0        20,0        21,0        22,0        23,0 ...
                     tolerance ± 0
                  diff (act - exp) ==              -17,0       -18,0       -19,0       -20,0       -21,0       -22,0       -23,0 ...
Error
    at TextureExpectations.eventualAsyncExpectation (http://localhost:8080/out/common/framework/fixture.js:254:24)
    at TextureExpectations.eventualExpectOK (http://localhost:8080/out/common/framework/fixture.js:396:10)
    at TextureExpectations.expectTexelViewComparisonIsOkInTexture (http://localhost:8080/out/webgpu/gpu_test.js:1945:12)
    at RunCaseSpecific.fn (http://localhost:8080/out/webgpu/api/operation/sampling/sampler_texture.spec.js:336:5)

The spec specified there is a maximum number of texture + sampler
combinations and a maximum number of storage textures in vertex
and fragment stages.

Test that you can use all of them at the same time to the maximum
limit of the adapter.
@greggman greggman force-pushed the expand_texture_sample_combo branch from de7f0b0 to e0a2774 Compare March 13, 2025 22:23
@greggman
Copy link
Contributor Author

Fixed for Vulkan. It was calling textureLoad out of bounds and that behavior is implementation defined. It no longer does that. Still fails on GL.

@greggman greggman merged commit 8e05682 into gpuweb:main Mar 14, 2025
1 check passed
@greggman greggman deleted the expand_texture_sample_combo branch March 14, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants