Skip to content

Commit dbf8c14

Browse files
committed
[hdEmbree] add HDEMBREE_LIGHT_CREATE debug code
1 parent db8377c commit dbf8c14

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

pxr/imaging/plugin/hdEmbree/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pxr_plugin(hdEmbree
4646
renderParam.h
4747

4848
PRIVATE_CLASSES
49+
debugCodes
4950
implicitSurfaceSceneIndexPlugin
5051

5152
RESOURCE_FILES
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// Copyright 2024 Pixar
3+
//
4+
// Licensed under the terms set forth in the LICENSE.txt file available at
5+
// https://openusd.org/license.
6+
//
7+
#include "pxr/pxr.h"
8+
#include "pxr/imaging/plugin/hdEmbree/debugCodes.h"
9+
10+
#include "pxr/base/tf/debug.h"
11+
#include "pxr/base/tf/registryManager.h"
12+
13+
PXR_NAMESPACE_OPEN_SCOPE
14+
15+
TF_REGISTRY_FUNCTION(TfDebug)
16+
{
17+
TF_DEBUG_ENVIRONMENT_SYMBOL(HDEMBREE_LIGHT_CREATE, "Creation of HdEmbree lights");
18+
}
19+
20+
PXR_NAMESPACE_CLOSE_SCOPE
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// Copyright 2024 Pixar
3+
//
4+
// Licensed under the terms set forth in the LICENSE.txt file available at
5+
// https://openusd.org/license.
6+
//
7+
#ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_DEBUG_CODES_H
8+
#define PXR_IMAGING_PLUGIN_HD_EMBREE_DEBUG_CODES_H
9+
10+
#include "pxr/pxr.h"
11+
#include "pxr/base/tf/debug.h"
12+
13+
PXR_NAMESPACE_OPEN_SCOPE
14+
15+
TF_DEBUG_CODES(
16+
HDEMBREE_LIGHT_CREATE
17+
);
18+
19+
PXR_NAMESPACE_CLOSE_SCOPE
20+
21+
#endif // PXR_IMAGING_PLUGIN_HD_EMBREE_DEBUG_CODES_H

pxr/imaging/plugin/hdEmbree/light.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ HdEmbree_Light::HdEmbree_Light(SdfPath const& id, TfToken const& lightType)
2929
return;
3030
}
3131

32+
TF_DEBUG(HDEMBREE_LIGHT_CREATE).Msg("Creating light %s: %s\n", id.GetText(), lightType.GetText());
33+
3234
// Set the variant to the right type - Sync will fill rest of data
3335
if (lightType == HdSprimTypeTokens->cylinderLight) {
3436
_lightData.lightVariant = HdEmbree_Cylinder();

0 commit comments

Comments
 (0)