MCPcopy Create free account
hub / github.com/baldurk/renderdoc / GetOutputTargets

Method GetOutputTargets

qrenderdoc/Windows/TextureViewer.cpp:248–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248rdcarray<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
282Descriptor Following::GetDepthTarget(ICaptureContext &ctx)
283{

Callers 15

ShaderMessageViewerMethod · 0.80
setStateMethod · 0.80
exportHTMLMethod · 0.80
setStateMethod · 0.80
exportHTMLMethod · 0.80
menu_callbackFunction · 0.80
check_triangleMethod · 0.80
check_debug_pixelMethod · 0.80
check_captureMethod · 0.80
batch_testMethod · 0.80
check_captureMethod · 0.80
check_actionMethod · 0.80

Calls 5

MakeDescriptorFunction · 0.85
ResourceIdFunction · 0.50
CurActionMethod · 0.45
isEmptyMethod · 0.45
GetTexturesMethod · 0.45

Tested by 10

check_triangleMethod · 0.64
check_debug_pixelMethod · 0.64
check_captureMethod · 0.64
image_saveMethod · 0.64
pixel_debugMethod · 0.64
drawcall_overlayMethod · 0.64
check_captureMethod · 0.64
test_debug_pixelMethod · 0.64
check_captureMethod · 0.64
check_captureMethod · 0.64