Skip to content

Commit

Permalink
Compat: refactor pipeline_bind_group_compat test for 0 storage buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Dec 16, 2024
1 parent dedb476 commit 01e26c2
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Tests limitations of bind group usage in a pipeline in compat mode.

import { makeTestGroup } from '../../../../../../common/framework/test_group.js';
import { keysOf } from '../../../../../../common/util/data_tables.js';
import { MaxLimitsTestMixin } from '../../../../../gpu_test.js';
import { kRenderEncodeTypes } from '../../../../../util/command_buffer_maker.js';
import { CompatibilityTest } from '../../../../compatibility_test.js';

Expand Down Expand Up @@ -293,7 +294,7 @@ function createResourcesForComputePassTest(
return { texture, pipeline };
}

export const g = makeTestGroup(CompatibilityTest);
export const g = makeTestGroup(MaxLimitsTestMixin(CompatibilityTest));

g.test('twoDifferentTextureViews,render_pass,used')
.desc(
Expand Down Expand Up @@ -329,6 +330,13 @@ Tests that you can not use 2 different views of the same texture in a render pas
)
.fn(t => {
const { encoderType, bindCase, useCase, textureType } = t.params;

t.skipIf(
t.isCompatibility &&
textureType === 'storage' &&
!(t.device.limits.maxStorageBuffersInFragmentStage! > 2)
);

const { bindConfig, fn } = kBindCases[bindCase];
const { texture, pipeline } = createResourcesForRenderPassTest(t, textureType, bindConfig);
const { encoder, validateFinish } = t.createEncoder(encoderType);
Expand All @@ -347,6 +355,13 @@ Tests that binding 2 different views of the same texture but not using them does
.params(u => u.combine('encoderType', kRenderEncodeTypes).combine('textureType', kTextureTypes))
.fn(t => {
const { encoderType, textureType } = t.params;

t.skipIf(
t.isCompatibility &&
textureType === 'storage' &&
!(t.device.limits.maxStorageBuffersInFragmentStage! > 2)
);

const { texture, pipeline } = createResourcesForRenderPassTest(
t,
textureType,
Expand Down

0 comments on commit 01e26c2

Please sign in to comment.