| 326 | } |
| 327 | |
| 328 | rdcarray<UsedDescriptor> Following::GetReadOnlyResources(ICaptureContext &ctx, ShaderStage stage, |
| 329 | bool onlyUsed) |
| 330 | { |
| 331 | const ActionDescription *curAction = ctx.CurAction(); |
| 332 | bool copy = false, clear = false, compute = false; |
| 333 | GetActionContext(ctx, copy, clear, compute); |
| 334 | |
| 335 | if(copy || clear) |
| 336 | { |
| 337 | rdcarray<UsedDescriptor> ret; |
| 338 | |
| 339 | // only return copy source for one stage |
| 340 | if(copy && stage == ShaderStage::Pixel) |
| 341 | ret.push_back( |
| 342 | MakeUsedDescriptor(stage, curAction->copySource, curAction->copySourceSubresource)); |
| 343 | |
| 344 | return ret; |
| 345 | } |
| 346 | else if(compute) |
| 347 | { |
| 348 | // only return compute resources for one stage |
| 349 | if(stage != ShaderStage::Pixel && stage != ShaderStage::Compute) |
| 350 | return rdcarray<UsedDescriptor>(); |
| 351 | |
| 352 | return ctx.CurPipelineState().GetReadOnlyResources(ShaderStage::Compute, onlyUsed); |
| 353 | } |
| 354 | else |
| 355 | { |
| 356 | return ctx.CurPipelineState().GetReadOnlyResources(stage, onlyUsed); |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | const ShaderReflection *Following::GetReflection(ICaptureContext &ctx, ShaderStage stage) |
| 361 | { |
no test coverage detected