summaryrefslogtreecommitdiff
path: root/tools/gfx-util/shader-cursor.cpp
diff options
context:
space:
mode:
authorlucy96chen <47800040+lucy96chen@users.noreply.github.com>2022-04-21 12:59:09 -0700
committerGitHub <noreply@github.com>2022-04-21 12:59:09 -0700
commitf493d24c70a6227754296439e97adf35ec412496 (patch)
tree25fffb03c067477bef68ccdc66865683159e3ab5 /tools/gfx-util/shader-cursor.cpp
parent1b6cea2219307f6271e131c43d6e8f48910bd435 (diff)
GFX renaming work part 2: slang-gfx.h renames (#2194)
* Fixed all build errors and type conversion warnings from renames in slang-gfx.h * Made necessary build fixes to the CUDA implementation * Renamed ITextureResource::Size to ITextureResource::Extents * More rename changes based on CI errors * More renames to fix CI build errors * Rerun tests
Diffstat (limited to 'tools/gfx-util/shader-cursor.cpp')
-rw-r--r--tools/gfx-util/shader-cursor.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/gfx-util/shader-cursor.cpp b/tools/gfx-util/shader-cursor.cpp
index efdde44b8..5a2cdfd33 100644
--- a/tools/gfx-util/shader-cursor.cpp
+++ b/tools/gfx-util/shader-cursor.cpp
@@ -66,7 +66,7 @@ Result ShaderCursor::getField(const char* name, const char* nameEnd, ShaderCurso
//
fieldCursor.m_offset.uniformOffset = m_offset.uniformOffset + fieldLayout->getOffset();
fieldCursor.m_offset.bindingRangeIndex =
- m_offset.bindingRangeIndex + m_typeLayout->getFieldBindingRangeOffset(fieldIndex);
+ m_offset.bindingRangeIndex + (GfxIndex)m_typeLayout->getFieldBindingRangeOffset(fieldIndex);
// The index of the field within any binding ranges will be the same
// as the index computed for the parent structure.
@@ -126,8 +126,8 @@ Result ShaderCursor::getField(const char* name, const char* nameEnd, ShaderCurso
//
// TODO: figure out whether we should support this long-term.
//
- auto entryPointCount = (gfx::Int) m_baseObject->getEntryPointCount();
- for( gfx::Int e = 0; e < entryPointCount; ++e )
+ auto entryPointCount = (GfxIndex) m_baseObject->getEntryPointCount();
+ for( GfxIndex e = 0; e < entryPointCount; ++e )
{
ComPtr<IShaderObject> entryPoint;
m_baseObject->getEntryPoint(e, entryPoint.writeRef());
@@ -142,7 +142,7 @@ Result ShaderCursor::getField(const char* name, const char* nameEnd, ShaderCurso
return SLANG_E_INVALID_ARG;
}
-ShaderCursor ShaderCursor::getElement(SlangInt index) const
+ShaderCursor ShaderCursor::getElement(GfxIndex index) const
{
if (m_containerType != ShaderObjectContainerType::None)
{
@@ -168,7 +168,7 @@ ShaderCursor ShaderCursor::getElement(SlangInt index) const
index * m_typeLayout->getElementStride(SLANG_PARAMETER_CATEGORY_UNIFORM);
elementCursor.m_offset.bindingRangeIndex = m_offset.bindingRangeIndex;
elementCursor.m_offset.bindingArrayIndex =
- m_offset.bindingArrayIndex * m_typeLayout->getElementCount() + index;
+ m_offset.bindingArrayIndex * (GfxCount)m_typeLayout->getElementCount() + index;
return elementCursor;
}
break;
@@ -189,7 +189,7 @@ ShaderCursor ShaderCursor::getElement(SlangInt index) const
fieldCursor.m_typeLayout = fieldLayout->getTypeLayout();
fieldCursor.m_offset.uniformOffset = m_offset.uniformOffset + fieldLayout->getOffset();
fieldCursor.m_offset.bindingRangeIndex =
- m_offset.bindingRangeIndex + m_typeLayout->getFieldBindingRangeOffset(fieldIndex);
+ m_offset.bindingRangeIndex + (GfxIndex)m_typeLayout->getFieldBindingRangeOffset(fieldIndex);
fieldCursor.m_offset.bindingArrayIndex = m_offset.bindingArrayIndex;
return fieldCursor;
@@ -266,7 +266,7 @@ Result ShaderCursor::followPath(const char* path, ShaderCursor& ioCursor)
return SLANG_E_INVALID_ARG;
_get(rest);
- SlangInt index = 0;
+ GfxCount index = 0;
while (_peek(rest) != ']')
{
int d = _get(rest);