rsx: Move SPIRV stuff into common code

This commit is contained in:
kd-11 2024-03-27 20:20:21 +03:00 committed by GitHub
parent afcfd81496
commit 4594c912a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 238 additions and 191 deletions

View file

@ -2,7 +2,8 @@
#include "VKProgramPipeline.h"
#include "vkutils/descriptors.h"
#include "vkutils/device.h"
#include <string>
#include "../Program/SPIRVCommon.h"
namespace vk
{
@ -20,7 +21,7 @@ namespace vk
{
ensure(m_handle == VK_NULL_HANDLE);
if (!vk::compile_glsl_to_spv(m_source, type, m_compiled))
if (!spirv::compile_glsl_to_spv(m_compiled, m_source, type, ::glsl::glsl_rules_vulkan))
{
const std::string shader_type = type == ::glsl::program_domain::glsl_vertex_program ? "vertex" :
type == ::glsl::program_domain::glsl_fragment_program ? "fragment" : "compute";