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

Method setResourceStatesForFramebuffer

src/common/misc.cpp:187–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 }
186
187 void ICommandList::setResourceStatesForFramebuffer(IFramebuffer* framebuffer)
188 {
189 const FramebufferDesc& desc = framebuffer->getDesc();
190
191 for (const auto& attachment : desc.colorAttachments)
192 {
193 setTextureState(attachment.texture, attachment.subresources,
194 ResourceStates::RenderTarget);
195 }
196
197 if (desc.depthAttachment.valid())
198 {
199 setTextureState(desc.depthAttachment.texture, desc.depthAttachment.subresources,
200 desc.depthAttachment.isReadOnly ? ResourceStates::DepthRead : ResourceStates::DepthWrite);
201 }
202
203 if (desc.shadingRateAttachment.valid())
204 {
205 setTextureState(desc.shadingRateAttachment.texture, desc.shadingRateAttachment.subresources,
206 nvrhi::ResourceStates::ShadingRateSurface);
207 }
208 }
209
210 size_t coopvec::getDataTypeSize(coopvec::DataType type)
211 {

Callers

nothing calls this directly

Calls 2

validMethod · 0.80
getDescMethod · 0.45

Tested by

no test coverage detected