mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[Fix]: PSO caching broken? Just re-generate on mismatch (TODO: fix this later)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Debug.h"
|
||||
#include "../../Includes.h"
|
||||
#include "BlendState.h"
|
||||
|
||||
namespace MG_Util::Debug {
|
||||
static FILE* logFile;
|
||||
@@ -1951,6 +1952,36 @@ void Log##name(const char* format, ...) { \
|
||||
}
|
||||
#undef CASE
|
||||
}
|
||||
|
||||
const char* DiligentBlendFactorToString(Diligent::BLEND_FACTOR value) {
|
||||
static char str[128];
|
||||
switch (value) {
|
||||
#define CASE(value) \
|
||||
case value: return #value;
|
||||
CASE(Diligent::BLEND_FACTOR_UNDEFINED)
|
||||
CASE(Diligent::BLEND_FACTOR_ZERO)
|
||||
CASE(Diligent::BLEND_FACTOR_ONE)
|
||||
CASE(Diligent::BLEND_FACTOR_SRC_COLOR)
|
||||
CASE(Diligent::BLEND_FACTOR_INV_SRC_COLOR)
|
||||
CASE(Diligent::BLEND_FACTOR_SRC_ALPHA)
|
||||
CASE(Diligent::BLEND_FACTOR_INV_SRC_ALPHA)
|
||||
CASE(Diligent::BLEND_FACTOR_DEST_ALPHA)
|
||||
CASE(Diligent::BLEND_FACTOR_DEST_COLOR)
|
||||
CASE(Diligent::BLEND_FACTOR_INV_DEST_COLOR)
|
||||
CASE(Diligent::BLEND_FACTOR_SRC_ALPHA_SAT)
|
||||
CASE(Diligent::BLEND_FACTOR_BLEND_FACTOR)
|
||||
CASE(Diligent::BLEND_FACTOR_INV_BLEND_FACTOR)
|
||||
CASE(Diligent::BLEND_FACTOR_SRC1_COLOR)
|
||||
CASE(Diligent::BLEND_FACTOR_INV_SRC1_COLOR)
|
||||
CASE(Diligent::BLEND_FACTOR_SRC1_ALPHA)
|
||||
CASE(Diligent::BLEND_FACTOR_INV_SRC1_ALPHA)
|
||||
|
||||
default:
|
||||
sprintf(str, "0x%x", value);
|
||||
return str;
|
||||
}
|
||||
#undef CASE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user