mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 08:07:45 +00:00
VideoBackends: add a way to load data into a specific level AND layer, default to layer 0
This commit is contained in:
parent
41272dc5f1
commit
7bea39b39e
15 changed files with 43 additions and 42 deletions
|
@ -56,7 +56,7 @@ void Metal::Texture::ResolveFromTexture(const AbstractTexture* src,
|
|||
static constexpr u32 STAGING_TEXTURE_UPLOAD_THRESHOLD = 1024 * 1024 * 4;
|
||||
|
||||
void Metal::Texture::Load(u32 level, u32 width, u32 height, u32 row_length, //
|
||||
const u8* buffer, size_t buffer_size)
|
||||
const u8* buffer, size_t buffer_size, u32 layer)
|
||||
{
|
||||
@autoreleasepool
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ void Metal::Texture::Load(u32 level, u32 width, u32 height, u32 row_length, //
|
|||
sourceBytesPerImage:upload_size
|
||||
sourceSize:MTLSizeMake(width, height, 1)
|
||||
toTexture:m_tex
|
||||
destinationSlice:0
|
||||
destinationSlice:layer
|
||||
destinationLevel:level
|
||||
destinationOrigin:MTLOriginMake(0, 0, 0)];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue