| 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 | { |