mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
PixelShaderManager: Disable constant cache (won't work in the non-UBO path of the opengl backend).
ShaderGen: Replace typeid usage with more general code.
This commit is contained in:
@ -17,7 +17,6 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <locale.h>
|
||||
#include <typeinfo>
|
||||
|
||||
#include "NativeVertexFormat.h"
|
||||
|
||||
@ -85,14 +84,11 @@ template<class T>
|
||||
void GenerateVertexShader(T& out, u32 components, API_TYPE api_type)
|
||||
{
|
||||
#undef SetUidField
|
||||
#define SetUidField(name, value) if (typeid(T) == typeid(VertexShaderUid)) {out.GetUidData().name = value; };
|
||||
#define SetUidField(name, value) if (&out.GetUidData() != NULL) {out.GetUidData().name = value; };
|
||||
|
||||
if (typeid(T) == typeid(VertexShaderCode))
|
||||
{
|
||||
out.SetBuffer(text);
|
||||
out.SetBuffer(text);
|
||||
if (out.GetBuffer() != NULL)
|
||||
setlocale(LC_NUMERIC, "C"); // Reset locale for compilation
|
||||
}
|
||||
|
||||
|
||||
// text[sizeof(text) - 1] = 0x7C; // canary
|
||||
|
||||
@ -523,7 +519,7 @@ void GenerateVertexShader(T& out, u32 components, API_TYPE api_type)
|
||||
|
||||
/// if (text[sizeof(text) - 1] != 0x7C)
|
||||
/// PanicAlert("VertexShader generator - buffer too small, canary has been eaten!");
|
||||
if (typeid(T) == typeid(VertexShaderCode))
|
||||
if (out.GetBuffer() != NULL)
|
||||
setlocale(LC_NUMERIC, ""); // restore locale
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user