MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXNTC / CopyBlocksIntoBCTexture

Function CopyBlocksIntoBCTexture

tools/cli/GraphicsPasses.cpp:500–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498
499 return true;
500}
501
502void CopyBlocksIntoBCTexture(
503 nvrhi::ICommandList* commandList,
504 GraphicsResourcesForTexture const& textureResources,
505 uint32_t width,
506 uint32_t height)
507{
508 int const widthBlocks = (width + 3) / 4;
509 int const heightBlocks = (height + 3) / 4;
510
511 auto srcSlice = nvrhi::TextureSlice().setWidth(widthBlocks).setHeight(heightBlocks);
512 auto dstSlice = nvrhi::TextureSlice().setWidth(width).setHeight(height);
513 commandList->copyTexture(textureResources.bc, dstSlice, textureResources.blocks, srcSlice);
514}
515

Calls

no outgoing calls

Tested by

no test coverage detected