Skip to content

Commit

Permalink
Compat: Update maxInterStageShaderVariables = 15
Browse files Browse the repository at this point in the history
This is the OpenGL ES 3.1 Limit
  • Loading branch information
greggman committed Nov 29, 2023
1 parent 7da5c3c commit 9d4853e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Interface matching between vertex and fragment shader validation for createRende
`;

import { makeTestGroup } from '../../../../common/framework/test_group.js';
import { assert, range } from '../../../../common/util/util.js';
import { range } from '../../../../common/util/util.js';

import { CreateRenderPipelineValidationTest } from './common.js';

Expand Down Expand Up @@ -251,9 +251,6 @@ g.test('max_components_count,output')

const numVec4 = Math.floor(numScalarComponents / 4);
const numTrailingScalars = numScalarComponents % 4;
const numUserDefinedInterStageVariables = numTrailingScalars > 0 ? numVec4 + 1 : numVec4;

assert(numUserDefinedInterStageVariables <= t.device.limits.maxInterStageShaderVariables);

const outputs = range(numVec4, i => `@location(${i}) vout${i}: vec4<f32>`);
const inputs = range(numVec4, i => `@location(${i}) fin${i}: vec4<f32>`);
Expand Down Expand Up @@ -294,9 +291,6 @@ g.test('max_components_count,input')

const numVec4 = Math.floor(numScalarComponents / 4);
const numTrailingScalars = numScalarComponents % 4;
const numUserDefinedInterStageVariables = numTrailingScalars > 0 ? numVec4 + 1 : numVec4;

assert(numUserDefinedInterStageVariables <= t.device.limits.maxInterStageShaderVariables);

const outputs = range(numVec4, i => `@location(${i}) vout${i}: vec4<f32>`);
const inputs = range(numVec4, i => `@location(${i}) fin${i}: vec4<f32>`);
Expand Down
2 changes: 1 addition & 1 deletion src/webgpu/capability_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ const [kLimitInfoKeys, kLimitInfoDefaults, kLimitInfoData] =
'maxVertexAttributes': [ , 16, 16, ],
'maxVertexBufferArrayStride': [ , 2048, 2048, ],
'maxInterStageShaderComponents': [ , 60, 60, ],
'maxInterStageShaderVariables': [ , 16, 16, ],
'maxInterStageShaderVariables': [ , 16, 15, ],

'maxColorAttachments': [ , 8, 4, ],
'maxColorAttachmentBytesPerSample': [ , 32, 32, ],
Expand Down

0 comments on commit 9d4853e

Please sign in to comment.