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

Function SetCommandAnnotation

renderdoc/replay/app_api.cpp:297–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297static uint32_t SetCommandAnnotation(void *device, void *queueOrCommandBuffer, const char *key,
298 RENDERDOC_AnnotationType valueType, uint32_t valueVectorWidth,
299 const RENDERDOC_AnnotationValue *value)
300{
301 if((valueType == eRENDERDOC_Empty && value != NULL) ||
302 (valueType != eRENDERDOC_Empty && value == NULL))
303 {
304 RDCWARN("Invalid annotation - value should be NULL and type should be empty");
305 return 3;
306 }
307
308 if(key == NULL || key[0] == 0 || key[0] == '.')
309 {
310 RDCWARN("Invalid annotation - key should not be NULL, empty, or start with a .");
311 return 3;
312 }
313
314 if((valueType == eRENDERDOC_Empty || valueType == eRENDERDOC_String ||
315 valueType == eRENDERDOC_APIObject) &&
316 valueVectorWidth != 0)
317 {
318 RDCWARN(
319 "Invalid annotation - for deletion, or setting strings and objects, vector width must be "
320 "0");
321 return 3;
322 }
323
324 DeviceOwnedWindow devWnd(device, NULL);
325
326 IFrameCapturer *capturer = RenderDoc::Inst().MatchFrameCapturer(devWnd);
327
328 if(!capturer)
329 return 1;
330
331 return capturer->SetCommandAnnotation(queueOrCommandBuffer, key, valueType, valueVectorWidth,
332 value);
333}
334
335// defined in capture_options.cpp
336int RENDERDOC_CC SetCaptureOptionU32(RENDERDOC_CaptureOption opt, uint32_t val);

Callers

nothing calls this directly

Calls 2

MatchFrameCapturerMethod · 0.80
SetCommandAnnotationMethod · 0.45

Tested by

no test coverage detected