Descriptorize ShaderModule

Change-Id: Ic79d00380f583485de0fb05bd47b1f869919ebe6
This commit is contained in:
Corentin Wallez
2018-08-20 17:01:20 +02:00
committed by Corentin Wallez
parent 3ccde9ce72
commit df6710358b
28 changed files with 113 additions and 127 deletions

View File

@@ -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.