DepalettizeCommon -> TextureShaderCommon. Simplifications.

This commit is contained in:
Henrik Rydgård
2022-08-22 12:20:21 +02:00
parent 58a6fd3395
commit 82a6c42e17
26 changed files with 105 additions and 107 deletions
+2 -2
View File
@@ -1536,8 +1536,8 @@ set(GPU_SOURCES
${GPU_NEON}
GPU/Common/Draw2D.cpp
GPU/Common/Draw2D.h
GPU/Common/DepalettizeCommon.cpp
GPU/Common/DepalettizeCommon.h
GPU/Common/TextureShaderCommon.cpp
GPU/Common/TextureShaderCommon.h
GPU/Common/DepalettizeShaderCommon.cpp
GPU/Common/DepalettizeShaderCommon.h
GPU/Common/FragmentShaderGenerator.cpp
+2 -2
View File
@@ -34,7 +34,7 @@ static const InputDef vsInputs[2] = {
{ "vec2", "a_texcoord0", Draw::SEM_TEXCOORD0, },
};
// TODO: Deduplicate with DepalettizeCommon.cpp
// TODO: Deduplicate with TextureShaderCommon.cpp
static const SamplerDef samplers[2] = {
{ "tex" },
{ "pal" },
@@ -309,7 +309,7 @@ void GenerateDepalFs(char *buffer, const DepalConfig &config, const ShaderLangua
writer.EndFSMain("outColor", FSFLAG_NONE);
}
void GenerateDepalVs(char *buffer, const ShaderLanguageDesc &lang) {
void GenerateVs(char *buffer, const ShaderLanguageDesc &lang) {
ShaderWriter writer(buffer, lang, ShaderStage::Vertex, nullptr, 0);
writer.BeginVSMain(vsInputs, Slice<UniformDef>::empty(), varyings);
writer.C(" v_texcoord = a_texcoord0;\n");
+1 -1
View File
@@ -34,4 +34,4 @@ struct DepalConfig {
};
void GenerateDepalFs(char *buffer, const DepalConfig &config, const ShaderLanguageDesc &lang);
void GenerateDepalVs(char *buffer, const ShaderLanguageDesc &lang);
void GenerateVs(char *buffer, const ShaderLanguageDesc &lang);
+2 -2
View File
@@ -124,7 +124,7 @@ TextureCacheCommon::TextureCacheCommon(Draw::DrawContext *draw)
replacer_.Init();
depalShaderCache_ = new DepalShaderCache(draw);
depalShaderCache_ = new TextureShaderCache(draw);
}
TextureCacheCommon::~TextureCacheCommon() {
@@ -1860,7 +1860,7 @@ bool CanDepalettize(GETextureFormat texFormat, GEBufferFormat bufferFormat) {
}
void TextureCacheCommon::ApplyTextureFramebuffer(VirtualFramebuffer *framebuffer, GETextureFormat texFormat, RasterChannel channel) {
DepalShader *depalShader = nullptr;
TextureShader *depalShader = nullptr;
uint32_t clutMode = gstate.clutformat & 0xFFFFFF;
bool depth = channel == RASTER_DEPTH;
+3 -3
View File
@@ -29,7 +29,7 @@
#include "GPU/Common/GPUDebugInterface.h"
#include "GPU/Common/TextureDecoder.h"
#include "GPU/Common/TextureScalerCommon.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
enum FramebufferNotification {
NOTIFY_FB_CREATED,
@@ -291,7 +291,7 @@ public:
void InvalidateAll(GPUInvalidationType type);
void ClearNextFrame();
DepalShaderCache *GetDepalShaderCache() { return depalShaderCache_; }
TextureShaderCache *GetDepalShaderCache() { return depalShaderCache_; }
virtual void ForgetLastTexture() = 0;
virtual void InvalidateLastTexture() = 0;
@@ -403,7 +403,7 @@ protected:
TextureReplacer replacer_;
TextureScalerCommon scaler_;
FramebufferManagerCommon *framebufferManager_;
DepalShaderCache *depalShaderCache_;
TextureShaderCache *depalShaderCache_;
ShaderManagerCommon *shaderManager_;
bool clearCacheNextFrame_ = false;
@@ -25,8 +25,8 @@
#include "Core/Reporting.h"
#include "GPU/Common/DrawEngineCommon.h"
#include "GPU/Common/TextureCacheCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/Common/DepalettizeShaderCommon.h"
#include "GPU/Common/DepalettizeCommon.h"
static const VaryingDef varyings[1] = {
{ "vec2", "v_texcoord", Draw::SEM_TEXCOORD0, 0, "highp" },
@@ -37,22 +37,23 @@ static const SamplerDef samplers[2] = {
{ "pal" },
};
DepalShaderCache::DepalShaderCache(Draw::DrawContext *draw) : draw_(draw) { }
TextureShaderCache::TextureShaderCache(Draw::DrawContext *draw) : draw_(draw) { }
DepalShaderCache::~DepalShaderCache() {
TextureShaderCache::~TextureShaderCache() {
DeviceLost();
}
void DepalShaderCache::DeviceRestore(Draw::DrawContext *draw) {
void TextureShaderCache::DeviceRestore(Draw::DrawContext *draw) {
draw_ = draw;
}
void DepalShaderCache::DeviceLost() {
void TextureShaderCache::DeviceLost() {
Clear();
}
Draw::Texture *DepalShaderCache::GetClutTexture(GEPaletteFormat clutFormat, const u32 clutHash, u32 *rawClut) {
u32 clutId = GetClutID(clutFormat, clutHash);
Draw::Texture *TextureShaderCache::GetClutTexture(GEPaletteFormat clutFormat, const u32 clutHash, u32 *rawClut) {
// Simplistic, but works well enough.
u32 clutId = clutHash ^ (uint32_t)clutFormat;
auto oldtex = texCache_.find(clutId);
if (oldtex != texCache_.end()) {
@@ -100,15 +101,14 @@ Draw::Texture *DepalShaderCache::GetClutTexture(GEPaletteFormat clutFormat, cons
return tex->texture;
}
void DepalShaderCache::Clear() {
for (auto shader = cache_.begin(); shader != cache_.end(); ++shader) {
shader->second->fragShader->Release();
void TextureShaderCache::Clear() {
for (auto shader = depalCache_.begin(); shader != depalCache_.end(); ++shader) {
if (shader->second->pipeline) {
shader->second->pipeline->Release();
}
delete shader->second;
}
cache_.clear();
depalCache_.clear();
for (auto tex = texCache_.begin(); tex != texCache_.end(); ++tex) {
tex->second->texture->Release();
delete tex->second;
@@ -124,7 +124,7 @@ void DepalShaderCache::Clear() {
}
}
void DepalShaderCache::Decimate() {
void TextureShaderCache::Decimate() {
for (auto tex = texCache_.begin(); tex != texCache_.end(); ) {
if (tex->second->lastFrame + DEPAL_TEXTURE_OLD_AGE < gpuStats.numFlips) {
tex->second->texture->Release();
@@ -136,7 +136,7 @@ void DepalShaderCache::Decimate() {
}
}
Draw::SamplerState *DepalShaderCache::GetSampler() {
Draw::SamplerState *TextureShaderCache::GetSampler() {
if (!nearestSampler_) {
Draw::SamplerStateDesc desc{};
desc.wrapU = Draw::TextureAddressMode::CLAMP_TO_EDGE;
@@ -147,39 +147,16 @@ Draw::SamplerState *DepalShaderCache::GetSampler() {
return nearestSampler_;
}
DepalShader *DepalShaderCache::GetDepalettizeShader(uint32_t clutMode, GETextureFormat textureFormat, GEBufferFormat bufferFormat) {
TextureShader *TextureShaderCache::CreateShader(const char *fs) {
using namespace Draw;
u32 id = GenerateShaderID(clutMode, textureFormat, bufferFormat);
auto shader = cache_.find(id);
if (shader != cache_.end()) {
DepalShader *depal = shader->second;
return shader->second;
}
char *buffer = new char[4096];
if (!vertexShader_) {
GenerateDepalVs(buffer, draw_->GetShaderLanguageDesc());
char *buffer = new char[4096];
GenerateVs(buffer, draw_->GetShaderLanguageDesc());
vertexShader_ = draw_->CreateShaderModule(ShaderStage::Vertex, draw_->GetShaderLanguageDesc().shaderLanguage, (const uint8_t *)buffer, strlen(buffer), "depal_vs");
delete[] buffer;
}
// TODO: Parse these out of clutMode some nice way, to become a bit more stateless.
DepalConfig config;
config.clutFormat = gstate.getClutPaletteFormat();
config.startPos = gstate.getClutIndexStartPos();
config.shift = gstate.getClutIndexShift();
config.mask = gstate.getClutIndexMask();
config.bufferFormat = bufferFormat;
config.textureFormat = textureFormat;
GenerateDepalFs(buffer, config, draw_->GetShaderLanguageDesc());
std::string src(buffer);
ShaderModule *fragShader = draw_->CreateShaderModule(ShaderStage::Fragment, draw_->GetShaderLanguageDesc().shaderLanguage, (const uint8_t *)buffer, strlen(buffer), "depal_fs");
DepalShader *depal = new DepalShader();
ShaderModule *fragShader = draw_->CreateShaderModule(ShaderStage::Fragment, draw_->GetShaderLanguageDesc().shaderLanguage, (const uint8_t *)fs, strlen(fs), "depal_fs");
static const InputLayoutDesc desc = {
{
@@ -201,38 +178,67 @@ DepalShader *DepalShaderCache::GetDepalettizeShader(uint32_t clutMode, GETexture
{ vertexShader_, fragShader },
inputLayout, noDepthStencil, blendOff, rasterNoCull, nullptr, samplers
};
Pipeline *pipeline = draw_->CreateGraphicsPipeline(depalPipelineDesc);
inputLayout->Release();
blendOff->Release();
noDepthStencil->Release();
rasterNoCull->Release();
fragShader->Release();
_assert_(pipeline);
TextureShader *depal = new TextureShader();
depal->pipeline = pipeline;
depal->fragShader = fragShader;
depal->code = buffer;
cache_[id] = depal;
delete[] buffer;
return depal->pipeline ? depal : nullptr;
depal->code = fs; // to std::string
return depal;
}
std::vector<std::string> DepalShaderCache::DebugGetShaderIDs(DebugShaderType type) {
TextureShader *TextureShaderCache::GetDepalettizeShader(uint32_t clutMode, GETextureFormat textureFormat, GEBufferFormat bufferFormat) {
using namespace Draw;
// Generate an ID for depal shaders.
u32 id = (clutMode & 0xFFFFFF) | (textureFormat << 24) | (bufferFormat << 28);
auto shader = depalCache_.find(id);
if (shader != depalCache_.end()) {
TextureShader *depal = shader->second;
return shader->second;
}
// TODO: Parse these out of clutMode some nice way, to become a bit more stateless.
DepalConfig config;
config.clutFormat = gstate.getClutPaletteFormat();
config.startPos = gstate.getClutIndexStartPos();
config.shift = gstate.getClutIndexShift();
config.mask = gstate.getClutIndexMask();
config.bufferFormat = bufferFormat;
config.textureFormat = textureFormat;
char *buffer = new char[4096];
GenerateDepalFs(buffer, config, draw_->GetShaderLanguageDesc());
TextureShader *ts = CreateShader(buffer);
delete[] buffer;
depalCache_[id] = ts;
return ts->pipeline ? ts : nullptr;
}
std::vector<std::string> TextureShaderCache::DebugGetShaderIDs(DebugShaderType type) {
std::vector<std::string> ids;
for (auto &iter : cache_) {
for (auto &iter : depalCache_) {
ids.push_back(StringFromFormat("%08x", iter.first));
}
return ids;
}
std::string DepalShaderCache::DebugGetShaderString(std::string idstr, DebugShaderType type, DebugShaderStringType stringType) {
std::string TextureShaderCache::DebugGetShaderString(std::string idstr, DebugShaderType type, DebugShaderStringType stringType) {
uint32_t id;
sscanf(idstr.c_str(), "%08x", &id);
auto iter = cache_.find(id);
if (iter == cache_.end())
auto iter = depalCache_.find(id);
if (iter == depalCache_.end())
return "";
switch (stringType) {
case SHADER_STRING_SHORT_DESC:
@@ -245,7 +251,7 @@ std::string DepalShaderCache::DebugGetShaderString(std::string idstr, DebugShade
}
// TODO: Merge with DepalShaderCache?
void DepalShaderCache::ApplyShader(DepalShader *shader, float bufferW, float bufferH, int renderW, int renderH, const KnownVertexBounds &bounds, u32 uoff, u32 voff) {
void TextureShaderCache::ApplyShader(TextureShader *shader, float bufferW, float bufferH, int renderW, int renderH, const KnownVertexBounds &bounds, u32 uoff, u32 voff) {
Draw2DVertex verts[4] = {
{-1, -1, 0, 0 },
{ 1, -1, 1, 0 },
@@ -29,9 +29,8 @@
#include "GPU/Common/ShaderCommon.h"
#include "GPU/Common/DepalettizeShaderCommon.h"
class DepalShader {
class TextureShader {
public:
Draw::ShaderModule *fragShader;
Draw::Pipeline *pipeline;
std::string code;
};
@@ -42,19 +41,19 @@ public:
int lastFrame;
};
// For CLUT depal shaders, and other pre-bind texture shaders.
// Caches both shaders and palette textures.
class DepalShaderCache {
class TextureShaderCache {
public:
DepalShaderCache(Draw::DrawContext *draw);
~DepalShaderCache();
TextureShaderCache(Draw::DrawContext *draw);
~TextureShaderCache();
// This also uploads the palette and binds the correct texture.
DepalShader *GetDepalettizeShader(uint32_t clutMode, GETextureFormat texFormat, GEBufferFormat pixelFormat);
TextureShader *GetDepalettizeShader(uint32_t clutMode, GETextureFormat texFormat, GEBufferFormat pixelFormat);
Draw::Texture *GetClutTexture(GEPaletteFormat clutFormat, const u32 clutHash, u32 *rawClut);
Draw::SamplerState *GetSampler();
void ApplyShader(DepalShader *shader, float bufferW, float bufferH, int renderW, int renderH, const KnownVertexBounds &bounds, u32 uoff, u32 voff);
void ApplyShader(TextureShader *shader, float bufferW, float bufferH, int renderW, int renderH, const KnownVertexBounds &bounds, u32 uoff, u32 voff);
void Clear();
void Decimate();
@@ -65,19 +64,12 @@ public:
void DeviceRestore(Draw::DrawContext *draw);
private:
static uint32_t GenerateShaderID(uint32_t clutMode, GETextureFormat texFormat, GEBufferFormat pixelFormat) {
return (clutMode & 0xFFFFFF) | (pixelFormat << 24) | (texFormat << 28);
}
static uint32_t GetClutID(GEPaletteFormat clutFormat, uint32_t clutHash) {
// Simplistic.
return clutHash ^ (uint32_t)clutFormat;
}
TextureShader *CreateShader(const char *fs);
Draw::DrawContext *draw_;
Draw::ShaderModule *vertexShader_ = nullptr;
Draw::SamplerState *nearestSampler_ = nullptr;
std::map<u32, DepalShader *> cache_;
std::map<u32, TextureShader *> depalCache_;
std::map<u32, DepalTexture *> texCache_;
};
+1 -1
View File
@@ -23,7 +23,7 @@
#include "GPU/GPUCommon.h"
#include "GPU/D3D11/DrawEngineD3D11.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/Common/VertexDecoderCommon.h"
class FramebufferManagerD3D11;
+1 -1
View File
@@ -31,7 +31,7 @@
#include "GPU/D3D11/TextureCacheD3D11.h"
#include "GPU/D3D11/FramebufferManagerD3D11.h"
#include "GPU/D3D11/ShaderManagerD3D11.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/D3D11/D3D11Util.h"
#include "GPU/Common/FramebufferManagerCommon.h"
#include "GPU/Common/TextureDecoder.h"
+1 -1
View File
@@ -28,7 +28,7 @@
struct VirtualFramebuffer;
class FramebufferManagerD3D11;
class DepalShaderCache;
class TextureShaderCache;
class ShaderManagerD3D11;
class SamplerCacheD3D11 {
+1 -1
View File
@@ -23,7 +23,7 @@
#include "GPU/GPUCommon.h"
#include "GPU/Directx9/FramebufferManagerDX9.h"
#include "GPU/Directx9/DrawEngineDX9.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/Common/VertexDecoderCommon.h"
class ShaderManagerDX9;
+1 -1
View File
@@ -28,7 +28,7 @@
#include "GPU/Directx9/FramebufferManagerDX9.h"
#include "GPU/Directx9/ShaderManagerDX9.h"
#include "Common/GPU/D3D9/D3D9StateCache.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/Common/FramebufferManagerCommon.h"
#include "GPU/Common/TextureDecoder.h"
#include "Core/Config.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include "GPU/Common/TextureCacheCommon.h"
struct VirtualFramebuffer;
class DepalShaderCache;
class TextureShaderCache;
class FramebufferManagerDX9;
class ShaderManagerDX9;
+1 -1
View File
@@ -23,7 +23,7 @@
#include "Common/File/Path.h"
#include "GPU/GPUCommon.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/GLES/FramebufferManagerGLES.h"
#include "GPU/GLES/DrawEngineGLES.h"
#include "GPU/GLES/FragmentTestCacheGLES.h"
+1 -1
View File
@@ -36,7 +36,7 @@
#include "GPU/GLES/TextureCacheGLES.h"
#include "GPU/GLES/FramebufferManagerGLES.h"
#include "GPU/Common/FragmentShaderGenerator.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/GLES/ShaderManagerGLES.h"
#include "GPU/GLES/DrawEngineGLES.h"
#include "GPU/Common/TextureDecoder.h"
+2 -2
View File
@@ -27,7 +27,7 @@
struct VirtualFramebuffer;
class FramebufferManagerGLES;
class DepalShaderCache;
class TextureShaderCache;
class ShaderManagerGLES;
class DrawEngineGLES;
class GLRTexture;
@@ -41,7 +41,7 @@ public:
void StartFrame() override;
void SetFramebufferManager(FramebufferManagerGLES *fbManager);
void SetDepalShaderCache(DepalShaderCache *dpCache) {
void SetDepalShaderCache(TextureShaderCache *dpCache) {
depalShaderCache_ = dpCache;
}
void SetDrawEngine(DrawEngineGLES *td) {
+2 -2
View File
@@ -338,7 +338,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\ext\xbrz\xbrz.h" />
<ClInclude Include="Common\DepalettizeCommon.h" />
<ClInclude Include="Common\TextureShaderCommon.h" />
<ClInclude Include="Common\Draw2D.h" />
<ClInclude Include="Common\ReinterpretFramebuffer.h" />
<ClInclude Include="Common\DepalettizeShaderCommon.h" />
@@ -452,7 +452,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\ext\xbrz\xbrz.cpp" />
<ClCompile Include="Common\DepalettizeCommon.cpp" />
<ClCompile Include="Common\TextureShaderCommon.cpp" />
<ClCompile Include="Common\Draw2D.cpp" />
<ClCompile Include="Common\ReinterpretFramebuffer.cpp" />
<ClCompile Include="Common\DepalettizeShaderCommon.cpp" />
+2 -2
View File
@@ -255,7 +255,7 @@
<ClInclude Include="Common\Draw2D.h">
<Filter>Common</Filter>
</ClInclude>
<ClInclude Include="Common\DepalettizeCommon.h">
<ClInclude Include="Common\TextureShaderCommon.h">
<Filter>Common</Filter>
</ClInclude>
</ItemGroup>
@@ -503,7 +503,7 @@
<ClCompile Include="Common\Draw2D.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="Common\DepalettizeCommon.cpp">
<ClCompile Include="Common\TextureShaderCommon.cpp">
<Filter>Common</Filter>
</ClCompile>
</ItemGroup>
+1 -1
View File
@@ -25,7 +25,7 @@
#include "GPU/GPUCommon.h"
#include "GPU/Vulkan/DrawEngineVulkan.h"
#include "GPU/Vulkan/PipelineManagerVulkan.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
class FramebufferManagerVulkan;
class ShaderManagerVulkan;
+1 -1
View File
@@ -41,7 +41,7 @@
#include "GPU/ge_constants.h"
#include "GPU/GPUState.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/Common/PostShader.h"
#include "GPU/Common/TextureCacheCommon.h"
#include "GPU/Common/TextureDecoder.h"
+1 -1
View File
@@ -22,7 +22,7 @@
#include "GPU/GPUState.h"
#include "Common/GPU/Vulkan/VulkanContext.h"
#include "GPU/Common/TextureCacheCommon.h"
#include "GPU/Common/DepalettizeCommon.h"
#include "GPU/Common/TextureShaderCommon.h"
#include "GPU/Vulkan/VulkanUtil.h"
struct VirtualFramebuffer;
+3 -3
View File
@@ -379,7 +379,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\GPU\Common\DepalettizeCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureShaderCommon.h" />
<ClInclude Include="..\..\GPU\Common\DepalettizeShaderCommon.h" />
<ClInclude Include="..\..\GPU\Common\Draw2D.h" />
<ClInclude Include="..\..\GPU\Common\DrawEngineCommon.h" />
@@ -439,7 +439,7 @@
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\GPU\Common\DepalettizeCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureShaderCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\DepalettizeShaderCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\Draw2D.cpp" />
<ClCompile Include="..\..\GPU\Common\DrawEngineCommon.cpp" />
@@ -527,4 +527,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+3 -3
View File
@@ -57,7 +57,7 @@
<ClCompile Include="..\..\GPU\Common\VertexShaderGenerator.cpp" />
<ClCompile Include="..\..\GPU\Common\ReinterpretFramebuffer.cpp" />
<ClCompile Include="..\..\GPU\Common\Draw2D.cpp" />
<ClCompile Include="..\..\GPU\Common\DepalettizeCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureShaderCommon.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\GPU\Common\DepalettizeShaderCommon.h" />
@@ -117,6 +117,6 @@
<ClInclude Include="..\..\GPU\Common\VertexShaderGenerator.h" />
<ClInclude Include="..\..\GPU\Common\ReinterpretFramebuffer.h" />
<ClInclude Include="..\..\GPU\Common\Draw2D.h" />
<ClInclude Include="..\..\GPU\Common\DepalettizeCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureShaderCommon.h" />
</ItemGroup>
</Project>
</Project>
+1 -1
View File
@@ -319,7 +319,7 @@ EXEC_AND_LIB_FILES := \
$(SRC)/GPU/GeConstants.cpp \
$(SRC)/GPU/GeDisasm.cpp \
$(SRC)/GPU/Common/Draw2D.cpp \
$(SRC)/GPU/Common/DepalettizeCommon.cpp \
$(SRC)/GPU/Common/TextureShaderCommon.cpp \
$(SRC)/GPU/Common/DepalettizeShaderCommon.cpp \
$(SRC)/GPU/Common/FragmentShaderGenerator.cpp \
$(SRC)/GPU/Common/FramebufferManagerCommon.cpp \
+1 -1
View File
@@ -327,7 +327,7 @@ SOURCES_CXX += \
$(GPUCOMMONDIR)/ShaderCommon.cpp \
$(GPUCOMMONDIR)/ShaderUniforms.cpp \
$(GPUCOMMONDIR)/GPUDebugInterface.cpp \
$(GPUCOMMONDIR)/DepalettizeCommon.cpp \
$(GPUCOMMONDIR)/TextureShaderCommon.cpp \
$(GPUCOMMONDIR)/DepalettizeShaderCommon.cpp \
$(GPUCOMMONDIR)/TransformCommon.cpp \
$(GPUCOMMONDIR)/IndexGenerator.cpp \
+1 -1
View File
@@ -321,7 +321,7 @@ bool TestDepalShaders() {
printf("===\n%s\n===\n", buffer);
}
GenerateDepalVs(buffer, desc);
GenerateVs(buffer, desc);
if (!TestCompileShader(buffer, languages[k], ShaderStage::Vertex, &errorMessage)) {
printf("Error compiling depal shader:\n\n%s\n\n%s\n", LineNumberString(buffer).c_str(), errorMessage.c_str());
failed = true;