#ifndef LIBANGLE_RENDERER_VULKAN_SPV_UTILS_H_
#define LIBANGLE_RENDERER_VULKAN_SPV_UTILS_H_
#include <functional>
#include "common/spirv/spirv_types.h"
#include "libANGLE/renderer/ProgramImpl.h"
#include "libANGLE/renderer/renderer_utils.h"
#include "platform/autogen/FeaturesVk_autogen.h"
namespace rx
{
class ShaderInterfaceVariableInfoMap;
struct SpvProgramInterfaceInfo
{ … };
struct SpvSourceOptions
{ … };
SpvSourceOptions SpvCreateSourceOptions(const angle::FeaturesVk &features);
struct SpvTransformOptions
{ … };
struct ShaderInterfaceVariableXfbInfo
{ … };
ANGLE_ENABLE_STRUCT_PADDING_WARNINGS
struct ShaderInterfaceVariableInfo
{ … };
ANGLE_DISABLE_STRUCT_PADDING_WARNINGS
struct XFBInterfaceVariableInfo
{ … };
XFBVariableInfoPtr;
uint32_t SpvGetXfbBufferBlockId(const uint32_t bufferIndex);
void SpvAssignLocations(const SpvSourceOptions &options,
const gl::ProgramExecutable &programExecutable,
const gl::ProgramVaryingPacking &varyingPacking,
const gl::ShaderType transformFeedbackStage,
SpvProgramInterfaceInfo *programInterfaceInfo,
ShaderInterfaceVariableInfoMap *variableInfoMapOut);
void SpvAssignTransformFeedbackLocations(gl::ShaderType shaderType,
const gl::ProgramExecutable &programExecutable,
bool isTransformFeedbackStage,
SpvProgramInterfaceInfo *programInterfaceInfo,
ShaderInterfaceVariableInfoMap *variableInfoMapOut);
void SpvGetShaderSpirvCode(const gl::ProgramState &programState,
gl::ShaderMap<const angle::spirv::Blob *> *spirvBlobsOut);
void SpvAssignAllLocations(const SpvSourceOptions &options,
const gl::ProgramState &programState,
const gl::ProgramLinkedResources &resources,
ShaderInterfaceVariableInfoMap *variableInfoMapOut);
angle::Result SpvTransformSpirvCode(const SpvTransformOptions &options,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
const angle::spirv::Blob &initialSpirvBlob,
angle::spirv::Blob *spirvBlobOut);
}
#endif