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

WebGPU: Remove GPUShaderStage hack. #29933

Merged
merged 1 commit into from
Nov 20, 2024
Merged

WebGPU: Remove GPUShaderStage hack. #29933

merged 1 commit into from
Nov 20, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 20, 2024

Related issue: -

Description

Since there is already a fallback in place for GPUShaderStage in WGSLNodeBuilder, it seems the fallback from WebGPU.js can be removed.

// GPUShaderStage is not defined in browsers not supporting WebGPU
const GPUShaderStage = self.GPUShaderStage;
const wrapNames = {
[ RepeatWrapping ]: 'repeat',
[ ClampToEdgeWrapping ]: 'clamp',
[ MirroredRepeatWrapping ]: 'mirror'
};
const gpuShaderStageLib = {
'vertex': GPUShaderStage ? GPUShaderStage.VERTEX : 1,
'fragment': GPUShaderStage ? GPUShaderStage.FRAGMENT : 2,
'compute': GPUShaderStage ? GPUShaderStage.COMPUTE : 4
};

@Mugen87 Mugen87 merged commit 8842ee0 into mrdoob:dev Nov 20, 2024
11 checks passed
@Mugen87 Mugen87 added this to the r171 milestone Nov 20, 2024
@Mugen87 Mugen87 mentioned this pull request Nov 20, 2024
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