mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #13246 from hrydgard/framebuffer-code-cleanups
Framebuffer code cleanups, log changes, enable BlockTransferAllowCreateFB for Burnout Legends
This commit is contained in:
commit
9f147e870b
17 changed files with 109 additions and 39 deletions
|
@ -1402,6 +1402,8 @@ set(GPU_SOURCES
|
|||
GPU/Debugger/RecordFormat.h
|
||||
GPU/Debugger/Stepping.cpp
|
||||
GPU/Debugger/Stepping.h
|
||||
GPU/ge_constants.h
|
||||
GPU/GeConstants.cpp
|
||||
GPU/GPUInterface.h
|
||||
GPU/GeDisasm.cpp
|
||||
GPU/GeDisasm.h
|
||||
|
|
|
@ -45,6 +45,10 @@ FramebufferManagerCommon::FramebufferManagerCommon(Draw::DrawContext *draw)
|
|||
: draw_(draw),
|
||||
displayFormat_(GE_FORMAT_565) {
|
||||
presentation_ = new PresentationCommon(draw);
|
||||
|
||||
// See comment from where it's used below.
|
||||
// As for the use of IsGLES, just the way it was. Scary to change it.
|
||||
clearFramebufferOnFirstUseHack_ = gl_extensions.IsGLES;
|
||||
}
|
||||
|
||||
FramebufferManagerCommon::~FramebufferManagerCommon() {
|
||||
|
@ -500,7 +504,7 @@ void FramebufferManagerCommon::NotifyRenderFramebufferUpdated(VirtualFramebuffer
|
|||
|
||||
void FramebufferManagerCommon::NotifyRenderFramebufferSwitched(VirtualFramebuffer *prevVfb, VirtualFramebuffer *vfb, bool isClearingDepth) {
|
||||
if (ShouldDownloadFramebuffer(vfb) && !vfb->memoryUpdated) {
|
||||
ReadFramebufferToMemory(vfb, true, 0, 0, vfb->width, vfb->height);
|
||||
ReadFramebufferToMemory(vfb, 0, 0, vfb->width, vfb->height);
|
||||
vfb->usageFlags = (vfb->usageFlags | FB_USAGE_DOWNLOAD) & ~FB_USAGE_DOWNLOAD_CLEAR;
|
||||
vfb->firstFrameSaved = true;
|
||||
} else {
|
||||
|
@ -527,13 +531,12 @@ void FramebufferManagerCommon::NotifyRenderFramebufferSwitched(VirtualFramebuffe
|
|||
if (useBufferedRendering_) {
|
||||
if (vfb->fbo) {
|
||||
shaderManager_->DirtyLastShader();
|
||||
if (gl_extensions.IsGLES) {
|
||||
// Some tiled mobile GPUs benefit IMMENSELY from clearing an FBO before rendering
|
||||
// to it. This broke stuff before, so now it only clears on the first use of an
|
||||
// FBO in a frame. This means that some games won't be able to avoid the on-some-GPUs
|
||||
// performance-crushing framebuffer reloads from RAM, but we'll have to live with that.
|
||||
|
||||
// Wait, can we even do this? Seems highly unsafe.. TODO: Remove
|
||||
if (clearFramebufferOnFirstUseHack_) {
|
||||
// HACK: Some tiled mobile GPUs benefit IMMENSELY from clearing an FBO before rendering
|
||||
// to it (or in Vulkan, clear during framebuffer load). This is a hack to force this
|
||||
// the first time a framebuffer is bound for rendering in a frame.
|
||||
//
|
||||
// Quite unsafe as it might kill some feedback effects.
|
||||
if (vfb->last_frame_render != gpuStats.numFlips) {
|
||||
draw_->BindFramebufferAsRenderTarget(vfb->fbo, { Draw::RPAction::CLEAR, Draw::RPAction::CLEAR, Draw::RPAction::CLEAR }, "FramebufferSwitch");
|
||||
} else {
|
||||
|
@ -809,7 +812,7 @@ void FramebufferManagerCommon::DownloadFramebufferOnSwitch(VirtualFramebuffer *v
|
|||
// To support this, we save the first frame to memory when we have a safe w/h.
|
||||
// Saving each frame would be slow.
|
||||
if (!g_Config.bDisableSlowFramebufEffects) {
|
||||
ReadFramebufferToMemory(vfb, true, 0, 0, vfb->safeWidth, vfb->safeHeight);
|
||||
ReadFramebufferToMemory(vfb, 0, 0, vfb->safeWidth, vfb->safeHeight);
|
||||
vfb->usageFlags = (vfb->usageFlags | FB_USAGE_DOWNLOAD) & ~FB_USAGE_DOWNLOAD_CLEAR;
|
||||
vfb->firstFrameSaved = true;
|
||||
vfb->safeWidth = 0;
|
||||
|
@ -975,8 +978,7 @@ void FramebufferManagerCommon::DecimateFBOs() {
|
|||
int age = frameLastFramebufUsed_ - std::max(vfb->last_frame_render, vfb->last_frame_used);
|
||||
|
||||
if (ShouldDownloadFramebuffer(vfb) && age == 0 && !vfb->memoryUpdated) {
|
||||
bool sync = gl_extensions.IsGLES;
|
||||
ReadFramebufferToMemory(vfb, sync, 0, 0, vfb->width, vfb->height);
|
||||
ReadFramebufferToMemory(vfb, 0, 0, vfb->width, vfb->height);
|
||||
vfb->usageFlags = (vfb->usageFlags | FB_USAGE_DOWNLOAD) & ~FB_USAGE_DOWNLOAD_CLEAR;
|
||||
vfb->firstFrameSaved = true;
|
||||
}
|
||||
|
@ -1187,7 +1189,7 @@ bool FramebufferManagerCommon::NotifyFramebufferCopy(u32 src, u32 dst, int size,
|
|||
if (srcH == 0 || srcY + srcH > srcBuffer->bufferHeight) {
|
||||
WARN_LOG_REPORT_ONCE(btdcpyheight, G3D, "Memcpy fbo download %08x -> %08x skipped, %d+%d is taller than %d", src, dst, srcY, srcH, srcBuffer->bufferHeight);
|
||||
} else if (g_Config.bBlockTransferGPU && !srcBuffer->memoryUpdated && !PSP_CoreParameter().compat.flags().DisableReadbacks) {
|
||||
ReadFramebufferToMemory(srcBuffer, true, 0, srcY, srcBuffer->width, srcH);
|
||||
ReadFramebufferToMemory(srcBuffer, 0, srcY, srcBuffer->width, srcH);
|
||||
srcBuffer->usageFlags = (srcBuffer->usageFlags | FB_USAGE_DOWNLOAD) & ~FB_USAGE_DOWNLOAD_CLEAR;
|
||||
}
|
||||
return false;
|
||||
|
@ -1302,7 +1304,7 @@ VirtualFramebuffer *FramebufferManagerCommon::CreateRAMFramebuffer(uint32_t fbAd
|
|||
float renderWidthFactor = renderWidth_ / 480.0f;
|
||||
float renderHeightFactor = renderHeight_ / 272.0f;
|
||||
|
||||
DEBUG_LOG(G3D, "Creating RAM framebuffer at %08x (%dx%d, stride %d, format %d)", fbAddress, width, height, stride, format);
|
||||
INFO_LOG(G3D, "Creating RAM framebuffer at %08x (%dx%d, stride %d, format %d)", fbAddress, width, height, stride, format);
|
||||
|
||||
// A target for the destination is missing - so just create one!
|
||||
// Make sure this one would be found by the algorithm above so we wouldn't
|
||||
|
@ -1587,7 +1589,7 @@ bool FramebufferManagerCommon::NotifyBlockTransferBefore(u32 dstBasePtr, int dst
|
|||
} else {
|
||||
if (tooTall)
|
||||
WARN_LOG_ONCE(btdheight, G3D, "Block transfer download %08x -> %08x dangerous, %d+%d is taller than %d", srcBasePtr, dstBasePtr, srcY, srcHeight, srcBuffer->bufferHeight);
|
||||
ReadFramebufferToMemory(srcBuffer, true, static_cast<int>(srcX * srcXFactor), srcY, static_cast<int>(srcWidth * srcXFactor), srcHeight);
|
||||
ReadFramebufferToMemory(srcBuffer, static_cast<int>(srcX * srcXFactor), srcY, static_cast<int>(srcWidth * srcXFactor), srcHeight);
|
||||
srcBuffer->usageFlags = (srcBuffer->usageFlags | FB_USAGE_DOWNLOAD) & ~FB_USAGE_DOWNLOAD_CLEAR;
|
||||
}
|
||||
}
|
||||
|
@ -1971,7 +1973,7 @@ void FramebufferManagerCommon::PackFramebufferSync_(VirtualFramebuffer *vfb, int
|
|||
gpuStats.numReadbacks++;
|
||||
}
|
||||
|
||||
void FramebufferManagerCommon::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool sync, int x, int y, int w, int h) {
|
||||
void FramebufferManagerCommon::ReadFramebufferToMemory(VirtualFramebuffer *vfb, int x, int y, int w, int h) {
|
||||
// Clamp to bufferWidth. Sometimes block transfers can cause this to hit.
|
||||
if (x + w >= vfb->bufferWidth) {
|
||||
w = vfb->bufferWidth - x;
|
||||
|
|
|
@ -68,13 +68,15 @@ struct VirtualFramebuffer {
|
|||
|
||||
// There's also a top left of the drawing region, but meh...
|
||||
|
||||
// width/height: The detected size of the current framebuffer.
|
||||
// width/height: The detected size of the current framebuffer, in original PSP pixels.
|
||||
u16 width;
|
||||
u16 height;
|
||||
|
||||
// renderWidth/renderHeight: The scaled size we render at. May be scaled to render at higher resolutions.
|
||||
// The physical buffer may be larger than renderWidth/renderHeight.
|
||||
u16 renderWidth;
|
||||
u16 renderHeight;
|
||||
|
||||
// bufferWidth/bufferHeight: The pre-scaling size of the buffer itself. May only be bigger than width/height.
|
||||
// Actual physical buffer is this size times the render resolution multiplier.
|
||||
// The buffer may be used to render a width or height from 0 to these values without being recreated.
|
||||
|
@ -187,7 +189,7 @@ class TextureCacheCommon;
|
|||
|
||||
class FramebufferManagerCommon {
|
||||
public:
|
||||
FramebufferManagerCommon(Draw::DrawContext *draw);
|
||||
explicit FramebufferManagerCommon(Draw::DrawContext *draw);
|
||||
virtual ~FramebufferManagerCommon();
|
||||
|
||||
virtual void Init();
|
||||
|
@ -231,7 +233,7 @@ public:
|
|||
bool NotifyBlockTransferBefore(u32 dstBasePtr, int dstStride, int dstX, int dstY, u32 srcBasePtr, int srcStride, int srcX, int srcY, int w, int h, int bpp, u32 skipDrawReason);
|
||||
void NotifyBlockTransferAfter(u32 dstBasePtr, int dstStride, int dstX, int dstY, u32 srcBasePtr, int srcStride, int srcX, int srcY, int w, int h, int bpp, u32 skipDrawReason);
|
||||
|
||||
void ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool sync, int x, int y, int w, int h);
|
||||
void ReadFramebufferToMemory(VirtualFramebuffer *vfb, int x, int y, int w, int h);
|
||||
|
||||
void DownloadFramebufferForClut(u32 fb_address, u32 loadBytes);
|
||||
void DrawFramebufferToOutput(const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride);
|
||||
|
@ -394,6 +396,7 @@ protected:
|
|||
std::vector<VirtualFramebuffer *> bvfbs_; // blitting framebuffers (for download)
|
||||
|
||||
bool gameUsesSequentialCopies_ = false;
|
||||
bool clearFramebufferOnFirstUseHack_ = false;
|
||||
|
||||
// Sampled in BeginFrame for safety.
|
||||
float renderWidth_ = 0.0f;
|
||||
|
|
|
@ -772,13 +772,13 @@ bool TextureCacheCommon::AttachFramebuffer(TexCacheEntry *entry, u32 address, Vi
|
|||
|
||||
// If they match exactly, it's non-CLUT and from the top left.
|
||||
if (exactMatch) {
|
||||
DEBUG_LOG(G3D, "Render to texture detected at %08x!", address);
|
||||
if (framebuffer->fb_stride != entry->bufw) {
|
||||
WARN_LOG_REPORT_ONCE(diffStrides1, G3D, "Render to texture with different strides %d != %d", entry->bufw, framebuffer->fb_stride);
|
||||
WARN_LOG_REPORT_ONCE(diffStrides1, G3D, "Texturing from framebuffer with different strides %d != %d", entry->bufw, framebuffer->fb_stride);
|
||||
}
|
||||
// NOTE: This check is okay because the first texture formats are the same as the buffer formats.
|
||||
if (entry->format != (GETextureFormat)framebuffer->format) {
|
||||
WARN_LOG_REPORT_ONCE(diffFormat1, G3D, "Render to texture with different formats %d != %d", entry->format, framebuffer->format);
|
||||
// Let's avoid using it when we know the format is wrong. May be a video/etc. updating memory.
|
||||
WARN_LOG_REPORT_ONCE(diffFormat1, G3D, "Texturing from framebuffer with different formats %d != %d", entry->format, framebuffer->format);
|
||||
// Let's avoid using it when we know the format is wrong. May be a video/etc. updating memory.
|
||||
// However, some games use a different format to clear the buffer.
|
||||
if (framebuffer->last_frame_attached + 1 < gpuStats.numFlips) {
|
||||
DetachFramebuffer(entry, address, framebuffer);
|
||||
|
@ -792,10 +792,12 @@ bool TextureCacheCommon::AttachFramebuffer(TexCacheEntry *entry, u32 address, Vi
|
|||
if (!framebufferManager_->UseBufferedRendering())
|
||||
return false;
|
||||
|
||||
const bool clutFormat =
|
||||
const bool matchingClutFormat =
|
||||
(framebuffer->format == GE_FORMAT_8888 && entry->format == GE_TFMT_CLUT32) ||
|
||||
(framebuffer->format != GE_FORMAT_8888 && entry->format == GE_TFMT_CLUT16);
|
||||
|
||||
const bool clutFormat = IsClutFormat((GETextureFormat)(entry->format));
|
||||
|
||||
const u32 bitOffset = (texaddr - addr) * 8;
|
||||
const u32 pixelOffset = bitOffset / std::max(1U, (u32)textureBitsPerPixel[entry->format]);
|
||||
fbInfo.yOffset = entry->bufw == 0 ? 0 : pixelOffset / entry->bufw;
|
||||
|
@ -803,7 +805,8 @@ bool TextureCacheCommon::AttachFramebuffer(TexCacheEntry *entry, u32 address, Vi
|
|||
|
||||
if (framebuffer->fb_stride != entry->bufw) {
|
||||
if (noOffset) {
|
||||
WARN_LOG_REPORT_ONCE(diffStrides2, G3D, "Render to texture using CLUT with different strides %d != %d", entry->bufw, framebuffer->fb_stride);
|
||||
// Not actually sure why we even try here. There's no way it'll go well if the strides are different.
|
||||
WARN_LOG_ONCE(diffStrides2, G3D, "Texturing from framebuffer (matching_clut=%s) different strides %d != %d", matchingClutFormat ? "yes" : "no", entry->bufw, framebuffer->fb_stride);
|
||||
} else {
|
||||
// Assume any render-to-tex with different bufw + offset is a render from ram.
|
||||
DetachFramebuffer(entry, address, framebuffer);
|
||||
|
@ -823,32 +826,36 @@ bool TextureCacheCommon::AttachFramebuffer(TexCacheEntry *entry, u32 address, Vi
|
|||
DetachFramebuffer(entry, address, framebuffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Trying to play it safe. Below 0x04110000 is almost always framebuffers.
|
||||
// TODO: Maybe we can reduce this check and find a better way above 0x04110000?
|
||||
if (fbInfo.yOffset > MAX_SUBAREA_Y_OFFSET_SAFE && addr > 0x04110000) {
|
||||
WARN_LOG_REPORT_ONCE(subareaIgnored, G3D, "Ignoring possible render to texture at %08x +%dx%d / %dx%d", address, fbInfo.xOffset, fbInfo.yOffset, framebuffer->width, framebuffer->height);
|
||||
WARN_LOG_REPORT_ONCE(subareaIgnored, G3D, "Ignoring possible texturing from framebuffer at %08x +%dx%d / %dx%d", address, fbInfo.xOffset, fbInfo.yOffset, framebuffer->width, framebuffer->height);
|
||||
DetachFramebuffer(entry, address, framebuffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for CLUT. The framebuffer is always RGB, but it can be interpreted as a CLUT texture.
|
||||
// 3rd Birthday (and a bunch of other games) render to a 16 bit clut texture.
|
||||
if (clutFormat) {
|
||||
if (matchingClutFormat) {
|
||||
if (!noOffset) {
|
||||
WARN_LOG_REPORT_ONCE(subareaClut, G3D, "Render to texture using CLUT with offset at %08x +%dx%d", address, fbInfo.xOffset, fbInfo.yOffset);
|
||||
WARN_LOG_REPORT_ONCE(subareaClut, G3D, "Texturing from framebuffer using CLUT with offset at %08x +%dx%d", address, fbInfo.xOffset, fbInfo.yOffset);
|
||||
}
|
||||
AttachFramebufferValid(entry, framebuffer, fbInfo);
|
||||
entry->status |= TexCacheEntry::STATUS_DEPALETTIZE;
|
||||
// We'll validate it compiles later.
|
||||
return true;
|
||||
} else if (entry->format == GE_TFMT_CLUT8 || entry->format == GE_TFMT_CLUT4) {
|
||||
ERROR_LOG_REPORT_ONCE(fourEightBit, G3D, "4 and 8-bit CLUT format not supported for framebuffers");
|
||||
} else if (IsClutFormat((GETextureFormat)(entry->format)) || IsDXTFormat((GETextureFormat)(entry->format))) {
|
||||
WARN_LOG_ONCE(fourEightBit, G3D, "%s format not supported when texturing from framebuffers", GeTextureFormatToString((GETextureFormat)entry->format));
|
||||
DetachFramebuffer(entry, address, framebuffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is either normal or we failed to generate a shader to depalettize
|
||||
if (framebuffer->format == entry->format || clutFormat) {
|
||||
if (framebuffer->format == entry->format || matchingClutFormat) {
|
||||
if (framebuffer->format != entry->format) {
|
||||
WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address);
|
||||
WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "Texturing from framebuffer with different formats %s != %s at %08x",
|
||||
GeTextureFormatToString((GETextureFormat)entry->format), GeBufferFormatToString(framebuffer->format), address);
|
||||
AttachFramebufferValid(entry, framebuffer, fbInfo);
|
||||
return true;
|
||||
} else {
|
||||
|
@ -858,7 +865,10 @@ bool TextureCacheCommon::AttachFramebuffer(TexCacheEntry *entry, u32 address, Vi
|
|||
return true;
|
||||
}
|
||||
} else {
|
||||
WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "Render to texture with incompatible formats %d != %d at %08x", entry->format, framebuffer->format, address);
|
||||
WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "Texturing from framebuffer with incompatible format %s != %s at %08x",
|
||||
GeTextureFormatToString((GETextureFormat)entry->format), GeBufferFormatToString(framebuffer->format), address);
|
||||
DetachFramebuffer(entry, address, framebuffer);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,11 +123,12 @@ struct TexCacheEntry {
|
|||
|
||||
// Status, but int so we can zero initialize.
|
||||
int status;
|
||||
|
||||
u32 addr;
|
||||
u32 hash;
|
||||
VirtualFramebuffer *framebuffer; // if null, not sourced from an FBO. TODO: Collapse into texturePtr
|
||||
u32 sizeInRAM; // Could be computed
|
||||
u8 format;
|
||||
u8 format; // GeTextureFormat
|
||||
u8 maxLevel;
|
||||
u16 dim;
|
||||
u16 bufw;
|
||||
|
|
|
@ -87,7 +87,6 @@ void TextureCacheDX9::SetFramebufferManager(FramebufferManagerDX9 *fbManager) {
|
|||
}
|
||||
|
||||
void TextureCacheDX9::ReleaseTexture(TexCacheEntry *entry, bool delete_them) {
|
||||
DEBUG_LOG(G3D, "Deleting texture %p", entry->texturePtr);
|
||||
LPDIRECT3DTEXTURE9 &texture = DxTex(entry);
|
||||
if (texture) {
|
||||
texture->Release();
|
||||
|
|
|
@ -73,7 +73,6 @@ void TextureCacheGLES::SetFramebufferManager(FramebufferManagerGLES *fbManager)
|
|||
}
|
||||
|
||||
void TextureCacheGLES::ReleaseTexture(TexCacheEntry *entry, bool delete_them) {
|
||||
DEBUG_LOG(G3D, "Deleting texture %08x", entry->addr);
|
||||
if (delete_them) {
|
||||
if (entry->textureName) {
|
||||
render_->DeleteTexture(entry->textureName);
|
||||
|
|
|
@ -575,6 +575,7 @@
|
|||
<ClCompile Include="Directx9\DrawEngineDX9.cpp" />
|
||||
<ClCompile Include="Directx9\VertexShaderGeneratorDX9.cpp" />
|
||||
<ClCompile Include="GeDisasm.cpp" />
|
||||
<ClCompile Include="GeConstants.cpp" />
|
||||
<ClCompile Include="GLES\DepalettizeShaderGLES.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ge_constants.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Math3D.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
|
@ -288,6 +285,9 @@
|
|||
<ClInclude Include="Directx9\FramebufferManagerDX9.h">
|
||||
<Filter>DirectX9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ge_constants.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Math3D.cpp">
|
||||
|
@ -572,5 +572,8 @@
|
|||
<ClCompile Include="Directx9\FramebufferManagerDX9.cpp">
|
||||
<Filter>DirectX9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeConstants.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
28
GPU/GeConstants.cpp
Normal file
28
GPU/GeConstants.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "GPU/ge_constants.h"
|
||||
|
||||
const char *GeBufferFormatToString(GEBufferFormat fmt) {
|
||||
switch (fmt) {
|
||||
case GE_FORMAT_4444: return "4444";
|
||||
case GE_FORMAT_5551: return "5551";
|
||||
case GE_FORMAT_565: return "565";
|
||||
case GE_FORMAT_8888: return "8888";
|
||||
default: return "N/A";
|
||||
}
|
||||
}
|
||||
|
||||
const char *GeTextureFormatToString(GETextureFormat fmt) {
|
||||
switch (fmt) {
|
||||
case GE_TFMT_5650: return "565";
|
||||
case GE_TFMT_5551: return "5551";
|
||||
case GE_TFMT_4444: return "4444";
|
||||
case GE_TFMT_8888: return "8888";
|
||||
case GE_TFMT_CLUT4: return "CLUT4";
|
||||
case GE_TFMT_CLUT8: return "CLUT8";
|
||||
case GE_TFMT_CLUT16: return "CLUT16";
|
||||
case GE_TFMT_CLUT32: return "CLUT32";
|
||||
case GE_TFMT_DXT1: return "DXT1";
|
||||
case GE_TFMT_DXT3: return "DXT3";
|
||||
case GE_TFMT_DXT5: return "DXT5";
|
||||
default: return "N/A";
|
||||
}
|
||||
}
|
|
@ -416,7 +416,6 @@ void TextureCacheVulkan::CompileScalingShader() {
|
|||
}
|
||||
|
||||
void TextureCacheVulkan::ReleaseTexture(TexCacheEntry *entry, bool delete_them) {
|
||||
DEBUG_LOG(G3D, "Deleting texture %p", entry->vkTex);
|
||||
delete entry->vkTex;
|
||||
entry->vkTex = nullptr;
|
||||
}
|
||||
|
|
|
@ -285,6 +285,8 @@ enum GEBufferFormat
|
|||
GE_FORMAT_INVALID = 0xFF,
|
||||
};
|
||||
|
||||
const char *GeBufferFormatToString(GEBufferFormat fmt);
|
||||
|
||||
#define GE_VTYPE_TRANSFORM (0<<23)
|
||||
#define GE_VTYPE_THROUGH (1<<23)
|
||||
#define GE_VTYPE_THROUGH_MASK (1<<23)
|
||||
|
@ -413,6 +415,14 @@ enum GETextureFormat
|
|||
GE_TFMT_DXT5 = 10,
|
||||
};
|
||||
|
||||
const char *GeTextureFormatToString(GETextureFormat fmt);
|
||||
inline bool IsClutFormat(GETextureFormat fmt) {
|
||||
return fmt == GE_TFMT_CLUT4 || fmt == GE_TFMT_CLUT8 || fmt == GE_TFMT_CLUT16 || fmt == GE_TFMT_CLUT32;
|
||||
}
|
||||
inline bool IsDXTFormat(GETextureFormat fmt) {
|
||||
return fmt == GE_TFMT_DXT1 || fmt == GE_TFMT_DXT3 || fmt == GE_TFMT_DXT5;
|
||||
}
|
||||
|
||||
enum GETexLevelMode {
|
||||
GE_TEXLEVEL_MODE_AUTO = 0,
|
||||
GE_TEXLEVEL_MODE_CONST = 1,
|
||||
|
|
|
@ -482,6 +482,7 @@
|
|||
<ClCompile Include="..\..\GPU\Debugger\Stepping.cpp" />
|
||||
<ClCompile Include="..\..\GPU\Directx9\PixelShaderGeneratorDX9.cpp" />
|
||||
<ClCompile Include="..\..\GPU\Directx9\VertexShaderGeneratorDX9.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GeConstants.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GeDisasm.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GPU.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GPUCommon.cpp" />
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
<ClCompile Include="..\..\GPU\Debugger\Stepping.cpp" />
|
||||
<ClCompile Include="..\..\GPU\Directx9\PixelShaderGeneratorDX9.cpp" />
|
||||
<ClCompile Include="..\..\GPU\Directx9\VertexShaderGeneratorDX9.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GeConstants.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GeDisasm.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GPU.cpp" />
|
||||
<ClCompile Include="..\..\GPU\GPUCommon.cpp" />
|
||||
|
|
|
@ -225,6 +225,7 @@ EXEC_AND_LIB_FILES := \
|
|||
$(SRC)/GPU/GPU.cpp \
|
||||
$(SRC)/GPU/GPUCommon.cpp \
|
||||
$(SRC)/GPU/GPUState.cpp \
|
||||
$(SRC)/GPU/GeConstants.cpp \
|
||||
$(SRC)/GPU/GeDisasm.cpp \
|
||||
$(SRC)/GPU/Common/DepalettizeShaderCommon.cpp \
|
||||
$(SRC)/GPU/Common/FramebufferManagerCommon.cpp \
|
||||
|
|
|
@ -523,6 +523,15 @@ NPEH00065 = true # Ys Seven
|
|||
NPJH50350 = true # Ys Seven
|
||||
ULJM08041 = true # Ys Seven
|
||||
|
||||
# Burnout Legends
|
||||
ULES00125 = true
|
||||
ULUS10025 = true
|
||||
ULJM05228 = true
|
||||
NPJH50305 = true
|
||||
ULJM05049 = true
|
||||
ULKS46027 = true
|
||||
ULAS42019 = true
|
||||
|
||||
# Note! This whole flag is disabled temporarily by appending "Disabled" to its name). See 7914
|
||||
[YugiohSaveFixDisabled]
|
||||
# The cause of Yu-gi-oh series 's bad save (cannot save) are load "save status" and use cwcheat,
|
||||
|
|
|
@ -187,6 +187,7 @@ SOURCES_CXX += \
|
|||
$(GPUDIR)/Software/TransformUnit.cpp \
|
||||
$(GPUDIR)/Software/SoftGpu.cpp \
|
||||
$(GPUDIR)/Software/Sampler.cpp \
|
||||
$(GPUDIR)/GeConstants.cpp \
|
||||
$(GPUDIR)/GeDisasm.cpp \
|
||||
$(GPUDIR)/GPUCommon.cpp \
|
||||
$(GPUDIR)/GPU.cpp \
|
||||
|
|
Loading…
Add table
Reference in a new issue