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
500void CopyBlocksIntoBCTexture(
501 nvrhi::ICommandList* commandList,
502 GraphicsResourcesForTexture const& textureResources,
503 uint32_t width,
504 uint32_t height)
505{
506 int const widthBlocks = (width + 3) / 4;
507 int const heightBlocks = (height + 3) / 4;
508
509 auto srcSlice = nvrhi::TextureSlice().setWidth(widthBlocks).setHeight(heightBlocks);
510 auto dstSlice = nvrhi::TextureSlice().setWidth(width).setHeight(height);
511 commandList->copyTexture(textureResources.bc, dstSlice, textureResources.blocks, srcSlice);
512}
513
514bool ComputeBlockCompressedImageError(
515 ntc::IContext* context,

Calls

no outgoing calls

Tested by

no test coverage detected