MCPcopy Create free account
hub / github.com/NVIDIA-RTX/NVRHI / FramebufferInfoEx

Method FramebufferInfoEx

src/common/misc.cpp:166–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 }
165
166 FramebufferInfoEx::FramebufferInfoEx(const FramebufferDesc& desc)
167 : FramebufferInfo(desc)
168 {
169 if (desc.depthAttachment.valid())
170 {
171 const TextureDesc& textureDesc = desc.depthAttachment.texture->getDesc();
172 TextureSubresourceSet const subresources = desc.depthAttachment.subresources.resolve(textureDesc, true);
173 width = std::max(textureDesc.width >> subresources.baseMipLevel, 1u);
174 height = std::max(textureDesc.height >> subresources.baseMipLevel, 1u);
175 arraySize = subresources.numArraySlices;
176 }
177 else if (!desc.colorAttachments.empty() && desc.colorAttachments[0].valid())
178 {
179 const TextureDesc& textureDesc = desc.colorAttachments[0].texture->getDesc();
180 TextureSubresourceSet const subresources = desc.colorAttachments[0].subresources.resolve(textureDesc, true);
181 width = std::max(textureDesc.width >> subresources.baseMipLevel, 1u);
182 height = std::max(textureDesc.height >> subresources.baseMipLevel, 1u);
183 arraySize = subresources.numArraySlices;
184 }
185 }
186
187 void ICommandList::setResourceStatesForFramebuffer(IFramebuffer* framebuffer)
188 {

Callers

nothing calls this directly

Calls 4

validMethod · 0.80
resolveMethod · 0.80
getDescMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected