Hash :
8ecf7f9b
Author :
Date :
2017-01-13T17:29:52
Vulkan: Implement shader compilation. This hooks up the Vulkan GLSL, decorated with locations, to glslang, and then pipes the SPIRV back to the Program implementation for later use when making pipelines to run draw calls. The program compilation tests work now, but don't really test anything other than not generating Vulkan validation layer errors during compilation and shader object generation. BUG=angleproject:1576 Change-Id: I625e42219f4b4d1433dd3109b94e1a2f666ba4bd Reviewed-on: https://chromium-review.googlesource.com/408519 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
//
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ShaderVk.cpp:
// Implements the class methods for ShaderVk.
//
#include "libANGLE/renderer/vulkan/ShaderVk.h"
#include "common/debug.h"
namespace rx
{
ShaderVk::ShaderVk(const gl::ShaderState &data) : ShaderImpl(data)
{
}
ShaderVk::~ShaderVk()
{
}
ShCompileOptions ShaderVk::prepareSourceAndReturnOptions(std::stringstream *sourceStream,
std::string *sourcePath)
{
*sourceStream << mData.getSource();
return 0;
}
bool ShaderVk::postTranslateCompile(gl::Compiler *compiler, std::string *infoLog)
{
// No work to do here.
return true;
}
std::string ShaderVk::getDebugInfo() const
{
return std::string();
}
} // namespace rx