-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add per-vertex attribute support to vulkan, spir-v and wgsl. #8821
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7b76314
Add per-vertex attribute support to vulkan, spir-v and wgsl.
atlv24 62d48d8
feedback
atlv24 10d6109
tristrip test
atlv24 b8a1fe6
typo
atlv24 0cab67d
SPV test
atlv24 37d9c4f
io_shareable
atlv24 e9c0dd4
Merge branch 'trunk' into ad/per-vertex-vk
atlv24 1b4a23b
changelog fix
atlv24 71b8837
Merge branch 'ad/per-vertex-vk' of github.com:atlv24/wgpu into ad/per…
atlv24 469ab9a
feedback
atlv24 2b2ef83
wgsl_errorsa
atlv24 6a40927
Merge branch 'trunk' into ad/per-vertex-vk
cwfitzgerald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ; SPIR-V | ||
| ; Version: 1.1 | ||
| ; Generator: rspirv | ||
| ; Bound: 22 | ||
| OpCapability Shader | ||
| OpCapability FragmentBarycentricKHR | ||
| OpExtension "SPV_KHR_fragment_shader_barycentric" | ||
| %1 = OpExtInstImport "GLSL.std.450" | ||
| OpMemoryModel Logical GLSL450 | ||
| OpEntryPoint Fragment %14 "fs_main" %9 %12 | ||
| OpExecutionMode %14 OriginUpperLeft | ||
| OpDecorate %4 ArrayStride 4 | ||
| OpDecorate %9 Location 0 | ||
| OpDecorate %9 PerVertexKHR | ||
| OpDecorate %12 Location 0 | ||
| %2 = OpTypeVoid | ||
| %3 = OpTypeFloat 32 | ||
| %6 = OpTypeInt 32 0 | ||
| %5 = OpConstant %6 3 | ||
| %4 = OpTypeArray %3 %5 | ||
| %7 = OpTypeVector %3 4 | ||
| %10 = OpTypePointer Input %4 | ||
| %9 = OpVariable %10 Input | ||
| %13 = OpTypePointer Output %7 | ||
| %12 = OpVariable %13 Output | ||
| %15 = OpTypeFunction %2 | ||
| %16 = OpConstant %3 1 | ||
| %14 = OpFunction %2 None %15 | ||
| %8 = OpLabel | ||
| %11 = OpLoad %4 %9 | ||
| OpBranch %17 | ||
| %17 = OpLabel | ||
| %18 = OpCompositeExtract %3 %11 0 | ||
| %19 = OpCompositeExtract %3 %11 1 | ||
| %20 = OpCompositeExtract %3 %11 2 | ||
| %21 = OpCompositeConstruct %7 %18 %19 %20 %16 | ||
| OpStore %12 %21 | ||
| OpReturn | ||
| OpFunctionEnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| capabilities = "PER_VERTEX" | ||
| targets = "SPIRV | WGSL" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| capabilities = "PER_VERTEX" | ||
| targets = "WGSL | SPIRV" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| @fragment | ||
| fn fs_main(@location(0) @interpolate(per_vertex) v: array<f32, 3>) -> @location(0) vec4<f32> { | ||
| return vec4(v[0], v[1], v[2], 1.0); | ||
| } |
atlv24 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| ; SPIR-V | ||
| ; Version: 1.1 | ||
| ; Generator: rspirv | ||
| ; Bound: 34 | ||
| OpCapability Shader | ||
| OpCapability FragmentBarycentricKHR | ||
| OpExtension "SPV_KHR_fragment_shader_barycentric" | ||
| %1 = OpExtInstImport "GLSL.std.450" | ||
| OpMemoryModel Logical GLSL450 | ||
| OpEntryPoint Fragment %30 "fs_main" %25 %28 | ||
| OpExecutionMode %30 OriginUpperLeft | ||
| OpDecorate %4 ArrayStride 4 | ||
| OpDecorate %25 Location 0 | ||
| OpDecorate %25 PerVertexKHR | ||
| OpDecorate %28 Location 0 | ||
| %2 = OpTypeVoid | ||
| %3 = OpTypeFloat 32 | ||
| %6 = OpTypeInt 32 0 | ||
| %5 = OpConstant %6 3 | ||
| %4 = OpTypeArray %3 %5 | ||
| %7 = OpTypeVector %3 4 | ||
| %8 = OpConstant %3 1 | ||
| %10 = OpTypePointer Private %4 | ||
| %11 = OpConstantNull %4 | ||
| %9 = OpVariable %10 Private %11 | ||
| %13 = OpTypePointer Private %7 | ||
| %14 = OpConstantNull %7 | ||
| %12 = OpVariable %13 Private %14 | ||
| %17 = OpTypeFunction %2 | ||
| %26 = OpTypePointer Input %4 | ||
| %25 = OpVariable %26 Input | ||
| %29 = OpTypePointer Output %7 | ||
| %28 = OpVariable %29 Output | ||
| %16 = OpFunction %2 None %17 | ||
| %15 = OpLabel | ||
| OpBranch %18 | ||
| %18 = OpLabel | ||
| %19 = OpLoad %4 %9 | ||
| %20 = OpCompositeExtract %3 %19 0 | ||
| %21 = OpCompositeExtract %3 %19 1 | ||
| %22 = OpCompositeExtract %3 %19 2 | ||
| %23 = OpCompositeConstruct %7 %20 %21 %22 %8 | ||
| OpStore %12 %23 | ||
| OpReturn | ||
| OpFunctionEnd | ||
| %30 = OpFunction %2 None %17 | ||
| %24 = OpLabel | ||
| %27 = OpLoad %4 %25 | ||
| OpBranch %31 | ||
| %31 = OpLabel | ||
| OpStore %9 %27 | ||
| %32 = OpFunctionCall %2 %16 | ||
| %33 = OpLoad %7 %12 | ||
| OpStore %28 %33 | ||
| OpReturn | ||
| OpFunctionEnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ; SPIR-V | ||
| ; Version: 1.1 | ||
| ; Generator: rspirv | ||
| ; Bound: 22 | ||
| OpCapability Shader | ||
| OpCapability FragmentBarycentricKHR | ||
| OpExtension "SPV_KHR_fragment_shader_barycentric" | ||
| %1 = OpExtInstImport "GLSL.std.450" | ||
| OpMemoryModel Logical GLSL450 | ||
| OpEntryPoint Fragment %14 "fs_main" %9 %12 | ||
| OpExecutionMode %14 OriginUpperLeft | ||
| OpDecorate %4 ArrayStride 4 | ||
| OpDecorate %9 Location 0 | ||
| OpDecorate %9 PerVertexKHR | ||
| OpDecorate %12 Location 0 | ||
| %2 = OpTypeVoid | ||
| %3 = OpTypeFloat 32 | ||
| %6 = OpTypeInt 32 0 | ||
| %5 = OpConstant %6 3 | ||
| %4 = OpTypeArray %3 %5 | ||
| %7 = OpTypeVector %3 4 | ||
| %10 = OpTypePointer Input %4 | ||
| %9 = OpVariable %10 Input | ||
| %13 = OpTypePointer Output %7 | ||
| %12 = OpVariable %13 Output | ||
| %15 = OpTypeFunction %2 | ||
| %16 = OpConstant %3 1 | ||
| %14 = OpFunction %2 None %15 | ||
| %8 = OpLabel | ||
| %11 = OpLoad %4 %9 | ||
| OpBranch %17 | ||
| %17 = OpLabel | ||
| %18 = OpCompositeExtract %3 %11 0 | ||
| %19 = OpCompositeExtract %3 %11 1 | ||
| %20 = OpCompositeExtract %3 %11 2 | ||
| %21 = OpCompositeConstruct %7 %18 %19 %20 %16 | ||
| OpStore %12 %21 | ||
| OpReturn | ||
| OpFunctionEnd |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.