mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 10:21:21 +00:00
rsx: Refactor out GLSLTypes from GLSLCommon to avoid warning spam due to unused functions when included in settings dialog code
This commit is contained in:
parent
6e92516070
commit
f2cac26154
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <sstream>
|
||||
|
||||
#include "GLSLTypes.h"
|
||||
#include "ShaderParam.h"
|
||||
|
||||
namespace program_common
|
||||
@ -132,19 +133,6 @@ namespace program_common
|
||||
|
||||
namespace glsl
|
||||
{
|
||||
enum program_domain
|
||||
{
|
||||
glsl_vertex_program = 0,
|
||||
glsl_fragment_program = 1,
|
||||
glsl_compute_program = 2
|
||||
};
|
||||
|
||||
enum glsl_rules
|
||||
{
|
||||
glsl_rules_opengl4,
|
||||
glsl_rules_rpirv
|
||||
};
|
||||
|
||||
static std::string getFloatTypeNameImpl(size_t elementCount)
|
||||
{
|
||||
switch (elementCount)
|
||||
@ -500,20 +488,6 @@ namespace glsl
|
||||
" ocol3 = " << reg3 << ";\n\n";
|
||||
}
|
||||
|
||||
struct shader_properties
|
||||
{
|
||||
glsl::program_domain domain;
|
||||
// Applicable in vertex stage
|
||||
bool require_lit_emulation;
|
||||
|
||||
// Only relevant for fragment programs
|
||||
bool require_wpos;
|
||||
bool require_depth_conversion;
|
||||
bool require_texture_ops;
|
||||
bool emulate_shadow_compare;
|
||||
bool low_precision_tests;
|
||||
};
|
||||
|
||||
static void insert_glsl_legacy_function(std::ostream& OS, const shader_properties& props)
|
||||
{
|
||||
OS << "#define _select mix\n";
|
||||
|
31
rpcs3/Emu/RSX/Common/GLSLTypes.h
Normal file
31
rpcs3/Emu/RSX/Common/GLSLTypes.h
Normal file
@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
namespace glsl
|
||||
{
|
||||
enum program_domain
|
||||
{
|
||||
glsl_vertex_program = 0,
|
||||
glsl_fragment_program = 1,
|
||||
glsl_compute_program = 2
|
||||
};
|
||||
|
||||
enum glsl_rules
|
||||
{
|
||||
glsl_rules_opengl4,
|
||||
glsl_rules_spirv
|
||||
};
|
||||
|
||||
struct shader_properties
|
||||
{
|
||||
glsl::program_domain domain;
|
||||
// Applicable in vertex stage
|
||||
bool require_lit_emulation;
|
||||
|
||||
// Only relevant for fragment programs
|
||||
bool require_wpos;
|
||||
bool require_depth_conversion;
|
||||
bool require_texture_ops;
|
||||
bool emulate_shadow_compare;
|
||||
bool low_precision_tests;
|
||||
};
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "../Common/ShaderParam.h"
|
||||
#include "../Common/GLSLCommon.h"
|
||||
#include "../Common/GLSLTypes.h"
|
||||
|
||||
namespace vk
|
||||
{
|
||||
|
@ -2,9 +2,9 @@
|
||||
#include "Emu/Memory/vm.h"
|
||||
#include "Emu/System.h"
|
||||
#include "VKFragmentProgram.h"
|
||||
|
||||
#include "VKCommonDecompiler.h"
|
||||
#include "VKHelpers.h"
|
||||
#include "../Common/GLSLCommon.h"
|
||||
#include "../GCM.h"
|
||||
|
||||
std::string VKFragmentDecompilerThread::getFloatTypeName(size_t elementCount)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "VKVertexProgram.h"
|
||||
#include "VKCommonDecompiler.h"
|
||||
#include "VKHelpers.h"
|
||||
#include "../Common/GLSLCommon.h"
|
||||
|
||||
std::string VKVertexDecompilerThread::getFloatTypeName(size_t elementCount)
|
||||
{
|
||||
@ -205,7 +206,7 @@ void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS)
|
||||
properties2.low_precision_tests = false;
|
||||
|
||||
glsl::insert_glsl_legacy_function(OS, properties2);
|
||||
glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_rpirv);
|
||||
glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_spirv);
|
||||
|
||||
std::string parameters = "";
|
||||
for (int i = 0; i < 16; ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user