| 246 | } |
| 247 | |
| 248 | rdcarray<Descriptor> Following::GetOutputTargets(ICaptureContext &ctx) |
| 249 | { |
| 250 | const ActionDescription *curAction = ctx.CurAction(); |
| 251 | bool copy = false, clear = false, compute = false; |
| 252 | GetActionContext(ctx, copy, clear, compute); |
| 253 | |
| 254 | if(copy || clear) |
| 255 | { |
| 256 | return {MakeDescriptor(curAction->copyDestination, curAction->copyDestinationSubresource)}; |
| 257 | } |
| 258 | else if(compute) |
| 259 | { |
| 260 | return {}; |
| 261 | } |
| 262 | else |
| 263 | { |
| 264 | rdcarray<Descriptor> ret = ctx.CurPipelineState().GetOutputTargets(); |
| 265 | |
| 266 | if(ret.isEmpty() && curAction != NULL && (curAction->flags & ActionFlags::Present)) |
| 267 | { |
| 268 | if(curAction->copyDestination != ResourceId()) |
| 269 | return {MakeDescriptor(curAction->copyDestination, curAction->copyDestinationSubresource)}; |
| 270 | |
| 271 | for(const TextureDescription &tex : ctx.GetTextures()) |
| 272 | { |
| 273 | if(tex.creationFlags & TextureCategory::SwapBuffer) |
| 274 | return {MakeDescriptor(tex.resourceId)}; |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | return ret; |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | Descriptor Following::GetDepthTarget(ICaptureContext &ctx) |
| 283 | { |