mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Always specify GLSL version 450 when compiling Vulkan shaders.
Bit of a risky change so late in the game but it's wrong, it needs fixing.
See for example the comments to fb7a63bd11
This commit is contained in:
parent
ef67899fdc
commit
011e57c0e7
@ -38,7 +38,7 @@ void GenerateDepalShader300(char *buffer, GEBufferFormat pixelFormat, ShaderLang
|
||||
WRITE(p, "Texture2D<float4> tex : register(t0);\n");
|
||||
WRITE(p, "Texture2D<float4> pal : register(t3);\n");
|
||||
} else if (language == GLSL_VULKAN) {
|
||||
WRITE(p, "#version 140\n");
|
||||
WRITE(p, "#version 450\n");
|
||||
WRITE(p, "#extension GL_ARB_separate_shader_objects : enable\n");
|
||||
WRITE(p, "#extension GL_ARB_shading_language_420pack : enable\n");
|
||||
WRITE(p, "layout(set = 0, binding = 0) uniform sampler2D tex;\n");
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "GPU/Vulkan/VulkanUtil.h"
|
||||
#include "Common/Vulkan/VulkanImage.h"
|
||||
|
||||
static const char depal_vs[] = R"(#version 400
|
||||
static const char depal_vs[] = R"(#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
layout (location = 0) in vec3 a_position;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "GPU/GPUState.h"
|
||||
|
||||
static const char *vulkan_glsl_preamble =
|
||||
"#version 400\n"
|
||||
"#version 450\n"
|
||||
"#extension GL_ARB_separate_shader_objects : enable\n"
|
||||
"#extension GL_ARB_shading_language_420pack : enable\n\n";
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include "GPU/Vulkan/ShaderManagerVulkan.h"
|
||||
#include "GPU/Vulkan/VulkanUtil.h"
|
||||
|
||||
static const char tex_fs[] = R"(#version 400
|
||||
static const char tex_fs[] = R"(#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
layout (binding = 0) uniform sampler2D sampler0;
|
||||
@ -67,7 +67,7 @@ void main() {
|
||||
}
|
||||
)";
|
||||
|
||||
static const char tex_vs[] = R"(#version 400
|
||||
static const char tex_vs[] = R"(#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
layout (location = 0) in vec3 a_position;
|
||||
|
@ -358,7 +358,7 @@ VulkanFragmentShader *ShaderManagerVulkan::GetFragmentShaderFromModule(VkShaderM
|
||||
// instantaneous.
|
||||
|
||||
#define CACHE_HEADER_MAGIC 0xff51f420
|
||||
#define CACHE_VERSION 13
|
||||
#define CACHE_VERSION 14
|
||||
struct VulkanCacheHeader {
|
||||
uint32_t magic;
|
||||
uint32_t version;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "GPU/Vulkan/TextureCacheVulkan.h"
|
||||
#include "GPU/Vulkan/VulkanUtil.h"
|
||||
|
||||
static const char *stencil_fs = R"(#version 400
|
||||
static const char *stencil_fs = R"(#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
layout (binding = 0) uniform sampler2D tex;
|
||||
@ -50,7 +50,7 @@ void main() {
|
||||
}
|
||||
)";
|
||||
|
||||
static const char stencil_vs[] = R"(#version 400
|
||||
static const char stencil_vs[] = R"(#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
layout (location = 0) out vec2 v_texcoord0;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "GPU/Vulkan/ShaderManagerVulkan.h"
|
||||
|
||||
static const char *vulkan_glsl_preamble =
|
||||
"#version 430\n"
|
||||
"#version 450\n"
|
||||
"#extension GL_ARB_separate_shader_objects : enable\n"
|
||||
"#extension GL_ARB_shading_language_420pack : enable\n\n";
|
||||
|
||||
|
@ -227,7 +227,7 @@ static const std::vector<ShaderSource> vsCol = {
|
||||
"}\n"
|
||||
},
|
||||
{ ShaderLanguage::GLSL_VULKAN,
|
||||
"#version 400\n"
|
||||
"#version 450\n"
|
||||
"#extension GL_ARB_separate_shader_objects : enable\n"
|
||||
"#extension GL_ARB_shading_language_420pack : enable\n"
|
||||
"layout (std140, set = 0, binding = 0) uniform bufferVals {\n"
|
||||
@ -293,7 +293,7 @@ static const std::vector<ShaderSource> vsTexCol = {
|
||||
"}\n"
|
||||
},
|
||||
{ ShaderLanguage::GLSL_VULKAN,
|
||||
"#version 400\n"
|
||||
"#version 450\n"
|
||||
"#extension GL_ARB_separate_shader_objects : enable\n"
|
||||
"#extension GL_ARB_shading_language_420pack : enable\n"
|
||||
"layout (std140, set = 0, binding = 0) uniform bufferVals {\n"
|
||||
|
Loading…
Reference in New Issue
Block a user