summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/render-test')
-rw-r--r--tools/render-test/cpu-compute-util.cpp14
-rw-r--r--tools/render-test/render-test-main.cpp2
-rw-r--r--tools/render-test/shader-renderer-util.h4
3 files changed, 13 insertions, 7 deletions
diff --git a/tools/render-test/cpu-compute-util.cpp b/tools/render-test/cpu-compute-util.cpp
index 7c9103cb3..6682eef1a 100644
--- a/tools/render-test/cpu-compute-util.cpp
+++ b/tools/render-test/cpu-compute-util.cpp
@@ -52,15 +52,15 @@ struct ValueTexture : public CPUComputeUtil::Resource, public CPPPrelude::ITextu
{
return _calcMipDims(mipLevel, m_dims);
}
- virtual void Load(const int32_t* loc, void* out) SLANG_OVERRIDE
+ virtual void Load(const int32_t* loc, void* out, size_t dataSize) SLANG_OVERRIDE
{
_set(out);
}
- virtual void Sample(CPPPrelude::SamplerState samplerState, const float* loc, void* out) SLANG_OVERRIDE
+ virtual void Sample(CPPPrelude::SamplerState samplerState, const float* loc, void* out, size_t dataSize) SLANG_OVERRIDE
{
_set(out);
}
- virtual void SampleLevel(CPPPrelude::SamplerState samplerState, const float* loc, float level, void* out) SLANG_OVERRIDE
+ virtual void SampleLevel(CPPPrelude::SamplerState samplerState, const float* loc, float level, void* out, size_t dataSize) SLANG_OVERRIDE
{
_set(out);
}
@@ -201,9 +201,15 @@ struct FloatRWTexture : public CPUComputeUtil::Resource, public CPPPrelude::IRWT
{
return _calcMipDims(mipLevel, m_dims);
}
- virtual void Load(const int32_t* loc, void* out) SLANG_OVERRIDE { m_data.getAt((const uint32_t*)loc, (float*)out); }
+ virtual void Load(const int32_t* loc, void* out, size_t dataSize) SLANG_OVERRIDE { m_data.getAt((const uint32_t*)loc, (float*)out); }
virtual void* refAt(const uint32_t* loc) SLANG_OVERRIDE { return m_data.getAt(loc); }
+ virtual void Sample(CPPPrelude::SamplerState samplerState, const float* loc, void* out, size_t dataSize) SLANG_OVERRIDE
+ {}
+
+ virtual void SampleLevel(CPPPrelude::SamplerState samplerState, const float* loc, float level, void* out, size_t dataSize) SLANG_OVERRIDE
+ {}
+
FloatRWTexture(int elementCount, const CPPPrelude::TextureDimensions& inDims, float initialValue):
m_dims(inDims)
{
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp
index e13642c5c..15100e2a5 100644
--- a/tools/render-test/render-test-main.cpp
+++ b/tools/render-test/render-test-main.cpp
@@ -1294,7 +1294,7 @@ static SlangResult _innerMain(Slang::StdWriters* stdWriters, SlangSession* sessi
}
// If it's CPU testing we don't need a window or a renderer
- if (options.deviceType == DeviceType::CPU)
+ if (options.deviceType == DeviceType::CPU && !options.useShaderObjects)
{
// Check we have all the required features
for (const auto& renderFeature : options.renderFeatures)
diff --git a/tools/render-test/shader-renderer-util.h b/tools/render-test/shader-renderer-util.h
index ecb8fc8bb..9d583331f 100644
--- a/tools/render-test/shader-renderer-util.h
+++ b/tools/render-test/shader-renderer-util.h
@@ -73,13 +73,13 @@ struct ShaderRendererUtil
bool isOutput,
size_t bufferSize,
const void* initData,
- IDevice* renderer,
+ IDevice* device,
ComPtr<IBufferResource>& bufferOut);
/// Create BindingState::Desc from the contents of layout
static Slang::Result createBindingState(
const ShaderInputLayout& layout,
- IDevice* renderer,
+ IDevice* device,
IBufferResource* addedConstantBuffer,
BindingStateImpl** outBindingState);
};