mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Remove ShaderStage that doesn't exist in WebGPU.
Instead it is replaced by one enum in dawn_native and another in utils. BUG=dawn:22 Change-Id: I094a40c8d4e22b704e59aea60cbefd1f05c5352a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8800 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
06ab6e5b13
commit
2a1d8c2b1d
@@ -28,13 +28,13 @@ namespace utils {
|
||||
|
||||
namespace {
|
||||
|
||||
shaderc_shader_kind ShadercShaderKind(dawn::ShaderStage stage) {
|
||||
shaderc_shader_kind ShadercShaderKind(ShaderStage stage) {
|
||||
switch (stage) {
|
||||
case dawn::ShaderStage::Vertex:
|
||||
case ShaderStage::Vertex:
|
||||
return shaderc_glsl_vertex_shader;
|
||||
case dawn::ShaderStage::Fragment:
|
||||
case ShaderStage::Fragment:
|
||||
return shaderc_glsl_fragment_shader;
|
||||
case dawn::ShaderStage::Compute:
|
||||
case ShaderStage::Compute:
|
||||
return shaderc_glsl_compute_shader;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
@@ -60,7 +60,7 @@ namespace utils {
|
||||
} // anonymous namespace
|
||||
|
||||
dawn::ShaderModule CreateShaderModule(const dawn::Device& device,
|
||||
dawn::ShaderStage stage,
|
||||
ShaderStage stage,
|
||||
const char* source) {
|
||||
shaderc_shader_kind kind = ShadercShaderKind(stage);
|
||||
|
||||
|
||||
@@ -26,8 +26,10 @@ namespace utils {
|
||||
|
||||
enum Expectation { Success, Failure };
|
||||
|
||||
enum class ShaderStage { Vertex, Fragment, Compute };
|
||||
|
||||
dawn::ShaderModule CreateShaderModule(const dawn::Device& device,
|
||||
dawn::ShaderStage stage,
|
||||
ShaderStage stage,
|
||||
const char* source);
|
||||
dawn::ShaderModule CreateShaderModuleFromASM(const dawn::Device& device, const char* source);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user