mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +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
|
#pragma once
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "GLSLTypes.h"
|
||||||
#include "ShaderParam.h"
|
#include "ShaderParam.h"
|
||||||
|
|
||||||
namespace program_common
|
namespace program_common
|
||||||
@ -132,19 +133,6 @@ namespace program_common
|
|||||||
|
|
||||||
namespace glsl
|
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)
|
static std::string getFloatTypeNameImpl(size_t elementCount)
|
||||||
{
|
{
|
||||||
switch (elementCount)
|
switch (elementCount)
|
||||||
@ -500,20 +488,6 @@ namespace glsl
|
|||||||
" ocol3 = " << reg3 << ";\n\n";
|
" 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)
|
static void insert_glsl_legacy_function(std::ostream& OS, const shader_properties& props)
|
||||||
{
|
{
|
||||||
OS << "#define _select mix\n";
|
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
|
#pragma once
|
||||||
#include "../Common/ShaderParam.h"
|
#include "../Common/ShaderParam.h"
|
||||||
#include "../Common/GLSLCommon.h"
|
#include "../Common/GLSLTypes.h"
|
||||||
|
|
||||||
namespace vk
|
namespace vk
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
#include "Emu/Memory/vm.h"
|
#include "Emu/Memory/vm.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "VKFragmentProgram.h"
|
#include "VKFragmentProgram.h"
|
||||||
|
|
||||||
#include "VKCommonDecompiler.h"
|
#include "VKCommonDecompiler.h"
|
||||||
#include "VKHelpers.h"
|
#include "VKHelpers.h"
|
||||||
|
#include "../Common/GLSLCommon.h"
|
||||||
#include "../GCM.h"
|
#include "../GCM.h"
|
||||||
|
|
||||||
std::string VKFragmentDecompilerThread::getFloatTypeName(size_t elementCount)
|
std::string VKFragmentDecompilerThread::getFloatTypeName(size_t elementCount)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "VKVertexProgram.h"
|
#include "VKVertexProgram.h"
|
||||||
#include "VKCommonDecompiler.h"
|
#include "VKCommonDecompiler.h"
|
||||||
#include "VKHelpers.h"
|
#include "VKHelpers.h"
|
||||||
|
#include "../Common/GLSLCommon.h"
|
||||||
|
|
||||||
std::string VKVertexDecompilerThread::getFloatTypeName(size_t elementCount)
|
std::string VKVertexDecompilerThread::getFloatTypeName(size_t elementCount)
|
||||||
{
|
{
|
||||||
@ -205,7 +206,7 @@ void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS)
|
|||||||
properties2.low_precision_tests = false;
|
properties2.low_precision_tests = false;
|
||||||
|
|
||||||
glsl::insert_glsl_legacy_function(OS, properties2);
|
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 = "";
|
std::string parameters = "";
|
||||||
for (int i = 0; i < 16; ++i)
|
for (int i = 0; i < 16; ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user