mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoBackends: add a way to load data into a specific level AND layer, default to layer 0
This commit is contained in:
@ -203,7 +203,7 @@ bool DXTexture::CreateUAVDescriptor()
|
||||
}
|
||||
|
||||
void DXTexture::Load(u32 level, u32 width, u32 height, u32 row_length, const u8* buffer,
|
||||
size_t buffer_size)
|
||||
size_t buffer_size, u32 layer)
|
||||
{
|
||||
// Textures greater than 1024*1024 will be put in staging textures that are released after
|
||||
// execution instead. A 2048x2048 texture is 16MB, and we'd only fit four of these in our
|
||||
@ -301,7 +301,7 @@ void DXTexture::Load(u32 level, u32 width, u32 height, u32 row_length, const u8*
|
||||
const u32 aligned_height = Common::AlignUp(height, block_size);
|
||||
const D3D12_TEXTURE_COPY_LOCATION dst_loc = {m_resource.Get(),
|
||||
D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX,
|
||||
{static_cast<UINT>(CalcSubresource(level, 0))}};
|
||||
{static_cast<UINT>(CalcSubresource(level, layer))}};
|
||||
const D3D12_TEXTURE_COPY_LOCATION src_loc = {
|
||||
upload_buffer_resource,
|
||||
D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT,
|
||||
|
@ -23,8 +23,8 @@ public:
|
||||
static std::unique_ptr<DXTexture> Create(const TextureConfig& config, std::string_view name);
|
||||
static std::unique_ptr<DXTexture> CreateAdopted(ID3D12Resource* resource);
|
||||
|
||||
void Load(u32 level, u32 width, u32 height, u32 row_length, const u8* buffer,
|
||||
size_t buffer_size) override;
|
||||
void Load(u32 level, u32 width, u32 height, u32 row_length, const u8* buffer, size_t buffer_size,
|
||||
u32 layer) override;
|
||||
void CopyRectangleFromTexture(const AbstractTexture* src,
|
||||
const MathUtil::Rectangle<int>& src_rect, u32 src_layer,
|
||||
u32 src_level, const MathUtil::Rectangle<int>& dst_rect,
|
||||
|
Reference in New Issue
Block a user