Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat: refactor pipeline_bind_group_compat test for 0 storage buffers #4097

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,14 @@ 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),
`device only supports maxStorageBuffersInFragmentStage(${t.device.limits.maxStorageBuffersInFragmentStage}) but test needs 2`
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: better have a message like the other pull requests indicating reason for skipping


const { bindConfig, fn } = kBindCases[bindCase];
const { texture, pipeline } = createResourcesForRenderPassTest(t, textureType, bindConfig);
const { encoder, validateFinish } = t.createEncoder(encoderType);
Expand All @@ -347,6 +356,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
Loading