Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureTest.h
zach bethel a00b40ad3b Deprecated GetRenderTargetItem() from IPooledRenderTarget.
#preflight 624ddb30090236773a1a83e0
#rb luke.thatcher

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 19655641 via CL 19655653 via CL 19655661
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19657582 by zach bethel in ue5-main branch]
2022-04-06 18:24:24 -04:00

56 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "VirtualTexturing.h"
#include "VirtualTextureSpace.h"
#include "RenderTargetPool.h"
#if 0
#define CPU_TEST 1
class FTexturePagePool;
class FVirtualTextureTest : public IVirtualTexture
{
public:
FVirtualTextureTest( uint32 SizeX, uint32 SizeY, uint32 SizeZ );
virtual ~FVirtualTextureTest();
virtual bool RequestPageData( uint8 vLevel, uint64 vAddress, void* RESTRICT& Location ) /*const*/ override;
virtual void ProducePageData( FRHICommandList& RHICmdList, ERHIFeatureLevel::Type FeatureLevel, uint8 vLevel, uint64 vAddress, uint16 pAddress, void* RESTRICT Location ) /*const*/ override;
virtual void DumpToConsole(bool verbose) override;
};
class FVirtualTextureTestType : public FRenderResource
{
public:
FVirtualTextureTestType();
~FVirtualTextureTestType();
// FRenderResource interface
virtual void InitDynamicRHI() override;
virtual void ReleaseDynamicRHI() override;
FRHITexture* GetPhysicalTexture() const { return PhysicalTexture->GetRHI(); }
FRHITexture* GetPageTableTexture() const;
FTexturePagePool* Pool;
#if CPU_TEST == 0
FVirtualTextureSpace* Space;
IVirtualTexture* VT;
#endif
EPixelFormat PhysicalTextureFormat;
FIntPoint PhysicalTextureSize;
TRefCountPtr< IPooledRenderTarget > PhysicalTexture;
const uint32 vPageSize = 128;
const uint32 pPageBorder = 4;
const uint32 pPageSize = vPageSize + 2 * pPageBorder;
};
extern TGlobalResource< FVirtualTextureTestType > GVirtualTextureTestType;
#endif