summaryrefslogtreecommitdiff
path: root/tools/gfx/open-gl/render-gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/open-gl/render-gl.cpp')
-rw-r--r--tools/gfx/open-gl/render-gl.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/gfx/open-gl/render-gl.cpp b/tools/gfx/open-gl/render-gl.cpp
index da62e7702..bcdaae8c0 100644
--- a/tools/gfx/open-gl/render-gl.cpp
+++ b/tools/gfx/open-gl/render-gl.cpp
@@ -271,6 +271,20 @@ public:
{
return 0;
}
+
+ virtual SLANG_NO_THROW Result SLANG_MCALL
+ map(MemoryRange* rangeToRead, void** outPointer) override
+ {
+ SLANG_UNUSED(rangeToRead);
+ SLANG_UNUSED(outPointer);
+ return SLANG_FAIL;
+ }
+
+ virtual SLANG_NO_THROW Result SLANG_MCALL unmap(MemoryRange* writtenRange) override
+ {
+ SLANG_UNUSED(writtenRange);
+ return SLANG_FAIL;
+ }
};
class TextureResourceImpl: public TextureResource
@@ -1272,7 +1286,7 @@ public:
bufferDesc.defaultState = ResourceState::ConstantBuffer;
bufferDesc.allowedStates =
ResourceStateSet(ResourceState::ConstantBuffer, ResourceState::CopyDestination);
- bufferDesc.cpuAccessFlags |= MemoryType::CpuWrite;
+ bufferDesc.memoryType = MemoryType::Upload;
SLANG_RETURN_ON_FAIL(
device->createBufferResource(bufferDesc, nullptr, bufferResourcePtr.writeRef()));
m_ordinaryDataBuffer = static_cast<BufferResourceImpl*>(bufferResourcePtr.get());