mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 06:05:45 +00:00
Ensure shader reflection information is stored as const
* Avoids accidental modifications
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "dummy_driver.h"
|
||||
|
||||
DummyDriver::DummyDriver(IReplayDriver *original, const rdcarray<ShaderReflection *> &shaders,
|
||||
DummyDriver::DummyDriver(IReplayDriver *original, const rdcarray<const ShaderReflection *> &shaders,
|
||||
SDFile *sdfile)
|
||||
{
|
||||
m_Shaders = shaders;
|
||||
@@ -49,7 +49,7 @@ DummyDriver::DummyDriver(IReplayDriver *original, const rdcarray<ShaderReflectio
|
||||
DummyDriver::~DummyDriver()
|
||||
{
|
||||
// we own the shaders
|
||||
for(ShaderReflection *refl : m_Shaders)
|
||||
for(const ShaderReflection *refl : m_Shaders)
|
||||
delete refl;
|
||||
|
||||
// and we own the structured file
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
class DummyDriver : public IReplayDriver
|
||||
{
|
||||
public:
|
||||
DummyDriver(IReplayDriver *original, const rdcarray<ShaderReflection *> &shaders, SDFile *sdfile);
|
||||
DummyDriver(IReplayDriver *original, const rdcarray<const ShaderReflection *> &shaders,
|
||||
SDFile *sdfile);
|
||||
|
||||
void Shutdown();
|
||||
|
||||
@@ -192,7 +193,7 @@ public:
|
||||
private:
|
||||
virtual ~DummyDriver();
|
||||
|
||||
rdcarray<ShaderReflection *> m_Shaders;
|
||||
rdcarray<const ShaderReflection *> m_Shaders;
|
||||
SDFile *m_SDFile;
|
||||
|
||||
APIProperties m_Props;
|
||||
|
||||
@@ -151,8 +151,8 @@ public:
|
||||
virtual rdcarray<DebugMessage> GetDebugMessages() = 0;
|
||||
|
||||
virtual rdcarray<ShaderEntryPoint> GetShaderEntryPoints(ResourceId shader) = 0;
|
||||
virtual ShaderReflection *GetShader(ResourceId pipeline, ResourceId shader,
|
||||
ShaderEntryPoint entry) = 0;
|
||||
virtual const ShaderReflection *GetShader(ResourceId pipeline, ResourceId shader,
|
||||
ShaderEntryPoint entry) = 0;
|
||||
|
||||
virtual rdcarray<rdcstr> GetDisassemblyTargets(bool withPipeline) = 0;
|
||||
virtual rdcstr DisassembleShader(ResourceId pipeline, const ShaderReflection *refl,
|
||||
|
||||
Reference in New Issue
Block a user