mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Descriptorize ShaderModule
Change-Id: Ic79d00380f583485de0fb05bd47b1f869919ebe6
This commit is contained in:
committed by
Corentin Wallez
parent
3ccde9ce72
commit
df6710358b
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "common/Assert.h"
|
||||
#include "common/Platform.h"
|
||||
#include "dawn_native/opengl/DeviceGL.h"
|
||||
|
||||
#include <spirv-cross/spirv_glsl.hpp>
|
||||
|
||||
@@ -46,8 +47,9 @@ namespace dawn_native { namespace opengl {
|
||||
return o.str();
|
||||
}
|
||||
|
||||
ShaderModule::ShaderModule(ShaderModuleBuilder* builder) : ShaderModuleBase(builder) {
|
||||
spirv_cross::CompilerGLSL compiler(builder->AcquireSpirv());
|
||||
ShaderModule::ShaderModule(Device* device, const ShaderModuleDescriptor* descriptor)
|
||||
: ShaderModuleBase(device, descriptor) {
|
||||
spirv_cross::CompilerGLSL compiler(descriptor->code, descriptor->codeSize);
|
||||
spirv_cross::CompilerGLSL::Options options;
|
||||
|
||||
// TODO(cwallez@chromium.org): discover the backing context version and use that.
|
||||
|
||||
Reference in New Issue
Block a user