summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/d3d11/d3d11-shader-object.h6
-rw-r--r--tools/gfx/open-gl/render-gl.cpp14
-rw-r--r--tools/gfx/vulkan/vk-shader-object.h4
3 files changed, 15 insertions, 9 deletions
diff --git a/tools/gfx/d3d11/d3d11-shader-object.h b/tools/gfx/d3d11/d3d11-shader-object.h
index 62fb4cf62..ece90d480 100644
--- a/tools/gfx/d3d11/d3d11-shader-object.h
+++ b/tools/gfx/d3d11/d3d11-shader-object.h
@@ -173,12 +173,12 @@ public:
return static_cast<RootShaderObjectLayoutImpl*>(m_layout.Ptr());
}
- GfxCount SLANG_MCALL getEntryPointCount() SLANG_OVERRIDE
+ SLANG_NO_THROW GfxCount SLANG_MCALL getEntryPointCount() SLANG_OVERRIDE
{
return (GfxCount)m_entryPoints.getCount();
}
- SlangResult SLANG_MCALL getEntryPoint(GfxIndex index, IShaderObject** outEntryPoint)
- SLANG_OVERRIDE
+ SLANG_NO_THROW SlangResult SLANG_MCALL
+ getEntryPoint(GfxIndex index, IShaderObject** outEntryPoint) SLANG_OVERRIDE
{
returnComPtr(outEntryPoint, m_entryPoints[index]);
return SLANG_OK;
diff --git a/tools/gfx/open-gl/render-gl.cpp b/tools/gfx/open-gl/render-gl.cpp
index 5bbee254d..2a0114998 100644
--- a/tools/gfx/open-gl/render-gl.cpp
+++ b/tools/gfx/open-gl/render-gl.cpp
@@ -1519,12 +1519,12 @@ protected:
return static_cast<RootShaderObjectLayoutImpl*>(m_layout.Ptr());
}
- GfxCount SLANG_MCALL getEntryPointCount() SLANG_OVERRIDE
+ SLANG_NO_THROW GfxCount SLANG_MCALL getEntryPointCount() SLANG_OVERRIDE
{
return (GfxCount)m_entryPoints.getCount();
}
- SlangResult SLANG_MCALL getEntryPoint(GfxIndex index, IShaderObject** outEntryPoint)
- SLANG_OVERRIDE
+ SLANG_NO_THROW SlangResult SLANG_MCALL
+ getEntryPoint(GfxIndex index, IShaderObject** outEntryPoint) SLANG_OVERRIDE
{
*outEntryPoint = m_entryPoints[index];
m_entryPoints[index]->addRef();
@@ -2510,6 +2510,12 @@ SLANG_NO_THROW Result SLANG_MCALL GLDevice::createTextureResource(
{
for (int j = 0; j < srcDesc.numMipLevels; j++)
{
+ const void* dataPtr = nullptr;
+ if (initData)
+ {
+ dataPtr = initData[slice].data;
+ ++slice;
+ }
glTexImage3D(
target,
j,
@@ -2520,7 +2526,7 @@ SLANG_NO_THROW Result SLANG_MCALL GLDevice::createTextureResource(
0,
format,
formatType,
- initData ? initData[slice++].data : nullptr);
+ dataPtr);
}
}
}
diff --git a/tools/gfx/vulkan/vk-shader-object.h b/tools/gfx/vulkan/vk-shader-object.h
index fafeb67f1..3dc1d79d4 100644
--- a/tools/gfx/vulkan/vk-shader-object.h
+++ b/tools/gfx/vulkan/vk-shader-object.h
@@ -250,8 +250,8 @@ public:
List<RefPtr<EntryPointShaderObject>> const& getEntryPoints() const;
- virtual GfxCount SLANG_MCALL getEntryPointCount() override;
- virtual Result SLANG_MCALL
+ virtual SLANG_NO_THROW GfxCount SLANG_MCALL getEntryPointCount() override;
+ virtual SLANG_NO_THROW Result SLANG_MCALL
getEntryPoint(GfxIndex index, IShaderObject** outEntryPoint) override;
virtual SLANG_NO_THROW Result SLANG_MCALL