mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-14 18:58:29 +12:00
Latte: Clean up OpenGL relics in shared render code
This commit is contained in:
parent
646835346c
commit
df282ab230
22 changed files with 267 additions and 216 deletions
|
@ -3,9 +3,9 @@
|
|||
#include "Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/VulkanAPI.h"
|
||||
|
||||
LatteTextureVk::LatteTextureVk(class VulkanRenderer* vkRenderer, uint32 textureUnit, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels, uint32 swizzle,
|
||||
LatteTextureVk::LatteTextureVk(class VulkanRenderer* vkRenderer, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels, uint32 swizzle,
|
||||
Latte::E_HWTILEMODE tileMode, bool isDepth)
|
||||
: LatteTexture(textureUnit, dim, physAddress, physMipAddress, format, width, height, depth, pitch, mipLevels, swizzle, tileMode, isDepth), m_vkr(vkRenderer)
|
||||
: LatteTexture(dim, physAddress, physMipAddress, format, width, height, depth, pitch, mipLevels, swizzle, tileMode, isDepth), m_vkr(vkRenderer)
|
||||
{
|
||||
vkObjTex = new VKRObjectTexture();
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
class LatteTextureVk : public LatteTexture
|
||||
{
|
||||
public:
|
||||
LatteTextureVk(class VulkanRenderer* vkRenderer, uint32 textureUnit, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels,
|
||||
LatteTextureVk(class VulkanRenderer* vkRenderer, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels,
|
||||
uint32 swizzle, Latte::E_HWTILEMODE tileMode, bool isDepth);
|
||||
|
||||
~LatteTextureVk();
|
||||
|
|
|
@ -3326,18 +3326,13 @@ void VulkanRenderer::texture_loadSlice(LatteTexture* hostTexture, sint32 width,
|
|||
barrier_image<ANY_TRANSFER, ANY_TRANSFER | IMAGE_READ | IMAGE_WRITE>(vkTexture, barrierSubresourceRange, VK_IMAGE_LAYOUT_GENERAL);
|
||||
}
|
||||
|
||||
LatteTexture* VulkanRenderer::texture_createTextureEx(uint32 textureUnit, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels,
|
||||
LatteTexture* VulkanRenderer::texture_createTextureEx(Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels,
|
||||
uint32 swizzle, Latte::E_HWTILEMODE tileMode, bool isDepth)
|
||||
{
|
||||
return new LatteTextureVk(this, textureUnit, dim, physAddress, physMipAddress, format, width, height, depth, pitch, mipLevels, swizzle, tileMode, isDepth);
|
||||
return new LatteTextureVk(this, dim, physAddress, physMipAddress, format, width, height, depth, pitch, mipLevels, swizzle, tileMode, isDepth);
|
||||
}
|
||||
|
||||
void VulkanRenderer::texture_bindAndActivate(LatteTextureView* textureView, uint32 textureUnit)
|
||||
{
|
||||
m_state.boundTexture[textureUnit] = static_cast<LatteTextureViewVk*>(textureView);
|
||||
}
|
||||
|
||||
void VulkanRenderer::texture_bindOnly(LatteTextureView* textureView, uint32 textureUnit)
|
||||
void VulkanRenderer::texture_setLatteTexture(LatteTextureView* textureView, uint32 textureUnit)
|
||||
{
|
||||
m_state.boundTexture[textureUnit] = static_cast<LatteTextureViewVk*>(textureView);
|
||||
}
|
||||
|
|
|
@ -300,15 +300,10 @@ public:
|
|||
|
||||
void texture_loadSlice(LatteTexture* hostTexture, sint32 width, sint32 height, sint32 depth, void* pixelData, sint32 sliceIndex, sint32 mipIndex, uint32 compressedImageSize) override;
|
||||
|
||||
LatteTexture* texture_createTextureEx(uint32 textureUnit, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels, uint32 swizzle, Latte::E_HWTILEMODE tileMode, bool isDepth) override;
|
||||
LatteTexture* texture_createTextureEx(Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels, uint32 swizzle, Latte::E_HWTILEMODE tileMode, bool isDepth) override;
|
||||
|
||||
void texture_bindAndActivate(LatteTextureView* textureView, uint32 textureUnit) override;
|
||||
void texture_bindOnly(LatteTextureView* textureView, uint32 textureUnit) override;
|
||||
void texture_setLatteTexture(LatteTextureView* textureView, uint32 textureUnit) override;
|
||||
|
||||
void texture_bindAndActivateRawTex(LatteTexture* texture, uint32 textureUnit) override {};
|
||||
|
||||
void texture_rememberBoundTexture(uint32 textureUnit) override {};
|
||||
void texture_restoreBoundTexture(uint32 textureUnit) override {};
|
||||
void texture_copyImageSubData(LatteTexture* src, sint32 srcMip, sint32 effectiveSrcX, sint32 effectiveSrcY, sint32 srcSlice, LatteTexture* dst, sint32 dstMip, sint32 effectiveDstX, sint32 effectiveDstY, sint32 dstSlice, sint32 effectiveCopyWidth, sint32 effectiveCopyHeight, sint32 srcDepth) override;
|
||||
LatteTextureReadbackInfo* texture_createReadback(LatteTextureView* textureView) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue