@ -105,7 +105,6 @@ namespace AZ
}
Fence * fenceToSignal = nullptr ;
uint64_t fenceToSignalValue = 0 ;
size_t byteCount = uploadRequest . m_byteCount ;
size_t byteOffset = destMemoryView . GetOffset ( ) + uploadRequest . m_byteOffset ;
uint64_t queueValue = m_uploadFence . Increment ( ) ;
@ -183,8 +182,6 @@ namespace AZ
{
CommandQueue * commandQueue = static_cast < CommandQueue * > ( queue ) ;
FramePacket * framePacket = BeginFramePacket ( commandQueue ) ;
const uint16_t arraySize = image - > GetDescriptor ( ) . m_arraySize ;
const uint16_t imageMipLevels = image - > GetDescriptor ( ) . m_mipLevels ;
//[GFX TODO][ATOM-5605] - Cache alignments for all formats at Init
const static uint32_t bufferOffsetAlign = [ mtlDevice minimumTextureBufferAlignmentForPixelFormat : ConvertPixelFormat ( image - > GetDescriptor ( ) . m_format ) ] ;
@ -212,7 +209,6 @@ namespace AZ
if ( subresourceLayout . m_size . m_height < subresourceLayout . m_rowCount )
{
AZ_Error ( " Metal " , false , " AsyncUploadQueue::QueueUpload expects ImageHeight '%d' to be bigger than or equal to the image's RowCount '%d'. " , subresourceLayout . m_size . m_height , subresourceLayout . m_rowCount ) ;
RHI : : AsyncWorkHandle : : Null ;
}
// The final staging size for each CopyTextureRegion command
@ -281,8 +277,6 @@ namespace AZ
{
const uint8_t * subresourceDataStart = reinterpret_cast < const uint8_t * > ( subresourceData . m_data ) + depth * subresourceSlicePitch ;
MTLTextureDescriptor * mtlTextureDesc = ConvertImageDescriptor ( image - > GetDescriptor ( ) ) ;
uint32_t startRow = 0 ;
uint32_t destHeight = 0 ;
while ( startRow < subresourceLayout . m_rowCount )
@ -468,7 +462,6 @@ namespace AZ
MTLBlitOption mtlBlitOption = GetBlitOption ( destImage - > GetDescriptor ( ) . m_format ) ;
id < MTLTexture > tempTex = destImage - > GetMemoryView ( ) . GetGpuAddress < id < MTLTexture > > ( ) ;
[ blitEncoder copyFromBuffer : framePacket - > m_stagingResource
sourceOffset : framePacket - > m_dataOffset
sourceBytesPerRow : stagingRowPitch