mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Add Metal vertex pulling behind a flag
Implements vertex pulling on the Metal backend, hidden behind a flag until ready for use (we are missing support for more complicated vertex input types). Bug: dawn:480 Change-Id: I38028b80673693ebf21309ad5336561fb99f40dc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26522 Commit-Queue: Idan Raiter <idanr@google.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
e1604b9a64
commit
d315022be5
@@ -144,6 +144,14 @@ namespace utils {
|
||||
return CreateShaderModuleFromResult(device, result);
|
||||
}
|
||||
|
||||
wgpu::ShaderModule CreateShaderModuleFromWGSL(const wgpu::Device& device, const char* source) {
|
||||
wgpu::ShaderModuleWGSLDescriptor wgslDesc;
|
||||
wgslDesc.source = source;
|
||||
wgpu::ShaderModuleDescriptor descriptor;
|
||||
descriptor.nextInChain = &wgslDesc;
|
||||
return device.CreateShaderModule(&descriptor);
|
||||
}
|
||||
|
||||
std::vector<uint32_t> CompileGLSLToSpirv(SingleShaderStage stage, const char* source) {
|
||||
shaderc_shader_kind kind = ShadercShaderKind(stage);
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace utils {
|
||||
SingleShaderStage stage,
|
||||
const char* source);
|
||||
wgpu::ShaderModule CreateShaderModuleFromASM(const wgpu::Device& device, const char* source);
|
||||
wgpu::ShaderModule CreateShaderModuleFromWGSL(const wgpu::Device& device, const char* source);
|
||||
|
||||
std::vector<uint32_t> CompileGLSLToSpirv(SingleShaderStage stage, const char* source);
|
||||
|
||||
wgpu::Buffer CreateBufferFromData(const wgpu::Device& device,
|
||||
|
||||
Reference in New Issue
Block a user