Skip to content

Commit

Permalink
[hdEmbree] add HDEMBREE_LIGHT_CREATE debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
pmolodo committed Aug 1, 2024
1 parent 23622c5 commit f8d4638
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pxr/imaging/plugin/hdEmbree/debugCodes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Copyright 2024 Pixar
//
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://openusd.org/license.
//
#include "pxr/pxr.h"
#include "pxr/imaging/plugin/hdEmbree/debugCodes.h"

#include "pxr/base/tf/debug.h"
#include "pxr/base/tf/registryManager.h"

PXR_NAMESPACE_OPEN_SCOPE

TF_REGISTRY_FUNCTION(TfDebug)
{
TF_DEBUG_ENVIRONMENT_SYMBOL(HDEMBREE_LIGHT_CREATE, "Creation of HdEmbree lights");
}

PXR_NAMESPACE_CLOSE_SCOPE
21 changes: 21 additions & 0 deletions pxr/imaging/plugin/hdEmbree/debugCodes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// Copyright 2024 Pixar
//
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://openusd.org/license.
//
#ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_DEBUG_CODES_H
#define PXR_IMAGING_PLUGIN_HD_EMBREE_DEBUG_CODES_H

#include "pxr/pxr.h"
#include "pxr/base/tf/debug.h"

PXR_NAMESPACE_OPEN_SCOPE

TF_DEBUG_CODES(
HDEMBREE_LIGHT_CREATE
);

PXR_NAMESPACE_CLOSE_SCOPE

#endif // PXR_IMAGING_PLUGIN_HD_EMBREE_DEBUG_CODES_H
2 changes: 2 additions & 0 deletions pxr/imaging/plugin/hdEmbree/light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ HdEmbree_Light::HdEmbree_Light(SdfPath const& id, TfToken const& lightType)
return;
}

TF_DEBUG(HDEMBREE_LIGHT_CREATE).Msg("Creating light %s: %s\n", id.GetText(), lightType.GetText());

// Set the variant to the right type - Sync will fill rest of data
if (lightType == HdSprimTypeTokens->cylinderLight) {
_lightData.lightVariant = HdEmbree_Cylinder();
Expand Down

0 comments on commit f8d4638

Please sign in to comment.