mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
Make ShaderModuleBase use its own spirv_cross for reflection.
Bug: dawn:216 Change-Id: Ie79aaeb3a878960606e8c09a4969bf7a1dbe1b13 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28240 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
97b880e6ff
commit
947201da19
@@ -129,8 +129,7 @@ namespace dawn_native { namespace null {
|
||||
ResultOrError<ShaderModuleBase*> Device::CreateShaderModuleImpl(
|
||||
const ShaderModuleDescriptor* descriptor) {
|
||||
Ref<ShaderModule> module = AcquireRef(new ShaderModule(this, descriptor));
|
||||
spirv_cross::Compiler compiler(module->GetSpirv());
|
||||
DAWN_TRY(module->ExtractSpirvInfo(compiler));
|
||||
DAWN_TRY(module->Initialize());
|
||||
return module.Detach();
|
||||
}
|
||||
ResultOrError<SwapChainBase*> Device::CreateSwapChainImpl(
|
||||
@@ -386,6 +385,12 @@ namespace dawn_native { namespace null {
|
||||
}
|
||||
}
|
||||
|
||||
// ShaderModule
|
||||
|
||||
MaybeError ShaderModule::Initialize() {
|
||||
return InitializeBase();
|
||||
}
|
||||
|
||||
// OldSwapChain
|
||||
|
||||
OldSwapChain::OldSwapChain(Device* device, const SwapChainDescriptor* descriptor)
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace dawn_native { namespace null {
|
||||
class Queue;
|
||||
using RenderPipeline = RenderPipelineBase;
|
||||
using Sampler = SamplerBase;
|
||||
using ShaderModule = ShaderModuleBase;
|
||||
class ShaderModule;
|
||||
class SwapChain;
|
||||
using Texture = TextureBase;
|
||||
using TextureView = TextureViewBase;
|
||||
@@ -217,7 +217,6 @@ namespace dawn_native { namespace null {
|
||||
class CommandBuffer final : public CommandBufferBase {
|
||||
public:
|
||||
CommandBuffer(CommandEncoder* encoder, const CommandBufferDescriptor* descriptor);
|
||||
|
||||
};
|
||||
|
||||
class QuerySet final : public QuerySetBase {
|
||||
@@ -243,6 +242,13 @@ namespace dawn_native { namespace null {
|
||||
size_t size) override;
|
||||
};
|
||||
|
||||
class ShaderModule final : public ShaderModuleBase {
|
||||
public:
|
||||
using ShaderModuleBase::ShaderModuleBase;
|
||||
|
||||
MaybeError Initialize();
|
||||
};
|
||||
|
||||
class SwapChain final : public NewSwapChainBase {
|
||||
public:
|
||||
SwapChain(Device* device,
|
||||
|
||||
Reference in New Issue
Block a user