mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Fix a number of warnings identified by higher clang warning levels
* We enable a couple of high signal-to-noise warnings in all clang builds
This commit is contained in:
+1
-1
@@ -328,7 +328,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
list(APPEND warning_flags -Wnewline-eof)
|
||||
list(APPEND warning_flags -Wnewline-eof -Wunreachable-code-break -Wclass-varargs -Wcomma -Wstring-conversion)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND NOT APPLE)
|
||||
|
||||
@@ -168,6 +168,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
"QMAKE_CXXFLAGS+=-Wno-unknown-warning -Wno-implicit-fallthrough -Wno-cast-function-type -Wno-stringop-truncation\n")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
file(APPEND
|
||||
${CMAKE_BINARY_DIR}/qrenderdoc/qrenderdoc_cmake.pri
|
||||
"QMAKE_CXXFLAGS+=-Wno-comma\n")
|
||||
endif()
|
||||
|
||||
if(ENABLE_WAYLAND)
|
||||
message(WARNING "!!!! Using the Wayland Qt platform in qrenderdoc is NOT SUPPORTED !!!!")
|
||||
file(APPEND
|
||||
|
||||
@@ -112,13 +112,7 @@
|
||||
}
|
||||
|
||||
// ignore some operators SWIG doesn't have to worry about
|
||||
%ignore SDType::operator=;
|
||||
%ignore StructuredObjectList::swap;
|
||||
%ignore StructuredChunkList::swap;
|
||||
%ignore StructuredObjectList::operator=;
|
||||
%ignore StructuredObjectList::operator=;
|
||||
%ignore StructuredChunkList::operator=;
|
||||
%ignore StructuredBufferList::operator=;
|
||||
%ignore *::operator=;
|
||||
|
||||
// these objects return a new copy which the python caller should own.
|
||||
%newobject SDObject::Duplicate;
|
||||
|
||||
@@ -354,9 +354,12 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR APPLE)
|
||||
# Need to add -Wno-unknown-warning-option since only newer clang versions have
|
||||
# -Wno-unused-lambda-capture available
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Only clang has this warning. Fixing it in this file causes a compile error on windows
|
||||
set_source_files_properties(os/os_specific.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-unknown-warning-option -Wno-unused-lambda-capture")
|
||||
set_property(SOURCE 3rdparty/jpeg-compressor/jpgd.cpp
|
||||
APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unreachable-code-break -Wno-implicit-fallthrough")
|
||||
|
||||
# Only clang has this warning. Fixing it in this file causes a compile error on windows
|
||||
set_source_files_properties(os/os_specific.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-unknown-warning-option -Wno-unused-lambda-capture")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -439,7 +439,7 @@ struct AndroidRemoteServer : public RemoteServer
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~AndroidRemoteServer()
|
||||
virtual ~AndroidRemoteServer() override
|
||||
{
|
||||
if(m_LogcatThread)
|
||||
m_LogcatThread->Finish();
|
||||
|
||||
+11
-14
@@ -42,8 +42,8 @@ void InjectVulkanLayerSearchPath(Connection &conn, threadID thread, int32_t slot
|
||||
|
||||
if(!stringClass || !stringConcat)
|
||||
{
|
||||
RDCERR("Couldn't find java.lang.String (%llu) or java.lang.String.concat() (%llu)", stringClass,
|
||||
stringConcat);
|
||||
RDCERR("Couldn't find java.lang.String (%llu) or java.lang.String.concat() (%llu)",
|
||||
(uint64_t)stringClass, (uint64_t)stringConcat);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -247,8 +247,8 @@ bool InjectLibraries(const std::string &deviceID, Network::Socket *sock)
|
||||
// (re-suspended) when the first event occurs that matches the filter function
|
||||
Event evData =
|
||||
conn.WaitForEvent(EventKind::MethodEntry, {{ModifierKind::ClassOnly, vulkanLoaderClass}},
|
||||
[vulkanLoaderMethod](const Event &evData) {
|
||||
return evData.MethodEntry.location.meth == vulkanLoaderMethod;
|
||||
[vulkanLoaderMethod](const Event &ev) {
|
||||
return ev.MethodEntry.location.meth == vulkanLoaderMethod;
|
||||
});
|
||||
|
||||
// if we successfully hit the event, try to inject
|
||||
@@ -290,10 +290,9 @@ bool InjectLibraries(const std::string &deviceID, Network::Socket *sock)
|
||||
|
||||
// wait until we hit the constructor of android.app.Application
|
||||
{
|
||||
Event evData = conn.WaitForEvent(EventKind::MethodEntry, {{ModifierKind::ClassOnly, androidApp}},
|
||||
[appConstruct](const Event &evData) {
|
||||
return evData.MethodEntry.location.meth == appConstruct;
|
||||
});
|
||||
Event evData = conn.WaitForEvent(
|
||||
EventKind::MethodEntry, {{ModifierKind::ClassOnly, androidApp}},
|
||||
[appConstruct](const Event &ev) { return ev.MethodEntry.location.meth == appConstruct; });
|
||||
|
||||
if(evData.eventKind == EventKind::MethodEntry)
|
||||
thread = evData.MethodEntry.thread;
|
||||
@@ -371,11 +370,9 @@ bool InjectLibraries(const std::string &deviceID, Network::Socket *sock)
|
||||
{
|
||||
thread = 0;
|
||||
|
||||
Event evData =
|
||||
conn.WaitForEvent(EventKind::MethodEntry, {{ModifierKind::ClassOnly, onCreateClass}},
|
||||
[onCreateMethod](const Event &evData) {
|
||||
return evData.MethodEntry.location.meth == onCreateMethod;
|
||||
});
|
||||
Event evData = conn.WaitForEvent(
|
||||
EventKind::MethodEntry, {{ModifierKind::ClassOnly, onCreateClass}},
|
||||
[onCreateMethod](const Event &ev) { return ev.MethodEntry.location.meth == onCreateMethod; });
|
||||
|
||||
if(evData.eventKind == EventKind::MethodEntry)
|
||||
thread = evData.MethodEntry.thread;
|
||||
@@ -403,7 +400,7 @@ bool InjectLibraries(const std::string &deviceID, Network::Socket *sock)
|
||||
if(getRuntime == 0 || load == 0)
|
||||
{
|
||||
RDCERR("Couldn't find java.lang.Runtime.getRuntime() %llu or java.lang.Runtime.load() %llu",
|
||||
getRuntime, load);
|
||||
(uint64_t)getRuntime, (uint64_t)load);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,8 +280,8 @@ std::vector<VariableSlot> Connection::GetLocalVariables(referenceTypeID type, me
|
||||
|
||||
CommandData data = cmd.GetData();
|
||||
data.Read(argumentCount); // unused for now
|
||||
ReadVector<VariableSlot>(data, slots, [](CommandData &data, VariableSlot &s) {
|
||||
data.Read(s.codeIndex).Read(s.name).Read(s.signature).Read(s.length).Read(s.slot);
|
||||
ReadVector<VariableSlot>(data, slots, [](CommandData &d, VariableSlot &s) {
|
||||
d.Read(s.codeIndex).Read(s.name).Read(s.signature).Read(s.length).Read(s.slot);
|
||||
});
|
||||
data.Done();
|
||||
|
||||
@@ -299,8 +299,8 @@ fieldID Connection::GetField(referenceTypeID type, const std::string &name,
|
||||
|
||||
std::vector<Field> fields;
|
||||
CommandData data = cmd.GetData();
|
||||
ReadVector<Field>(data, fields, [](CommandData &data, Field &f) {
|
||||
data.Read(f.id).Read(f.name).Read(f.signature).Read(f.modBits);
|
||||
ReadVector<Field>(data, fields, [](CommandData &d, Field &f) {
|
||||
d.Read(f.id).Read(f.name).Read(f.signature).Read(f.modBits);
|
||||
});
|
||||
data.Done();
|
||||
|
||||
@@ -341,8 +341,8 @@ std::vector<StackFrame> Connection::GetCallStack(threadID thread)
|
||||
|
||||
std::vector<StackFrame> ret;
|
||||
CommandData data = cmd.GetData();
|
||||
ReadVector<StackFrame>(
|
||||
data, ret, [](CommandData &data, StackFrame &f) { data.Read(f.id).Read(f.location); });
|
||||
ReadVector<StackFrame>(data, ret,
|
||||
[](CommandData &d, StackFrame &f) { d.Read(f.id).Read(f.location); });
|
||||
data.Done();
|
||||
|
||||
// simplify error handling, if the stack came back as nonsense then clear it
|
||||
@@ -401,10 +401,10 @@ Event Connection::WaitForEvent(EventKind kind, const std::vector<EventFilter> &e
|
||||
// always suspend all threads
|
||||
data.Write((byte)kind).Write((byte)SuspendPolicy::All);
|
||||
|
||||
WriteVector<EventFilter>(data, eventFilters, [](CommandData &data, const EventFilter &f) {
|
||||
data.Write((byte)f.modKind);
|
||||
WriteVector<EventFilter>(data, eventFilters, [](CommandData &d, const EventFilter &f) {
|
||||
d.Write((byte)f.modKind);
|
||||
if(f.modKind == ModifierKind::ClassOnly)
|
||||
data.Write(f.ClassOnly);
|
||||
d.Write(f.ClassOnly);
|
||||
else
|
||||
RDCERR("Unsupported event filter %d", f.modKind);
|
||||
});
|
||||
@@ -444,7 +444,7 @@ Event Connection::WaitForEvent(EventKind kind, const std::vector<EventFilter> &e
|
||||
CommandData data = msg.GetData();
|
||||
|
||||
data.Read((byte &)suspendPolicy);
|
||||
ReadVector<Event>(data, events, [this](CommandData &data, Event &ev) { ReadEvent(data, ev); });
|
||||
ReadVector<Event>(data, events, [this](CommandData &d, Event &ev) { ReadEvent(d, ev); });
|
||||
data.Done();
|
||||
|
||||
// event arrived, we're now suspended
|
||||
@@ -540,7 +540,7 @@ value Connection::InvokeInstance(threadID thread, classID clazz, methodID method
|
||||
data.Write(object).Write(thread).Write(clazz).Write(method);
|
||||
}
|
||||
|
||||
WriteVector<value>(data, arguments, [](CommandData &data, const value &v) { data.Write(v); });
|
||||
WriteVector<value>(data, arguments, [](CommandData &d, const value &v) { d.Write(v); });
|
||||
|
||||
data.Write((int32_t)options);
|
||||
|
||||
@@ -610,8 +610,8 @@ std::vector<Method> Connection::GetMethods(referenceTypeID searchClass)
|
||||
|
||||
std::vector<Method> ret;
|
||||
CommandData data = cmd.GetData();
|
||||
ReadVector<Method>(data, ret, [](CommandData &data, Method &m) {
|
||||
data.Read(m.id).Read(m.name).Read(m.signature).Read(m.modBits);
|
||||
ReadVector<Method>(data, ret, [](CommandData &d, Method &m) {
|
||||
d.Read(m.id).Read(m.name).Read(m.signature).Read(m.modBits);
|
||||
});
|
||||
data.Done();
|
||||
return ret;
|
||||
|
||||
@@ -293,12 +293,12 @@ protected:
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
static void deallocate(const T *p)
|
||||
static void deallocate(T *p)
|
||||
{
|
||||
#ifdef RENDERDOC_EXPORTS
|
||||
free((void *)p);
|
||||
#else
|
||||
RENDERDOC_FreeArrayMem((const void *)p);
|
||||
RENDERDOC_FreeArrayMem((void *)p);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ struct CaptureOptions
|
||||
{
|
||||
rdcstr optstr;
|
||||
optstr.reserve(sizeof(CaptureOptions) * 2 + 1);
|
||||
byte *b = (byte *)this;
|
||||
const byte *b = (const byte *)this;
|
||||
for(size_t i = 0; i < sizeof(CaptureOptions); i++)
|
||||
{
|
||||
optstr.push_back(char('a' + ((b[i] >> 4) & 0xf)));
|
||||
@@ -67,7 +67,7 @@ struct CaptureOptions
|
||||
// serialise from string with two chars per byte
|
||||
byte *b = (byte *)this;
|
||||
for(size_t i = 0; i < sizeof(CaptureOptions); i++)
|
||||
*(b++) = (byte(str[i * 2 + 0] - 'a') << 4) | byte(str[i * 2 + 1] - 'a');
|
||||
*(b++) = byte(((byte(str[i * 2 + 0] - 'a') & 0xf) << 4) | (byte(str[i * 2 + 1] - 'a') & 0xf));
|
||||
}
|
||||
|
||||
DOCUMENT(R"(Allow the application to enable vsync.
|
||||
|
||||
@@ -36,6 +36,7 @@ struct Viewport
|
||||
{
|
||||
}
|
||||
Viewport(const Viewport &) = default;
|
||||
Viewport &operator=(const Viewport &) = default;
|
||||
|
||||
bool operator==(const Viewport &o) const
|
||||
{
|
||||
@@ -86,6 +87,7 @@ struct Scissor
|
||||
{
|
||||
}
|
||||
Scissor(const Scissor &) = default;
|
||||
Scissor &operator=(const Scissor &) = default;
|
||||
|
||||
bool operator==(const Scissor &o) const
|
||||
{
|
||||
@@ -125,6 +127,7 @@ struct BlendEquation
|
||||
DOCUMENT("");
|
||||
BlendEquation() = default;
|
||||
BlendEquation(const BlendEquation &) = default;
|
||||
BlendEquation &operator=(const BlendEquation &) = default;
|
||||
|
||||
bool operator==(const BlendEquation &o) const
|
||||
{
|
||||
@@ -156,6 +159,7 @@ struct ColorBlend
|
||||
DOCUMENT("");
|
||||
ColorBlend() = default;
|
||||
ColorBlend(const ColorBlend &) = default;
|
||||
ColorBlend &operator=(const ColorBlend &) = default;
|
||||
|
||||
bool operator==(const ColorBlend &o) const
|
||||
{
|
||||
@@ -206,6 +210,7 @@ struct StencilFace
|
||||
DOCUMENT("");
|
||||
StencilFace() = default;
|
||||
StencilFace(const StencilFace &) = default;
|
||||
StencilFace &operator=(const StencilFace &) = default;
|
||||
|
||||
DOCUMENT("The :class:`StencilOperation` to apply if the stencil-test fails.");
|
||||
StencilOperation failOperation = StencilOperation::Keep;
|
||||
@@ -246,6 +251,7 @@ struct BoundResource
|
||||
typeCast = CompType::Typeless;
|
||||
}
|
||||
BoundResource(const BoundResource &) = default;
|
||||
BoundResource &operator=(const BoundResource &) = default;
|
||||
|
||||
bool operator==(const BoundResource &o) const
|
||||
{
|
||||
@@ -292,6 +298,7 @@ struct BoundResourceArray
|
||||
DOCUMENT("");
|
||||
BoundResourceArray() = default;
|
||||
BoundResourceArray(const BoundResourceArray &) = default;
|
||||
BoundResourceArray &operator=(const BoundResourceArray &) = default;
|
||||
BoundResourceArray(Bindpoint b) : bindPoint(b) {}
|
||||
BoundResourceArray(Bindpoint b, const rdcarray<BoundResource> &r) : bindPoint(b), resources(r)
|
||||
{
|
||||
@@ -323,6 +330,7 @@ struct BoundVBuffer
|
||||
DOCUMENT("");
|
||||
BoundVBuffer() = default;
|
||||
BoundVBuffer(const BoundVBuffer &) = default;
|
||||
BoundVBuffer &operator=(const BoundVBuffer &) = default;
|
||||
|
||||
bool operator==(const BoundVBuffer &o) const
|
||||
{
|
||||
@@ -354,6 +362,7 @@ struct BoundCBuffer
|
||||
DOCUMENT("");
|
||||
BoundCBuffer() = default;
|
||||
BoundCBuffer(const BoundCBuffer &) = default;
|
||||
BoundCBuffer &operator=(const BoundCBuffer &) = default;
|
||||
|
||||
DOCUMENT("A :class:`~renderdoc.ResourceId` identifying the buffer.");
|
||||
ResourceId resourceId;
|
||||
@@ -371,6 +380,7 @@ struct VertexInputAttribute
|
||||
DOCUMENT("");
|
||||
VertexInputAttribute() = default;
|
||||
VertexInputAttribute(const VertexInputAttribute &) = default;
|
||||
VertexInputAttribute &operator=(const VertexInputAttribute &) = default;
|
||||
|
||||
bool operator==(const VertexInputAttribute &o) const
|
||||
{
|
||||
|
||||
@@ -51,6 +51,7 @@ struct MeshFormat
|
||||
restartIndex = 0xffffffff;
|
||||
}
|
||||
MeshFormat(const MeshFormat &o) = default;
|
||||
MeshFormat &operator=(const MeshFormat &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the index buffer that goes with this mesh element.");
|
||||
ResourceId indexResourceId;
|
||||
@@ -119,6 +120,7 @@ struct MeshDisplay
|
||||
DOCUMENT("");
|
||||
MeshDisplay() = default;
|
||||
MeshDisplay(const MeshDisplay &) = default;
|
||||
MeshDisplay &operator=(const MeshDisplay &) = default;
|
||||
|
||||
DOCUMENT("The :class:`MeshDataStage` where this mesh data comes from.");
|
||||
MeshDataStage type;
|
||||
@@ -194,6 +196,7 @@ struct TextureDisplay
|
||||
DOCUMENT("");
|
||||
TextureDisplay() = default;
|
||||
TextureDisplay(const TextureDisplay &) = default;
|
||||
TextureDisplay &operator=(const TextureDisplay &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the texture to display.");
|
||||
ResourceId resourceId;
|
||||
@@ -305,6 +308,7 @@ struct TextureComponentMapping
|
||||
DOCUMENT("");
|
||||
TextureComponentMapping() = default;
|
||||
TextureComponentMapping(const TextureComponentMapping &) = default;
|
||||
TextureComponentMapping &operator=(const TextureComponentMapping &) = default;
|
||||
|
||||
DOCUMENT("The value that should be mapped to ``0``");
|
||||
float blackPoint = 0.0f;
|
||||
@@ -325,6 +329,7 @@ struct TextureSampleMapping
|
||||
DOCUMENT("");
|
||||
TextureSampleMapping() = default;
|
||||
TextureSampleMapping(const TextureSampleMapping &) = default;
|
||||
TextureSampleMapping &operator=(const TextureSampleMapping &) = default;
|
||||
|
||||
DOCUMENT(R"(
|
||||
``True`` if the samples should be mapped to array slices. A multisampled array expands each slice
|
||||
@@ -356,6 +361,7 @@ struct TextureSliceMapping
|
||||
DOCUMENT("");
|
||||
TextureSliceMapping() = default;
|
||||
TextureSliceMapping(const TextureSliceMapping &) = default;
|
||||
TextureSliceMapping &operator=(const TextureSliceMapping &) = default;
|
||||
|
||||
DOCUMENT(R"(
|
||||
Selects the (depth/array) slice to save.
|
||||
@@ -402,6 +408,7 @@ struct TextureSave
|
||||
DOCUMENT("");
|
||||
TextureSave() = default;
|
||||
TextureSave(const TextureSave &) = default;
|
||||
TextureSave &operator=(const TextureSave &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the texture to save.");
|
||||
ResourceId resourceId;
|
||||
@@ -466,6 +473,7 @@ struct NewCaptureData
|
||||
DOCUMENT("");
|
||||
NewCaptureData() = default;
|
||||
NewCaptureData(const NewCaptureData &) = default;
|
||||
NewCaptureData &operator=(const NewCaptureData &) = default;
|
||||
|
||||
DOCUMENT("An identifier to use to refer to this capture.");
|
||||
uint32_t captureId = 0;
|
||||
@@ -499,6 +507,7 @@ struct APIUseData
|
||||
DOCUMENT("");
|
||||
APIUseData() = default;
|
||||
APIUseData(const APIUseData &) = default;
|
||||
APIUseData &operator=(const APIUseData &) = default;
|
||||
|
||||
DOCUMENT("The name of the API.");
|
||||
rdcstr name;
|
||||
@@ -518,6 +527,7 @@ struct BusyData
|
||||
DOCUMENT("");
|
||||
BusyData() = default;
|
||||
BusyData(const BusyData &) = default;
|
||||
BusyData &operator=(const BusyData &) = default;
|
||||
|
||||
DOCUMENT("The name of the client currently connected to the target.");
|
||||
rdcstr clientName;
|
||||
@@ -531,6 +541,7 @@ struct NewChildData
|
||||
DOCUMENT("");
|
||||
NewChildData() = default;
|
||||
NewChildData(const NewChildData &) = default;
|
||||
NewChildData &operator=(const NewChildData &) = default;
|
||||
|
||||
DOCUMENT("The PID (Process ID) of the new child.");
|
||||
uint32_t processId = 0;
|
||||
@@ -546,6 +557,7 @@ struct TargetControlMessage
|
||||
DOCUMENT("");
|
||||
TargetControlMessage() = default;
|
||||
TargetControlMessage(const TargetControlMessage &) = default;
|
||||
TargetControlMessage &operator=(const TargetControlMessage &) = default;
|
||||
|
||||
DOCUMENT("The :class:`type <TargetControlMessageType>` of message received");
|
||||
TargetControlMessageType type = TargetControlMessageType::Unknown;
|
||||
@@ -581,6 +593,7 @@ struct EnvironmentModification
|
||||
: mod(m), sep(s), name(n), value(v)
|
||||
{
|
||||
}
|
||||
EnvironmentModification &operator=(const EnvironmentModification &) = default;
|
||||
|
||||
bool operator==(const EnvironmentModification &o) const
|
||||
{
|
||||
@@ -616,6 +629,7 @@ struct CaptureFileFormat
|
||||
DOCUMENT("");
|
||||
CaptureFileFormat() = default;
|
||||
CaptureFileFormat(const CaptureFileFormat &) = default;
|
||||
CaptureFileFormat &operator=(const CaptureFileFormat &) = default;
|
||||
|
||||
bool operator==(const CaptureFileFormat &o) const
|
||||
{
|
||||
@@ -671,6 +685,7 @@ struct GPUDevice
|
||||
DOCUMENT("");
|
||||
GPUDevice() = default;
|
||||
GPUDevice(const GPUDevice &) = default;
|
||||
GPUDevice &operator=(const GPUDevice &) = default;
|
||||
|
||||
bool operator==(const GPUDevice &o) const
|
||||
{
|
||||
@@ -709,6 +724,7 @@ struct ReplayOptions
|
||||
DOCUMENT("");
|
||||
ReplayOptions() = default;
|
||||
ReplayOptions(const ReplayOptions &) = default;
|
||||
ReplayOptions &operator=(const ReplayOptions &) = default;
|
||||
|
||||
DOCUMENT(R"(Replay with API validation enabled and use debug messages from there, ignoring any
|
||||
that may be contained in the capture.
|
||||
|
||||
@@ -41,6 +41,7 @@ struct Layout
|
||||
DOCUMENT("");
|
||||
Layout() = default;
|
||||
Layout(const Layout &) = default;
|
||||
Layout &operator=(const Layout &) = default;
|
||||
|
||||
bool operator==(const Layout &o) const
|
||||
{
|
||||
@@ -107,6 +108,7 @@ struct VertexBuffer
|
||||
DOCUMENT("");
|
||||
VertexBuffer() = default;
|
||||
VertexBuffer(const VertexBuffer &) = default;
|
||||
VertexBuffer &operator=(const VertexBuffer &) = default;
|
||||
|
||||
bool operator==(const VertexBuffer &o) const
|
||||
{
|
||||
@@ -138,6 +140,7 @@ struct IndexBuffer
|
||||
DOCUMENT("");
|
||||
IndexBuffer() = default;
|
||||
IndexBuffer(const IndexBuffer &) = default;
|
||||
IndexBuffer &operator=(const IndexBuffer &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the index buffer.");
|
||||
ResourceId resourceId;
|
||||
@@ -152,6 +155,7 @@ struct InputAssembly
|
||||
DOCUMENT("");
|
||||
InputAssembly() = default;
|
||||
InputAssembly(const InputAssembly &) = default;
|
||||
InputAssembly &operator=(const InputAssembly &) = default;
|
||||
|
||||
DOCUMENT("A list of :class:`D3D11Layout` describing the input layout elements in this layout.");
|
||||
rdcarray<Layout> layouts;
|
||||
@@ -175,6 +179,7 @@ struct View
|
||||
DOCUMENT("");
|
||||
View() = default;
|
||||
View(const View &) = default;
|
||||
View &operator=(const View &) = default;
|
||||
|
||||
bool operator==(const View &o) const
|
||||
{
|
||||
@@ -270,6 +275,7 @@ struct Sampler
|
||||
DOCUMENT("");
|
||||
Sampler() = default;
|
||||
Sampler(const Sampler &) = default;
|
||||
Sampler &operator=(const Sampler &) = default;
|
||||
|
||||
bool operator==(const Sampler &o) const
|
||||
{
|
||||
@@ -353,6 +359,7 @@ struct ConstantBuffer
|
||||
DOCUMENT("");
|
||||
ConstantBuffer() = default;
|
||||
ConstantBuffer(const ConstantBuffer &) = default;
|
||||
ConstantBuffer &operator=(const ConstantBuffer &) = default;
|
||||
|
||||
bool operator==(const ConstantBuffer &o) const
|
||||
{
|
||||
@@ -390,6 +397,7 @@ struct Shader
|
||||
DOCUMENT("");
|
||||
Shader() = default;
|
||||
Shader(const Shader &) = default;
|
||||
Shader &operator=(const Shader &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the shader itself.");
|
||||
ResourceId resourceId;
|
||||
@@ -426,6 +434,7 @@ struct StreamOutBind
|
||||
DOCUMENT("");
|
||||
StreamOutBind() = default;
|
||||
StreamOutBind(const StreamOutBind &) = default;
|
||||
StreamOutBind &operator=(const StreamOutBind &) = default;
|
||||
|
||||
bool operator==(const StreamOutBind &o) const
|
||||
{
|
||||
@@ -452,6 +461,7 @@ struct StreamOut
|
||||
DOCUMENT("");
|
||||
StreamOut() = default;
|
||||
StreamOut(const StreamOut &) = default;
|
||||
StreamOut &operator=(const StreamOut &) = default;
|
||||
|
||||
DOCUMENT("A list of ``D3D11StreamOutBind`` with the bound buffers.");
|
||||
rdcarray<StreamOutBind> outputs;
|
||||
@@ -463,6 +473,7 @@ struct RasterizerState
|
||||
DOCUMENT("");
|
||||
RasterizerState() = default;
|
||||
RasterizerState(const RasterizerState &) = default;
|
||||
RasterizerState &operator=(const RasterizerState &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the rasterizer state object.");
|
||||
ResourceId resourceId;
|
||||
@@ -506,6 +517,7 @@ struct Rasterizer
|
||||
DOCUMENT("");
|
||||
Rasterizer() = default;
|
||||
Rasterizer(const Rasterizer &) = default;
|
||||
Rasterizer &operator=(const Rasterizer &) = default;
|
||||
|
||||
DOCUMENT("A list of :class:`Viewport` with the bound viewports.");
|
||||
rdcarray<Viewport> viewports;
|
||||
@@ -523,6 +535,7 @@ struct DepthStencilState
|
||||
DOCUMENT("");
|
||||
DepthStencilState() = default;
|
||||
DepthStencilState(const DepthStencilState &) = default;
|
||||
DepthStencilState &operator=(const DepthStencilState &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the depth-stencil state object.");
|
||||
ResourceId resourceId;
|
||||
@@ -547,6 +560,7 @@ struct BlendState
|
||||
DOCUMENT("");
|
||||
BlendState() = default;
|
||||
BlendState(const BlendState &) = default;
|
||||
BlendState &operator=(const BlendState &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the blend state object.");
|
||||
ResourceId resourceId;
|
||||
@@ -574,6 +588,7 @@ struct OutputMerger
|
||||
DOCUMENT("");
|
||||
OutputMerger() = default;
|
||||
OutputMerger(const OutputMerger &) = default;
|
||||
OutputMerger &operator=(const OutputMerger &) = default;
|
||||
|
||||
DOCUMENT("A :class:`D3D11DepthStencilState` with the details of the depth-stencil state.");
|
||||
DepthStencilState depthStencilState;
|
||||
@@ -602,6 +617,7 @@ struct Predication
|
||||
DOCUMENT("");
|
||||
Predication() = default;
|
||||
Predication(const Predication &) = default;
|
||||
Predication &operator=(const Predication &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the active predicate.");
|
||||
ResourceId resourceId;
|
||||
|
||||
@@ -40,6 +40,7 @@ struct Layout
|
||||
DOCUMENT("");
|
||||
Layout() = default;
|
||||
Layout(const Layout &) = default;
|
||||
Layout &operator=(const Layout &) = default;
|
||||
|
||||
bool operator==(const Layout &o) const
|
||||
{
|
||||
@@ -106,6 +107,7 @@ struct VertexBuffer
|
||||
DOCUMENT("");
|
||||
VertexBuffer() = default;
|
||||
VertexBuffer(const VertexBuffer &) = default;
|
||||
VertexBuffer &operator=(const VertexBuffer &) = default;
|
||||
|
||||
bool operator==(const VertexBuffer &o) const
|
||||
{
|
||||
@@ -143,6 +145,7 @@ struct IndexBuffer
|
||||
DOCUMENT("");
|
||||
IndexBuffer() = default;
|
||||
IndexBuffer(const IndexBuffer &) = default;
|
||||
IndexBuffer &operator=(const IndexBuffer &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the index buffer.");
|
||||
ResourceId resourceId;
|
||||
@@ -160,6 +163,7 @@ struct InputAssembly
|
||||
DOCUMENT("");
|
||||
InputAssembly() = default;
|
||||
InputAssembly(const InputAssembly &) = default;
|
||||
InputAssembly &operator=(const InputAssembly &) = default;
|
||||
|
||||
DOCUMENT("A list of :class:`D3D12Layout` describing the input layout elements in this layout.");
|
||||
rdcarray<Layout> layouts;
|
||||
@@ -185,6 +189,7 @@ struct View
|
||||
DOCUMENT("");
|
||||
View() = default;
|
||||
View(const View &) = default;
|
||||
View &operator=(const View &) = default;
|
||||
|
||||
bool operator==(const View &o) const
|
||||
{
|
||||
@@ -292,6 +297,7 @@ struct Sampler
|
||||
DOCUMENT("");
|
||||
Sampler() = default;
|
||||
Sampler(const Sampler &) = default;
|
||||
Sampler &operator=(const Sampler &) = default;
|
||||
|
||||
bool operator==(const Sampler &o) const
|
||||
{
|
||||
@@ -385,6 +391,7 @@ struct ConstantBuffer
|
||||
DOCUMENT("");
|
||||
ConstantBuffer() = default;
|
||||
ConstantBuffer(const ConstantBuffer &) = default;
|
||||
ConstantBuffer &operator=(const ConstantBuffer &) = default;
|
||||
|
||||
bool operator==(const ConstantBuffer &o) const
|
||||
{
|
||||
@@ -436,6 +443,7 @@ struct RegisterSpace
|
||||
DOCUMENT("");
|
||||
RegisterSpace() = default;
|
||||
RegisterSpace(const RegisterSpace &) = default;
|
||||
RegisterSpace &operator=(const RegisterSpace &) = default;
|
||||
|
||||
bool operator==(const RegisterSpace &o) const
|
||||
{
|
||||
@@ -474,6 +482,7 @@ struct Shader
|
||||
DOCUMENT("");
|
||||
Shader() = default;
|
||||
Shader(const Shader &) = default;
|
||||
Shader &operator=(const Shader &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the shader object itself.");
|
||||
ResourceId resourceId;
|
||||
@@ -512,6 +521,7 @@ struct StreamOutBind
|
||||
DOCUMENT("");
|
||||
StreamOutBind() = default;
|
||||
StreamOutBind(const StreamOutBind &) = default;
|
||||
StreamOutBind &operator=(const StreamOutBind &) = default;
|
||||
|
||||
bool operator==(const StreamOutBind &o) const
|
||||
{
|
||||
@@ -556,6 +566,7 @@ struct StreamOut
|
||||
DOCUMENT("");
|
||||
StreamOut() = default;
|
||||
StreamOut(const StreamOut &) = default;
|
||||
StreamOut &operator=(const StreamOut &) = default;
|
||||
|
||||
DOCUMENT("A list of ``D3D12SOBind`` with the bound buffers.");
|
||||
rdcarray<StreamOutBind> outputs;
|
||||
@@ -567,6 +578,7 @@ struct RasterizerState
|
||||
DOCUMENT("");
|
||||
RasterizerState() = default;
|
||||
RasterizerState(const RasterizerState &) = default;
|
||||
RasterizerState &operator=(const RasterizerState &) = default;
|
||||
|
||||
DOCUMENT("The polygon :class:`FillMode`.");
|
||||
FillMode fillMode = FillMode::Solid;
|
||||
@@ -606,6 +618,7 @@ struct Rasterizer
|
||||
DOCUMENT("");
|
||||
Rasterizer() = default;
|
||||
Rasterizer(const Rasterizer &) = default;
|
||||
Rasterizer &operator=(const Rasterizer &) = default;
|
||||
|
||||
DOCUMENT("The mask determining which samples are written to.");
|
||||
uint32_t sampleMask = ~0U;
|
||||
@@ -626,6 +639,7 @@ struct DepthStencilState
|
||||
DOCUMENT("");
|
||||
DepthStencilState() = default;
|
||||
DepthStencilState(const DepthStencilState &) = default;
|
||||
DepthStencilState &operator=(const DepthStencilState &) = default;
|
||||
|
||||
DOCUMENT("``True`` if depth testing should be performed.");
|
||||
bool depthEnable = false;
|
||||
@@ -655,6 +669,7 @@ struct BlendState
|
||||
DOCUMENT("");
|
||||
BlendState() = default;
|
||||
BlendState(const BlendState &) = default;
|
||||
BlendState &operator=(const BlendState &) = default;
|
||||
|
||||
DOCUMENT("``True`` if alpha-to-coverage should be used when blending to an MSAA target.");
|
||||
bool alphaToCoverage = false;
|
||||
@@ -677,6 +692,7 @@ struct OM
|
||||
DOCUMENT("");
|
||||
OM() = default;
|
||||
OM(const OM &) = default;
|
||||
OM &operator=(const OM &) = default;
|
||||
|
||||
DOCUMENT("A :class:`D3D12DepthStencilState` with the details of the depth-stencil state.");
|
||||
DepthStencilState depthStencilState;
|
||||
@@ -705,6 +721,7 @@ struct ResourceState
|
||||
DOCUMENT("");
|
||||
ResourceState() = default;
|
||||
ResourceState(const ResourceState &) = default;
|
||||
ResourceState &operator=(const ResourceState &) = default;
|
||||
|
||||
bool operator==(const ResourceState &o) const { return name == o.name; }
|
||||
bool operator<(const ResourceState &o) const
|
||||
@@ -723,6 +740,7 @@ struct ResourceData
|
||||
DOCUMENT("");
|
||||
ResourceData() = default;
|
||||
ResourceData(const ResourceData &) = default;
|
||||
ResourceData &operator=(const ResourceData &) = default;
|
||||
|
||||
bool operator==(const ResourceData &o) const
|
||||
{
|
||||
|
||||
@@ -34,6 +34,7 @@ struct FloatVector
|
||||
FloatVector() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
|
||||
FloatVector(const FloatVector &) = default;
|
||||
FloatVector(float X, float Y, float Z, float W) : x(X), y(Y), z(Z), w(W) {}
|
||||
FloatVector &operator=(const FloatVector &) = default;
|
||||
#if defined(RENDERDOC_QT_COMPAT)
|
||||
FloatVector(const QColor &col) : x(col.redF()), y(col.greenF()), z(col.blueF()), w(col.alphaF())
|
||||
{
|
||||
@@ -75,6 +76,7 @@ struct PathEntry
|
||||
PathEntry() : flags(PathProperty::NoFlags), lastmod(0), size(0) {}
|
||||
PathEntry(const PathEntry &) = default;
|
||||
PathEntry(const char *fn, PathProperty f) : filename(fn), flags(f), lastmod(0), size(0) {}
|
||||
PathEntry &operator=(const PathEntry &) = default;
|
||||
bool operator==(const PathEntry &o) const
|
||||
{
|
||||
return filename == o.filename && flags == o.flags && lastmod == o.lastmod && size == o.size;
|
||||
@@ -112,6 +114,7 @@ struct SectionProperties
|
||||
DOCUMENT("");
|
||||
SectionProperties() = default;
|
||||
SectionProperties(const SectionProperties &) = default;
|
||||
SectionProperties &operator=(const SectionProperties &) = default;
|
||||
|
||||
DOCUMENT("The name of this section.");
|
||||
rdcstr name;
|
||||
@@ -154,6 +157,7 @@ struct ResourceFormat
|
||||
flags = 0;
|
||||
}
|
||||
ResourceFormat(const ResourceFormat &) = default;
|
||||
ResourceFormat &operator=(const ResourceFormat &) = default;
|
||||
|
||||
bool operator==(const ResourceFormat &r) const
|
||||
{
|
||||
@@ -386,6 +390,7 @@ struct TextureFilter
|
||||
DOCUMENT("");
|
||||
TextureFilter() = default;
|
||||
TextureFilter(const TextureFilter &) = default;
|
||||
TextureFilter &operator=(const TextureFilter &) = default;
|
||||
|
||||
bool operator==(const TextureFilter &o) const
|
||||
{
|
||||
@@ -421,6 +426,7 @@ struct ResourceDescription
|
||||
DOCUMENT("");
|
||||
ResourceDescription() = default;
|
||||
ResourceDescription(const ResourceDescription &) = default;
|
||||
ResourceDescription &operator=(const ResourceDescription &) = default;
|
||||
|
||||
bool operator==(const ResourceDescription &o) const { return resourceId == o.resourceId; }
|
||||
bool operator<(const ResourceDescription &o) const { return resourceId < o.resourceId; }
|
||||
@@ -481,6 +487,7 @@ struct BufferDescription
|
||||
DOCUMENT("");
|
||||
BufferDescription() = default;
|
||||
BufferDescription(const BufferDescription &) = default;
|
||||
BufferDescription &operator=(const BufferDescription &) = default;
|
||||
|
||||
bool operator==(const BufferDescription &o) const
|
||||
{
|
||||
@@ -520,6 +527,7 @@ struct TextureDescription
|
||||
DOCUMENT("");
|
||||
TextureDescription() = default;
|
||||
TextureDescription(const TextureDescription &) = default;
|
||||
TextureDescription &operator=(const TextureDescription &) = default;
|
||||
|
||||
bool operator==(const TextureDescription &o) const
|
||||
{
|
||||
@@ -612,6 +620,7 @@ struct APIEvent
|
||||
DOCUMENT("");
|
||||
APIEvent() = default;
|
||||
APIEvent(const APIEvent &) = default;
|
||||
APIEvent &operator=(const APIEvent &) = default;
|
||||
|
||||
bool operator==(const APIEvent &o) const { return eventId == o.eventId; }
|
||||
bool operator<(const APIEvent &o) const { return eventId < o.eventId; }
|
||||
@@ -653,6 +662,7 @@ struct DebugMessage
|
||||
DOCUMENT("");
|
||||
DebugMessage() = default;
|
||||
DebugMessage(const DebugMessage &) = default;
|
||||
DebugMessage &operator=(const DebugMessage &) = default;
|
||||
|
||||
bool operator==(const DebugMessage &o) const
|
||||
{
|
||||
@@ -730,6 +740,7 @@ struct ConstantBindStats
|
||||
DOCUMENT("");
|
||||
ConstantBindStats() = default;
|
||||
ConstantBindStats(const ConstantBindStats &) = default;
|
||||
ConstantBindStats &operator=(const ConstantBindStats &) = default;
|
||||
|
||||
static const BucketRecordType BucketType = BucketRecordType::Pow2;
|
||||
static const size_t BucketCount = 31;
|
||||
@@ -758,6 +769,7 @@ struct SamplerBindStats
|
||||
DOCUMENT("");
|
||||
SamplerBindStats() = default;
|
||||
SamplerBindStats(const SamplerBindStats &) = default;
|
||||
SamplerBindStats &operator=(const SamplerBindStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -780,6 +792,7 @@ struct ResourceBindStats
|
||||
DOCUMENT("");
|
||||
ResourceBindStats() = default;
|
||||
ResourceBindStats(const ResourceBindStats &) = default;
|
||||
ResourceBindStats &operator=(const ResourceBindStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -817,6 +830,7 @@ struct ResourceUpdateStats
|
||||
DOCUMENT("");
|
||||
ResourceUpdateStats() = default;
|
||||
ResourceUpdateStats(const ResourceUpdateStats &) = default;
|
||||
ResourceUpdateStats &operator=(const ResourceUpdateStats &) = default;
|
||||
|
||||
static const BucketRecordType BucketType = BucketRecordType::Pow2;
|
||||
static const size_t BucketCount = 31;
|
||||
@@ -861,6 +875,7 @@ struct DrawcallStats
|
||||
DOCUMENT("");
|
||||
DrawcallStats() = default;
|
||||
DrawcallStats(const DrawcallStats &) = default;
|
||||
DrawcallStats &operator=(const DrawcallStats &) = default;
|
||||
|
||||
static const BucketRecordType BucketType = BucketRecordType::Linear;
|
||||
static const size_t BucketSize = 1;
|
||||
@@ -885,6 +900,7 @@ struct DispatchStats
|
||||
DOCUMENT("");
|
||||
DispatchStats() = default;
|
||||
DispatchStats(const DispatchStats &) = default;
|
||||
DispatchStats &operator=(const DispatchStats &) = default;
|
||||
|
||||
DOCUMENT("How many dispatch calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -901,6 +917,7 @@ struct IndexBindStats
|
||||
DOCUMENT("");
|
||||
IndexBindStats() = default;
|
||||
IndexBindStats(const IndexBindStats &) = default;
|
||||
IndexBindStats &operator=(const IndexBindStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -920,6 +937,7 @@ struct VertexBindStats
|
||||
DOCUMENT("");
|
||||
VertexBindStats() = default;
|
||||
VertexBindStats(const VertexBindStats &) = default;
|
||||
VertexBindStats &operator=(const VertexBindStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -943,6 +961,7 @@ struct LayoutBindStats
|
||||
DOCUMENT("");
|
||||
LayoutBindStats() = default;
|
||||
LayoutBindStats(const LayoutBindStats &) = default;
|
||||
LayoutBindStats &operator=(const LayoutBindStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -962,6 +981,7 @@ struct ShaderChangeStats
|
||||
DOCUMENT("");
|
||||
ShaderChangeStats() = default;
|
||||
ShaderChangeStats(const ShaderChangeStats &) = default;
|
||||
ShaderChangeStats &operator=(const ShaderChangeStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -984,6 +1004,7 @@ struct BlendStats
|
||||
DOCUMENT("");
|
||||
BlendStats() = default;
|
||||
BlendStats(const BlendStats &) = default;
|
||||
BlendStats &operator=(const BlendStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -1006,6 +1027,7 @@ struct DepthStencilStats
|
||||
DOCUMENT("");
|
||||
DepthStencilStats() = default;
|
||||
DepthStencilStats(const DepthStencilStats &) = default;
|
||||
DepthStencilStats &operator=(const DepthStencilStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -1028,6 +1050,7 @@ struct RasterizationStats
|
||||
DOCUMENT("");
|
||||
RasterizationStats() = default;
|
||||
RasterizationStats(const RasterizationStats &) = default;
|
||||
RasterizationStats &operator=(const RasterizationStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -1056,6 +1079,7 @@ struct OutputTargetStats
|
||||
DOCUMENT("");
|
||||
OutputTargetStats() = default;
|
||||
OutputTargetStats(const OutputTargetStats &) = default;
|
||||
OutputTargetStats &operator=(const OutputTargetStats &) = default;
|
||||
|
||||
DOCUMENT("How many function calls were made.");
|
||||
uint32_t calls;
|
||||
@@ -1081,6 +1105,7 @@ struct FrameStatistics
|
||||
DOCUMENT("");
|
||||
FrameStatistics() = default;
|
||||
FrameStatistics(const FrameStatistics &) = default;
|
||||
FrameStatistics &operator=(const FrameStatistics &) = default;
|
||||
|
||||
DOCUMENT("``True`` if the statistics in this structure are valid.");
|
||||
bool recorded;
|
||||
@@ -1150,6 +1175,7 @@ struct FrameDescription
|
||||
{
|
||||
}
|
||||
FrameDescription(const FrameDescription &) = default;
|
||||
FrameDescription &operator=(const FrameDescription &) = default;
|
||||
|
||||
DOCUMENT(R"(Starting from frame #1 defined as the time from application startup to first present,
|
||||
this counts the frame number when the capture was made.
|
||||
@@ -1202,6 +1228,7 @@ struct EventUsage
|
||||
EventUsage(const EventUsage &) = default;
|
||||
EventUsage(uint32_t e, ResourceUsage u) : eventId(e), usage(u) {}
|
||||
EventUsage(uint32_t e, ResourceUsage u, ResourceId v) : eventId(e), usage(u), view(v) {}
|
||||
EventUsage &operator=(const EventUsage &) = default;
|
||||
bool operator<(const EventUsage &o) const
|
||||
{
|
||||
if(!(eventId == o.eventId))
|
||||
@@ -1228,6 +1255,7 @@ struct DrawcallDescription
|
||||
DOCUMENT("");
|
||||
DrawcallDescription() { Reset(); }
|
||||
DrawcallDescription(const DrawcallDescription &) = default;
|
||||
DrawcallDescription &operator=(const DrawcallDescription &) = default;
|
||||
|
||||
DOCUMENT("Resets the drawcall back to a default/empty state.");
|
||||
void Reset()
|
||||
@@ -1367,6 +1395,7 @@ struct APIProperties
|
||||
DOCUMENT("");
|
||||
APIProperties() = default;
|
||||
APIProperties(const APIProperties &) = default;
|
||||
APIProperties &operator=(const APIProperties &) = default;
|
||||
|
||||
DOCUMENT("The :class:`GraphicsAPI` of the actual log/capture.");
|
||||
GraphicsAPI pipelineType = GraphicsAPI::D3D11;
|
||||
@@ -1408,6 +1437,11 @@ DECLARE_REFLECTION_STRUCT(APIProperties);
|
||||
DOCUMENT("Gives information about the driver for this API.");
|
||||
struct DriverInformation
|
||||
{
|
||||
DOCUMENT("");
|
||||
DriverInformation() = default;
|
||||
DriverInformation(const DriverInformation &) = default;
|
||||
DriverInformation &operator=(const DriverInformation &) = default;
|
||||
|
||||
DOCUMENT("The :class:`GPUVendor` that provides this driver");
|
||||
GPUVendor vendor;
|
||||
|
||||
@@ -1431,6 +1465,7 @@ struct Uuid
|
||||
|
||||
Uuid() { words[0] = words[1] = words[2] = words[3] = 0; }
|
||||
Uuid(const Uuid &) = default;
|
||||
Uuid &operator=(const Uuid &) = default;
|
||||
|
||||
DOCUMENT("Compares two ``Uuid`` objects for less-than.");
|
||||
bool operator<(const Uuid &rhs) const
|
||||
@@ -1452,6 +1487,7 @@ struct CounterDescription
|
||||
DOCUMENT("");
|
||||
CounterDescription() = default;
|
||||
CounterDescription(const CounterDescription &) = default;
|
||||
CounterDescription &operator=(const CounterDescription &) = default;
|
||||
|
||||
DOCUMENT(R"(The :class:`GPUCounter` this counter represents.
|
||||
|
||||
@@ -1543,6 +1579,7 @@ struct CounterResult
|
||||
value.u64 = data;
|
||||
}
|
||||
#endif
|
||||
CounterResult &operator=(const CounterResult &) = default;
|
||||
|
||||
DOCUMENT("Compares two ``CounterResult`` objects for less-than.");
|
||||
bool operator<(const CounterResult &o) const
|
||||
@@ -1607,6 +1644,7 @@ struct Subresource
|
||||
{
|
||||
}
|
||||
Subresource(const Subresource &) = default;
|
||||
Subresource &operator=(const Subresource &) = default;
|
||||
|
||||
bool operator==(const Subresource &o) const
|
||||
{
|
||||
@@ -1647,6 +1685,7 @@ struct ModificationValue
|
||||
DOCUMENT("");
|
||||
ModificationValue() = default;
|
||||
ModificationValue(const ModificationValue &) = default;
|
||||
ModificationValue &operator=(const ModificationValue &) = default;
|
||||
|
||||
bool operator==(const ModificationValue &o) const
|
||||
{
|
||||
@@ -1680,6 +1719,7 @@ struct PixelModification
|
||||
DOCUMENT("");
|
||||
PixelModification() = default;
|
||||
PixelModification(const PixelModification &) = default;
|
||||
PixelModification &operator=(const PixelModification &) = default;
|
||||
|
||||
bool operator==(const PixelModification &o) const
|
||||
{
|
||||
@@ -1794,6 +1834,7 @@ struct Thumbnail
|
||||
DOCUMENT("");
|
||||
Thumbnail() = default;
|
||||
Thumbnail(const Thumbnail &) = default;
|
||||
Thumbnail &operator=(const Thumbnail &) = default;
|
||||
|
||||
DOCUMENT("The :class:`FileType` of the data in the thumbnail.");
|
||||
FileType type = FileType::Raw;
|
||||
|
||||
@@ -40,6 +40,7 @@ struct VertexAttribute
|
||||
DOCUMENT("");
|
||||
VertexAttribute() = default;
|
||||
VertexAttribute(const VertexAttribute &) = default;
|
||||
VertexAttribute &operator=(const VertexAttribute &) = default;
|
||||
|
||||
bool operator==(const VertexAttribute &o) const
|
||||
{
|
||||
@@ -83,6 +84,7 @@ struct VertexBuffer
|
||||
DOCUMENT("");
|
||||
VertexBuffer() = default;
|
||||
VertexBuffer(const VertexBuffer &) = default;
|
||||
VertexBuffer &operator=(const VertexBuffer &) = default;
|
||||
|
||||
bool operator==(const VertexBuffer &o) const
|
||||
{
|
||||
@@ -124,6 +126,7 @@ struct VertexInput
|
||||
DOCUMENT("");
|
||||
VertexInput() = default;
|
||||
VertexInput(const VertexInput &) = default;
|
||||
VertexInput &operator=(const VertexInput &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the vertex array object that's bound.");
|
||||
ResourceId vertexArrayObject;
|
||||
@@ -154,6 +157,7 @@ struct Shader
|
||||
DOCUMENT("");
|
||||
Shader() = default;
|
||||
Shader(const Shader &) = default;
|
||||
Shader &operator=(const Shader &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the shader object itself.");
|
||||
ResourceId shaderResourceId;
|
||||
@@ -181,6 +185,7 @@ struct FixedVertexProcessing
|
||||
DOCUMENT("");
|
||||
FixedVertexProcessing() = default;
|
||||
FixedVertexProcessing(const FixedVertexProcessing &) = default;
|
||||
FixedVertexProcessing &operator=(const FixedVertexProcessing &) = default;
|
||||
|
||||
DOCUMENT("A list of ``float`` giving the default inner level of tessellation.");
|
||||
float defaultInnerLevel[2] = {0.0f, 0.0f};
|
||||
@@ -209,6 +214,7 @@ struct Texture
|
||||
DOCUMENT("");
|
||||
Texture() = default;
|
||||
Texture(const Texture &) = default;
|
||||
Texture &operator=(const Texture &) = default;
|
||||
|
||||
bool operator==(const Texture &o) const
|
||||
{
|
||||
@@ -268,6 +274,7 @@ struct Sampler
|
||||
DOCUMENT("");
|
||||
Sampler() = default;
|
||||
Sampler(const Sampler &) = default;
|
||||
Sampler &operator=(const Sampler &) = default;
|
||||
|
||||
bool operator==(const Sampler &o) const
|
||||
{
|
||||
@@ -356,6 +363,7 @@ struct Buffer
|
||||
DOCUMENT("");
|
||||
Buffer() = default;
|
||||
Buffer(const Buffer &) = default;
|
||||
Buffer &operator=(const Buffer &) = default;
|
||||
|
||||
bool operator==(const Buffer &o) const
|
||||
{
|
||||
@@ -385,6 +393,7 @@ struct ImageLoadStore
|
||||
DOCUMENT("");
|
||||
ImageLoadStore() = default;
|
||||
ImageLoadStore(const ImageLoadStore &) = default;
|
||||
ImageLoadStore &operator=(const ImageLoadStore &) = default;
|
||||
|
||||
bool operator==(const ImageLoadStore &o) const
|
||||
{
|
||||
@@ -438,6 +447,7 @@ struct Feedback
|
||||
DOCUMENT("");
|
||||
Feedback() = default;
|
||||
Feedback(const Feedback &) = default;
|
||||
Feedback &operator=(const Feedback &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the transform feedback binding.");
|
||||
ResourceId feedbackResourceId;
|
||||
@@ -459,6 +469,7 @@ struct RasterizerState
|
||||
DOCUMENT("");
|
||||
RasterizerState() = default;
|
||||
RasterizerState(const RasterizerState &) = default;
|
||||
RasterizerState &operator=(const RasterizerState &) = default;
|
||||
|
||||
DOCUMENT("The polygon :class:`FillMode`.");
|
||||
FillMode fillMode = FillMode::Solid;
|
||||
@@ -524,6 +535,7 @@ struct Rasterizer
|
||||
DOCUMENT("");
|
||||
Rasterizer() = default;
|
||||
Rasterizer(const Rasterizer &) = default;
|
||||
Rasterizer &operator=(const Rasterizer &) = default;
|
||||
|
||||
DOCUMENT("A list of :class:`Viewport` with the bound viewports.");
|
||||
rdcarray<Viewport> viewports;
|
||||
@@ -541,6 +553,7 @@ struct DepthState
|
||||
DOCUMENT("");
|
||||
DepthState() = default;
|
||||
DepthState(const DepthState &) = default;
|
||||
DepthState &operator=(const DepthState &) = default;
|
||||
|
||||
DOCUMENT("``True`` if depth testing should be performed.");
|
||||
bool depthEnable = false;
|
||||
@@ -562,6 +575,7 @@ struct StencilState
|
||||
DOCUMENT("");
|
||||
StencilState() = default;
|
||||
StencilState(const StencilState &) = default;
|
||||
StencilState &operator=(const StencilState &) = default;
|
||||
|
||||
DOCUMENT("``True`` if stencil operations should be performed.");
|
||||
bool stencilEnable = false;
|
||||
@@ -578,6 +592,7 @@ struct Attachment
|
||||
DOCUMENT("");
|
||||
Attachment() = default;
|
||||
Attachment(const Attachment &) = default;
|
||||
Attachment &operator=(const Attachment &) = default;
|
||||
|
||||
bool operator==(const Attachment &o) const
|
||||
{
|
||||
@@ -620,6 +635,7 @@ struct FBO
|
||||
DOCUMENT("");
|
||||
FBO() = default;
|
||||
FBO(const FBO &) = default;
|
||||
FBO &operator=(const FBO &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the framebuffer.");
|
||||
ResourceId resourceId;
|
||||
@@ -642,6 +658,7 @@ struct BlendState
|
||||
DOCUMENT("");
|
||||
BlendState() = default;
|
||||
BlendState(const BlendState &) = default;
|
||||
BlendState &operator=(const BlendState &) = default;
|
||||
|
||||
DOCUMENT("A list of :class:`ColorBlend` describing the blend operations for each target.");
|
||||
rdcarray<ColorBlend> blends;
|
||||
@@ -656,6 +673,7 @@ struct FrameBuffer
|
||||
DOCUMENT("");
|
||||
FrameBuffer() = default;
|
||||
FrameBuffer(const FrameBuffer &) = default;
|
||||
FrameBuffer &operator=(const FrameBuffer &) = default;
|
||||
|
||||
DOCUMENT(
|
||||
"``True`` if sRGB correction should be applied when writing to an sRGB-formatted texture.");
|
||||
@@ -678,6 +696,7 @@ struct Hints
|
||||
DOCUMENT("");
|
||||
Hints() = default;
|
||||
Hints(const Hints &) = default;
|
||||
Hints &operator=(const Hints &) = default;
|
||||
|
||||
DOCUMENT("A :class:`QualityHint` with the derivatives hint.");
|
||||
QualityHint derivatives = QualityHint::DontCare;
|
||||
|
||||
@@ -141,12 +141,12 @@ private:
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
static void deallocate(const char *p)
|
||||
static void deallocate(char *p)
|
||||
{
|
||||
#ifdef RENDERDOC_EXPORTS
|
||||
free((void *)p);
|
||||
#else
|
||||
RENDERDOC_FreeArrayMem((const void *)p);
|
||||
RENDERDOC_FreeArrayMem((void *)p);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -107,8 +107,8 @@
|
||||
|
||||
// needs to be declared up here for reference in basic_types
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_FreeArrayMem(const void *mem);
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_FreeArrayMem)(const void *mem);
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_FreeArrayMem(void *mem);
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_FreeArrayMem)(void *mem);
|
||||
|
||||
extern "C" RENDERDOC_API void *RENDERDOC_CC RENDERDOC_AllocArrayMem(uint64_t sz);
|
||||
typedef void *(RENDERDOC_CC *pRENDERDOC_AllocArrayMem)(uint64_t sz);
|
||||
@@ -601,6 +601,7 @@ struct GlobalEnvironment
|
||||
DOCUMENT("");
|
||||
GlobalEnvironment() = default;
|
||||
GlobalEnvironment(const GlobalEnvironment &) = default;
|
||||
GlobalEnvironment &operator=(const GlobalEnvironment &) = default;
|
||||
|
||||
DOCUMENT("The handle to the X display to use internally. If left ``NULL``, one will be opened.");
|
||||
Display *xlibDisplay = NULL;
|
||||
@@ -622,6 +623,7 @@ struct ExecuteResult
|
||||
DOCUMENT("");
|
||||
ExecuteResult() = default;
|
||||
ExecuteResult(const ExecuteResult &) = default;
|
||||
ExecuteResult &operator=(const ExecuteResult &) = default;
|
||||
|
||||
DOCUMENT(
|
||||
"The :class:`ReplayStatus` resulting from the operation, indicating success or failure.");
|
||||
|
||||
@@ -35,6 +35,7 @@ struct FloatVecVal
|
||||
DOCUMENT("");
|
||||
FloatVecVal() = default;
|
||||
FloatVecVal(const FloatVecVal &) = default;
|
||||
FloatVecVal &operator=(const FloatVecVal &) = default;
|
||||
|
||||
DOCUMENT("The x component.");
|
||||
float x;
|
||||
@@ -52,6 +53,7 @@ struct DoubleVecVal
|
||||
DOCUMENT("");
|
||||
DoubleVecVal() = default;
|
||||
DoubleVecVal(const DoubleVecVal &) = default;
|
||||
DoubleVecVal &operator=(const DoubleVecVal &) = default;
|
||||
|
||||
DOCUMENT("The x component.");
|
||||
double x;
|
||||
@@ -69,6 +71,7 @@ struct IntVecVal
|
||||
DOCUMENT("");
|
||||
IntVecVal() = default;
|
||||
IntVecVal(const IntVecVal &) = default;
|
||||
IntVecVal &operator=(const IntVecVal &) = default;
|
||||
|
||||
DOCUMENT("The x component.");
|
||||
int32_t x;
|
||||
@@ -86,6 +89,7 @@ struct UIntVecVal
|
||||
DOCUMENT("");
|
||||
UIntVecVal() = default;
|
||||
UIntVecVal(const UIntVecVal &) = default;
|
||||
UIntVecVal &operator=(const UIntVecVal &) = default;
|
||||
|
||||
DOCUMENT("The x component.");
|
||||
uint32_t x;
|
||||
@@ -103,6 +107,7 @@ struct PointerVal
|
||||
DOCUMENT("");
|
||||
PointerVal() = default;
|
||||
PointerVal(const PointerVal &) = default;
|
||||
PointerVal &operator=(const PointerVal &) = default;
|
||||
|
||||
DOCUMENT("The actual pointer value itself.");
|
||||
uint64_t pointer;
|
||||
@@ -166,6 +171,7 @@ struct ShaderVariable
|
||||
value.uv[i] = 0;
|
||||
}
|
||||
ShaderVariable(const ShaderVariable &) = default;
|
||||
ShaderVariable &operator=(const ShaderVariable &) = default;
|
||||
ShaderVariable(const char *n, float x, float y, float z, float w)
|
||||
{
|
||||
name = n;
|
||||
@@ -321,6 +327,7 @@ struct RegisterRange
|
||||
DOCUMENT("");
|
||||
RegisterRange() = default;
|
||||
RegisterRange(const RegisterRange &) = default;
|
||||
RegisterRange &operator=(const RegisterRange &) = default;
|
||||
|
||||
bool operator==(const RegisterRange &o) const
|
||||
{
|
||||
@@ -364,6 +371,7 @@ struct LocalVariableMapping
|
||||
DOCUMENT("");
|
||||
LocalVariableMapping() = default;
|
||||
LocalVariableMapping(const LocalVariableMapping &) = default;
|
||||
LocalVariableMapping &operator=(const LocalVariableMapping &) = default;
|
||||
|
||||
bool operator==(const LocalVariableMapping &o) const
|
||||
{
|
||||
@@ -423,6 +431,7 @@ struct LineColumnInfo
|
||||
DOCUMENT("");
|
||||
LineColumnInfo() = default;
|
||||
LineColumnInfo(const LineColumnInfo &) = default;
|
||||
LineColumnInfo &operator=(const LineColumnInfo &) = default;
|
||||
|
||||
bool operator==(const LineColumnInfo &o) const
|
||||
{
|
||||
@@ -483,6 +492,7 @@ struct ShaderDebugState
|
||||
DOCUMENT("");
|
||||
ShaderDebugState() = default;
|
||||
ShaderDebugState(const ShaderDebugState &) = default;
|
||||
ShaderDebugState &operator=(const ShaderDebugState &) = default;
|
||||
|
||||
bool operator==(const ShaderDebugState &o) const
|
||||
{
|
||||
@@ -541,6 +551,7 @@ struct ShaderDebugTrace
|
||||
DOCUMENT("");
|
||||
ShaderDebugTrace() = default;
|
||||
ShaderDebugTrace(const ShaderDebugTrace &) = default;
|
||||
ShaderDebugTrace &operator=(const ShaderDebugTrace &) = default;
|
||||
|
||||
DOCUMENT("The input variables for this shader as a list of :class:`ShaderValue`.");
|
||||
rdcarray<ShaderVariable> inputs;
|
||||
@@ -579,6 +590,7 @@ struct SigParameter
|
||||
DOCUMENT("");
|
||||
SigParameter() = default;
|
||||
SigParameter(const SigParameter &) = default;
|
||||
SigParameter &operator=(const SigParameter &) = default;
|
||||
|
||||
bool operator==(const SigParameter &o) const
|
||||
{
|
||||
@@ -675,6 +687,7 @@ struct ShaderVariableDescriptor
|
||||
DOCUMENT("");
|
||||
ShaderVariableDescriptor() = default;
|
||||
ShaderVariableDescriptor(const ShaderVariableDescriptor &) = default;
|
||||
ShaderVariableDescriptor &operator=(const ShaderVariableDescriptor &) = default;
|
||||
|
||||
bool operator==(const ShaderVariableDescriptor &o) const
|
||||
{
|
||||
@@ -737,6 +750,7 @@ struct ShaderVariableType
|
||||
DOCUMENT("");
|
||||
ShaderVariableType() = default;
|
||||
ShaderVariableType(const ShaderVariableType &) = default;
|
||||
ShaderVariableType &operator=(const ShaderVariableType &) = default;
|
||||
|
||||
bool operator==(const ShaderVariableType &o) const
|
||||
{
|
||||
@@ -765,6 +779,7 @@ struct ShaderConstant
|
||||
DOCUMENT("");
|
||||
ShaderConstant() = default;
|
||||
ShaderConstant(const ShaderConstant &) = default;
|
||||
ShaderConstant &operator=(const ShaderConstant &) = default;
|
||||
|
||||
bool operator==(const ShaderConstant &o) const
|
||||
{
|
||||
@@ -805,6 +820,7 @@ struct ConstantBlock
|
||||
DOCUMENT("");
|
||||
ConstantBlock() = default;
|
||||
ConstantBlock(const ConstantBlock &) = default;
|
||||
ConstantBlock &operator=(const ConstantBlock &) = default;
|
||||
|
||||
bool operator==(const ConstantBlock &o) const
|
||||
{
|
||||
@@ -855,6 +871,7 @@ struct ShaderSampler
|
||||
DOCUMENT("");
|
||||
ShaderSampler() = default;
|
||||
ShaderSampler(const ShaderSampler &) = default;
|
||||
ShaderSampler &operator=(const ShaderSampler &) = default;
|
||||
|
||||
bool operator==(const ShaderSampler &o) const
|
||||
{
|
||||
@@ -890,6 +907,7 @@ struct ShaderResource
|
||||
DOCUMENT("");
|
||||
ShaderResource() = default;
|
||||
ShaderResource(const ShaderResource &) = default;
|
||||
ShaderResource &operator=(const ShaderResource &) = default;
|
||||
|
||||
bool operator==(const ShaderResource &o) const
|
||||
{
|
||||
@@ -942,6 +960,7 @@ struct ShaderEntryPoint
|
||||
{
|
||||
ShaderEntryPoint() = default;
|
||||
ShaderEntryPoint(const ShaderEntryPoint &) = default;
|
||||
ShaderEntryPoint &operator=(const ShaderEntryPoint &) = default;
|
||||
ShaderEntryPoint(const rdcstr &n, ShaderStage s) : name(n), stage(s) {}
|
||||
DOCUMENT("");
|
||||
bool operator==(const ShaderEntryPoint &o) const { return name == o.name && stage == o.stage; }
|
||||
@@ -968,6 +987,7 @@ struct ShaderCompileFlag
|
||||
DOCUMENT("");
|
||||
ShaderCompileFlag() = default;
|
||||
ShaderCompileFlag(const ShaderCompileFlag &) = default;
|
||||
ShaderCompileFlag &operator=(const ShaderCompileFlag &) = default;
|
||||
|
||||
bool operator==(const ShaderCompileFlag &o) const { return name == o.name && value == o.value; }
|
||||
bool operator<(const ShaderCompileFlag &o) const
|
||||
@@ -993,6 +1013,7 @@ struct ShaderCompileFlags
|
||||
DOCUMENT("");
|
||||
ShaderCompileFlags() = default;
|
||||
ShaderCompileFlags(const ShaderCompileFlags &) = default;
|
||||
ShaderCompileFlags &operator=(const ShaderCompileFlags &) = default;
|
||||
|
||||
DOCUMENT(R"(A list of :class:`ShaderCompileFlag`.
|
||||
|
||||
@@ -1009,6 +1030,7 @@ struct ShaderSourceFile
|
||||
DOCUMENT("");
|
||||
ShaderSourceFile() = default;
|
||||
ShaderSourceFile(const ShaderSourceFile &) = default;
|
||||
ShaderSourceFile &operator=(const ShaderSourceFile &) = default;
|
||||
|
||||
bool operator==(const ShaderSourceFile &o) const
|
||||
{
|
||||
@@ -1040,6 +1062,7 @@ struct ShaderDebugInfo
|
||||
{
|
||||
ShaderDebugInfo() {}
|
||||
ShaderDebugInfo(const ShaderDebugInfo &) = default;
|
||||
ShaderDebugInfo &operator=(const ShaderDebugInfo &) = default;
|
||||
|
||||
DOCUMENT("A :class:`ShaderCompileFlags` containing the flags used to compile this shader.");
|
||||
ShaderCompileFlags compileFlags;
|
||||
@@ -1067,6 +1090,7 @@ struct ShaderReflection
|
||||
DOCUMENT("");
|
||||
ShaderReflection() = default;
|
||||
ShaderReflection(const ShaderReflection &) = default;
|
||||
ShaderReflection &operator=(const ShaderReflection &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of this shader.");
|
||||
ResourceId resourceId;
|
||||
@@ -1134,6 +1158,7 @@ struct Bindpoint
|
||||
arraySize = 1;
|
||||
}
|
||||
Bindpoint(const Bindpoint &) = default;
|
||||
Bindpoint &operator=(const Bindpoint &) = default;
|
||||
|
||||
Bindpoint(int32_t s, int32_t b)
|
||||
{
|
||||
@@ -1206,6 +1231,7 @@ struct ShaderBindpointMapping
|
||||
DOCUMENT("");
|
||||
ShaderBindpointMapping() = default;
|
||||
ShaderBindpointMapping(const ShaderBindpointMapping &) = default;
|
||||
ShaderBindpointMapping &operator=(const ShaderBindpointMapping &) = default;
|
||||
|
||||
DOCUMENT(R"(This maps input attributes as a simple swizzle on the
|
||||
:data:`ShaderReflection.inputSignature` indices for APIs where this mapping is mutable at runtime.
|
||||
|
||||
@@ -228,6 +228,7 @@ struct SDChunkMetaData
|
||||
DOCUMENT("");
|
||||
SDChunkMetaData() = default;
|
||||
SDChunkMetaData(const SDChunkMetaData &) = default;
|
||||
SDChunkMetaData &operator=(const SDChunkMetaData &) = default;
|
||||
|
||||
DOCUMENT("The internal chunk ID - unique given a particular driver in use.");
|
||||
uint32_t chunkID = 0;
|
||||
@@ -664,7 +665,7 @@ inline SDObject *makeSDInt32(const char *name, int32_t val)
|
||||
SDObject *ret = new SDObject(name, "int32_t"_lit);
|
||||
ret->type.basetype = SDBasic::SignedInteger;
|
||||
ret->type.byteSize = 4;
|
||||
ret->data.basic.u = val;
|
||||
ret->data.basic.i = val;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ struct BindingElement
|
||||
DOCUMENT("");
|
||||
BindingElement() = default;
|
||||
BindingElement(const BindingElement &) = default;
|
||||
BindingElement &operator=(const BindingElement &) = default;
|
||||
|
||||
bool operator==(const BindingElement &o) const
|
||||
{
|
||||
@@ -217,6 +218,7 @@ struct DescriptorBinding
|
||||
DOCUMENT("");
|
||||
DescriptorBinding() = default;
|
||||
DescriptorBinding(const DescriptorBinding &) = default;
|
||||
DescriptorBinding &operator=(const DescriptorBinding &) = default;
|
||||
|
||||
bool operator==(const DescriptorBinding &o) const
|
||||
{
|
||||
@@ -264,6 +266,7 @@ struct DescriptorSet
|
||||
DOCUMENT("");
|
||||
DescriptorSet() = default;
|
||||
DescriptorSet(const DescriptorSet &) = default;
|
||||
DescriptorSet &operator=(const DescriptorSet &) = default;
|
||||
|
||||
bool operator==(const DescriptorSet &o) const
|
||||
{
|
||||
@@ -302,6 +305,7 @@ struct Pipeline
|
||||
DOCUMENT("");
|
||||
Pipeline() = default;
|
||||
Pipeline(const Pipeline &) = default;
|
||||
Pipeline &operator=(const Pipeline &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the pipeline object.");
|
||||
ResourceId pipelineResourceId;
|
||||
@@ -320,6 +324,7 @@ struct IndexBuffer
|
||||
DOCUMENT("");
|
||||
IndexBuffer() = default;
|
||||
IndexBuffer(const IndexBuffer &) = default;
|
||||
IndexBuffer &operator=(const IndexBuffer &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the index buffer.");
|
||||
ResourceId resourceId;
|
||||
@@ -334,6 +339,7 @@ struct InputAssembly
|
||||
DOCUMENT("");
|
||||
InputAssembly() = default;
|
||||
InputAssembly(const InputAssembly &) = default;
|
||||
InputAssembly &operator=(const InputAssembly &) = default;
|
||||
|
||||
DOCUMENT("``True`` if primitive restart is enabled for strip primitives.");
|
||||
bool primitiveRestartEnable = false;
|
||||
@@ -348,6 +354,7 @@ struct VertexAttribute
|
||||
DOCUMENT("");
|
||||
VertexAttribute() = default;
|
||||
VertexAttribute(const VertexAttribute &) = default;
|
||||
VertexAttribute &operator=(const VertexAttribute &) = default;
|
||||
|
||||
bool operator==(const VertexAttribute &o) const
|
||||
{
|
||||
@@ -384,6 +391,7 @@ struct VertexBinding
|
||||
DOCUMENT("");
|
||||
VertexBinding() = default;
|
||||
VertexBinding(const VertexBinding &) = default;
|
||||
VertexBinding &operator=(const VertexBinding &) = default;
|
||||
|
||||
bool operator==(const VertexBinding &o) const
|
||||
{
|
||||
@@ -424,6 +432,7 @@ struct VertexBuffer
|
||||
DOCUMENT("");
|
||||
VertexBuffer() = default;
|
||||
VertexBuffer(const VertexBuffer &) = default;
|
||||
VertexBuffer &operator=(const VertexBuffer &) = default;
|
||||
|
||||
bool operator==(const VertexBuffer &o) const
|
||||
{
|
||||
@@ -449,6 +458,7 @@ struct VertexInput
|
||||
DOCUMENT("");
|
||||
VertexInput() = default;
|
||||
VertexInput(const VertexInput &) = default;
|
||||
VertexInput &operator=(const VertexInput &) = default;
|
||||
|
||||
DOCUMENT("A list of :class:`VKVertexAttribute` with the vertex attributes.");
|
||||
rdcarray<VertexAttribute> attributes;
|
||||
@@ -464,6 +474,7 @@ struct SpecializationConstant
|
||||
DOCUMENT("");
|
||||
SpecializationConstant() = default;
|
||||
SpecializationConstant(const SpecializationConstant &) = default;
|
||||
SpecializationConstant &operator=(const SpecializationConstant &) = default;
|
||||
|
||||
bool operator==(const SpecializationConstant &o) const
|
||||
{
|
||||
@@ -489,6 +500,7 @@ struct Shader
|
||||
DOCUMENT("");
|
||||
Shader() = default;
|
||||
Shader(const Shader &) = default;
|
||||
Shader &operator=(const Shader &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the shader module object.");
|
||||
ResourceId resourceId;
|
||||
@@ -516,6 +528,7 @@ struct Tessellation
|
||||
DOCUMENT("");
|
||||
Tessellation() = default;
|
||||
Tessellation(const Tessellation &) = default;
|
||||
Tessellation &operator=(const Tessellation &) = default;
|
||||
|
||||
DOCUMENT("The number of control points in each input patch.");
|
||||
uint32_t numControlPoints = 0;
|
||||
@@ -530,6 +543,7 @@ struct XFBBuffer
|
||||
DOCUMENT("");
|
||||
XFBBuffer() = default;
|
||||
XFBBuffer(const XFBBuffer &) = default;
|
||||
XFBBuffer &operator=(const XFBBuffer &) = default;
|
||||
|
||||
bool operator==(const XFBBuffer &o) const
|
||||
{
|
||||
@@ -580,6 +594,7 @@ struct TransformFeedback
|
||||
DOCUMENT("");
|
||||
TransformFeedback() = default;
|
||||
TransformFeedback(const TransformFeedback &) = default;
|
||||
TransformFeedback &operator=(const TransformFeedback &) = default;
|
||||
|
||||
DOCUMENT("The bound transform feedback buffers.");
|
||||
rdcarray<XFBBuffer> buffers;
|
||||
@@ -591,6 +606,7 @@ struct RenderArea
|
||||
DOCUMENT("");
|
||||
RenderArea() = default;
|
||||
RenderArea(const RenderArea &) = default;
|
||||
RenderArea &operator=(const RenderArea &) = default;
|
||||
bool operator==(const RenderArea &o) const
|
||||
{
|
||||
return x == o.x && y == o.y && width == o.width && height == o.height;
|
||||
@@ -624,6 +640,7 @@ struct ViewportScissor
|
||||
DOCUMENT("");
|
||||
ViewportScissor() = default;
|
||||
ViewportScissor(const ViewportScissor &) = default;
|
||||
ViewportScissor &operator=(const ViewportScissor &) = default;
|
||||
|
||||
bool operator==(const ViewportScissor &o) const { return vp == o.vp && scissor == o.scissor; }
|
||||
bool operator<(const ViewportScissor &o) const
|
||||
@@ -646,6 +663,7 @@ struct ViewState
|
||||
DOCUMENT("");
|
||||
ViewState() = default;
|
||||
ViewState(const ViewState &) = default;
|
||||
ViewState &operator=(const ViewState &) = default;
|
||||
|
||||
DOCUMENT("A list of :class:`VKViewportScissor`.");
|
||||
rdcarray<ViewportScissor> viewportScissors;
|
||||
@@ -672,6 +690,7 @@ struct Rasterizer
|
||||
DOCUMENT("");
|
||||
Rasterizer() = default;
|
||||
Rasterizer(const Rasterizer &) = default;
|
||||
Rasterizer &operator=(const Rasterizer &) = default;
|
||||
|
||||
DOCUMENT(R"(``True`` if pixels outside of the near and far depth planes should be clamped and
|
||||
to ``0.0`` to ``1.0``.
|
||||
@@ -730,6 +749,7 @@ struct SampleLocations
|
||||
DOCUMENT("");
|
||||
SampleLocations() = default;
|
||||
SampleLocations(const SampleLocations &) = default;
|
||||
SampleLocations &operator=(const SampleLocations &) = default;
|
||||
|
||||
DOCUMENT("The width in pixels of the region configured.");
|
||||
uint32_t gridWidth = 1;
|
||||
@@ -749,6 +769,7 @@ struct MultiSample
|
||||
DOCUMENT("");
|
||||
MultiSample() = default;
|
||||
MultiSample(const MultiSample &) = default;
|
||||
MultiSample &operator=(const MultiSample &) = default;
|
||||
|
||||
DOCUMENT("How many samples to use when rasterizing.");
|
||||
uint32_t rasterSamples = 0;
|
||||
@@ -768,6 +789,7 @@ struct ColorBlendState
|
||||
DOCUMENT("");
|
||||
ColorBlendState() = default;
|
||||
ColorBlendState(const ColorBlendState &) = default;
|
||||
ColorBlendState &operator=(const ColorBlendState &) = default;
|
||||
|
||||
DOCUMENT("``True`` if alpha-to-coverage should be used when blending to an MSAA target.");
|
||||
bool alphaToCoverageEnable = false;
|
||||
@@ -787,6 +809,7 @@ struct DepthStencil
|
||||
DOCUMENT("");
|
||||
DepthStencil() = default;
|
||||
DepthStencil(const DepthStencil &) = default;
|
||||
DepthStencil &operator=(const DepthStencil &) = default;
|
||||
|
||||
DOCUMENT("``True`` if depth testing should be performed.");
|
||||
bool depthTestEnable = false;
|
||||
@@ -817,6 +840,7 @@ struct RenderPass
|
||||
DOCUMENT("");
|
||||
RenderPass() = default;
|
||||
RenderPass(const RenderPass &) = default;
|
||||
RenderPass &operator=(const RenderPass &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the render pass.");
|
||||
ResourceId resourceId;
|
||||
@@ -858,6 +882,7 @@ struct Attachment
|
||||
DOCUMENT("");
|
||||
Attachment() = default;
|
||||
Attachment(const Attachment &) = default;
|
||||
Attachment &operator=(const Attachment &) = default;
|
||||
|
||||
bool operator==(const Attachment &o) const
|
||||
{
|
||||
@@ -918,6 +943,7 @@ struct Framebuffer
|
||||
DOCUMENT("");
|
||||
Framebuffer() = default;
|
||||
Framebuffer(const Framebuffer &) = default;
|
||||
Framebuffer &operator=(const Framebuffer &) = default;
|
||||
|
||||
DOCUMENT("The :class:`ResourceId` of the framebuffer object.");
|
||||
ResourceId resourceId;
|
||||
@@ -939,6 +965,7 @@ struct CurrentPass
|
||||
DOCUMENT("");
|
||||
CurrentPass() = default;
|
||||
CurrentPass(const CurrentPass &) = default;
|
||||
CurrentPass &operator=(const CurrentPass &) = default;
|
||||
|
||||
DOCUMENT("The :class:`VKRenderPass` that is currently active.");
|
||||
RenderPass renderpass;
|
||||
@@ -954,6 +981,7 @@ struct ImageLayout
|
||||
DOCUMENT("");
|
||||
ImageLayout() = default;
|
||||
ImageLayout(const ImageLayout &) = default;
|
||||
ImageLayout &operator=(const ImageLayout &) = default;
|
||||
|
||||
bool operator==(const ImageLayout &o) const
|
||||
{
|
||||
@@ -992,6 +1020,7 @@ struct ImageData
|
||||
DOCUMENT("");
|
||||
ImageData() = default;
|
||||
ImageData(const ImageData &) = default;
|
||||
ImageData &operator=(const ImageData &) = default;
|
||||
|
||||
bool operator==(const ImageData &o) const { return resourceId == o.resourceId; }
|
||||
bool operator<(const ImageData &o) const
|
||||
@@ -1013,6 +1042,7 @@ struct ConditionalRendering
|
||||
DOCUMENT("");
|
||||
ConditionalRendering() = default;
|
||||
ConditionalRendering(const ConditionalRendering &) = default;
|
||||
ConditionalRendering &operator=(const ConditionalRendering &) = default;
|
||||
|
||||
DOCUMENT(
|
||||
"The :class:`ResourceId` of the buffer containing the predicate for conditional rendering.");
|
||||
|
||||
@@ -989,9 +989,7 @@ dds_data load_dds_from_file(FILE *f)
|
||||
case MAKE_FOURCC('G', 'R', 'G', 'B'):
|
||||
ret.format = DXGIFormat2ResourceFormat(DXGI_FORMAT_G8R8_G8B8_UNORM);
|
||||
break;
|
||||
case MAKE_FOURCC('U', 'Y', 'V', 'Y'):
|
||||
bgrSwap = true;
|
||||
// deliberate fall-through
|
||||
case MAKE_FOURCC('U', 'Y', 'V', 'Y'): bgrSwap = true; DELIBERATE_FALLTHROUGH();
|
||||
case MAKE_FOURCC('Y', 'U', 'Y', '2'):
|
||||
ret.format = DXGIFormat2ResourceFormat(DXGI_FORMAT_YUY2);
|
||||
break;
|
||||
@@ -1047,7 +1045,7 @@ dds_data load_dds_from_file(FILE *f)
|
||||
bytesPerPixel = 2;
|
||||
break;
|
||||
}
|
||||
// deliberate fall-through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case ResourceFormatType::YUV10:
|
||||
case ResourceFormatType::YUV12:
|
||||
case ResourceFormatType::YUV16:
|
||||
|
||||
@@ -982,7 +982,7 @@ void ResourceManager<Configuration>::Prepare_ResourceIfActivePostponed(ResourceI
|
||||
if(!IsActiveCapturing(m_State) || !IsResourcePostponed(id))
|
||||
return;
|
||||
|
||||
RDCDEBUG("Preparing resource %llu after it has been postponed.", id);
|
||||
RDCDEBUG("Preparing resource %s after it has been postponed.", ToStr(id).c_str());
|
||||
Prepare_ResourceInitialStateIfNeeded(id);
|
||||
}
|
||||
|
||||
@@ -1219,7 +1219,7 @@ void ResourceManager<Configuration>::PrepareInitialContents()
|
||||
prepared++;
|
||||
|
||||
#if ENABLED(VERBOSE_DIRTY_RESOURCES)
|
||||
RDCDEBUG("Prepare Resource %llu", id);
|
||||
RDCDEBUG("Prepare Resource %s", ToStr(id).c_str());
|
||||
#endif
|
||||
|
||||
Prepare_InitialState(res);
|
||||
@@ -1252,7 +1252,7 @@ void ResourceManager<Configuration>::InsertInitialContentsChunks(WriteSerialiser
|
||||
!RenderDoc::Inst().GetCaptureOptions().refAllResources)
|
||||
{
|
||||
#if ENABLED(VERBOSE_DIRTY_RESOURCES)
|
||||
RDCDEBUG("Dirty tesource %llu is GPU dirty but not referenced - skipping", id);
|
||||
RDCDEBUG("Dirty tesource %s is GPU dirty but not referenced - skipping", ToStr(id).c_str());
|
||||
#endif
|
||||
skipped++;
|
||||
continue;
|
||||
@@ -1263,7 +1263,7 @@ void ResourceManager<Configuration>::InsertInitialContentsChunks(WriteSerialiser
|
||||
if(record == NULL)
|
||||
{
|
||||
#if ENABLED(VERBOSE_DIRTY_RESOURCES)
|
||||
RDCDEBUG("Resource %llu has no resource record - skipping", id);
|
||||
RDCDEBUG("Resource %s has no resource record - skipping", ToStr(id).c_str());
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
@@ -1271,13 +1271,13 @@ void ResourceManager<Configuration>::InsertInitialContentsChunks(WriteSerialiser
|
||||
if(record->InternalResource)
|
||||
{
|
||||
#if ENABLED(VERBOSE_DIRTY_RESOURCES)
|
||||
RDCDEBUG("Resource %llu is special - skipping", id);
|
||||
RDCDEBUG("Resource %s is special - skipping", ToStr(id).c_str());
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
#if ENABLED(VERBOSE_DIRTY_RESOURCES)
|
||||
RDCDEBUG("Serialising dirty Resource %llu", id);
|
||||
RDCDEBUG("Serialising dirty Resource %s", ToStr(id).c_str());
|
||||
#endif
|
||||
|
||||
// Load postponed resource if needed.
|
||||
@@ -1524,7 +1524,7 @@ void ResourceManager<Configuration>::AddLiveResource(ResourceId origid, WrappedR
|
||||
|
||||
if(m_LiveResourceMap.find(origid) != m_LiveResourceMap.end())
|
||||
{
|
||||
RDCERR("Releasing live resource for duplicate creation: %llu", origid);
|
||||
RDCERR("Releasing live resource for duplicate creation: %s", ToStr(origid).c_str());
|
||||
ResourceTypeRelease(m_LiveResourceMap[origid]);
|
||||
m_LiveResourceMap.erase(origid);
|
||||
}
|
||||
|
||||
@@ -499,9 +499,7 @@ void D3D12Descriptor::GetRefIDs(ResourceId &id, ResourceId &id2, FrameRefType &r
|
||||
id = WrappedID3D12Resource1::GetResIDFromAddr(data.nonsamp.cbv.BufferLocation);
|
||||
break;
|
||||
case D3D12DescriptorType::SRV: id = data.nonsamp.resource; break;
|
||||
case D3D12DescriptorType::UAV:
|
||||
id2 = data.nonsamp.counterResource;
|
||||
// deliberate fall-through
|
||||
case D3D12DescriptorType::UAV: id2 = data.nonsamp.counterResource; DELIBERATE_FALLTHROUGH();
|
||||
case D3D12DescriptorType::RTV:
|
||||
case D3D12DescriptorType::DSV:
|
||||
ref = eFrameRef_PartialWrite;
|
||||
|
||||
@@ -243,8 +243,8 @@ UINT GetByteSize(int Width, int Height, int Depth, DXGI_FORMAT Format, int mip)
|
||||
ret = ret + ret / 2;
|
||||
break;
|
||||
case DXGI_FORMAT_P010:
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
// deliberate fallthrough
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case DXGI_FORMAT_P016:
|
||||
// 4:2:0 planar but 16-bit, so pixelCount*2 + (pixelCount*2) / 2
|
||||
ret *= 2;
|
||||
@@ -260,8 +260,8 @@ UINT GetByteSize(int Width, int Height, int Depth, DXGI_FORMAT Format, int mip)
|
||||
ret *= 2;
|
||||
break;
|
||||
case DXGI_FORMAT_Y210:
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
// deliberate fallthrough
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case DXGI_FORMAT_Y216:
|
||||
// 4:2:2 packed 16-bit
|
||||
ret *= 4;
|
||||
@@ -272,9 +272,9 @@ UINT GetByteSize(int Width, int Height, int Depth, DXGI_FORMAT Format, int mip)
|
||||
ret = ret + ret / 2;
|
||||
break;
|
||||
case DXGI_FORMAT_AI44:
|
||||
// special format, 1 byte per pixel, palletised values in 4 most significant bits, alpha in 4
|
||||
// least significant bits.
|
||||
// deliberate fallthrough
|
||||
// special format, 1 byte per pixel, palletised values in 4 most significant bits, alpha in 4
|
||||
// least significant bits.
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case DXGI_FORMAT_IA44:
|
||||
// same as above but swapped MSB/LSB
|
||||
break;
|
||||
@@ -339,8 +339,8 @@ UINT GetRowPitch(int Width, DXGI_FORMAT Format, int mip)
|
||||
// pixel - 1 byte luma each, and half subsampled chroma U/V in 1 byte total per pixel.
|
||||
break;
|
||||
case DXGI_FORMAT_P010:
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
// deliberate fallthrough
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case DXGI_FORMAT_P016:
|
||||
// Similar to NV12 but 16-bit elements
|
||||
ret *= 2;
|
||||
@@ -354,8 +354,8 @@ UINT GetRowPitch(int Width, DXGI_FORMAT Format, int mip)
|
||||
ret *= 2;
|
||||
break;
|
||||
case DXGI_FORMAT_Y210:
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
// deliberate fallthrough
|
||||
// 10-bit formats are stored identically to 16-bit formats
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case DXGI_FORMAT_Y216:
|
||||
// 4:2:2 packed 16-bit
|
||||
ret *= 4;
|
||||
@@ -366,9 +366,9 @@ UINT GetRowPitch(int Width, DXGI_FORMAT Format, int mip)
|
||||
ret = ret;
|
||||
break;
|
||||
case DXGI_FORMAT_AI44:
|
||||
// special format, 1 byte per pixel, palletised values in 4 most significant bits, alpha in 4
|
||||
// least significant bits.
|
||||
// deliberate fallthrough
|
||||
// special format, 1 byte per pixel, palletised values in 4 most significant bits, alpha in 4
|
||||
// least significant bits.
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case DXGI_FORMAT_IA44:
|
||||
// same as above but swapped MSB/LSB
|
||||
break;
|
||||
|
||||
@@ -61,17 +61,6 @@ bool CheckReplayContext()
|
||||
REQUIRE_FUNC(glGetStringi);
|
||||
REQUIRE_FUNC(glGetIntegerv);
|
||||
|
||||
// we can't do without these extensions, but they should be present on any reasonable driver
|
||||
// as they should have minimal or no hardware requirement. They were present on mesa 10.6
|
||||
// for all drivers which dates to mid 2015.
|
||||
#undef EXT_TO_CHECK
|
||||
#define EXT_TO_CHECK(ver, glesver, ext) ext,
|
||||
enum
|
||||
{
|
||||
EXTENSION_CHECKS() ext_count,
|
||||
};
|
||||
bool exts[ext_count] = {};
|
||||
|
||||
RDCLOG("Running GL replay on: %s / %s / %s", GL.glGetString(eGL_VENDOR),
|
||||
GL.glGetString(eGL_RENDERER), GL.glGetString(eGL_VERSION));
|
||||
|
||||
@@ -93,14 +82,6 @@ bool CheckReplayContext()
|
||||
|
||||
// skip the "GL_"
|
||||
ext += 3;
|
||||
|
||||
#undef EXT_TO_CHECK
|
||||
#define EXT_TO_CHECK(ver, glesver, extname) \
|
||||
if((!IsGLES && GLCoreVersion >= ver) || (IsGLES && GLCoreVersion >= glesver) || \
|
||||
!strcmp(ext, STRINGIZE(extname))) \
|
||||
exts[extname] = true;
|
||||
|
||||
EXTENSION_CHECKS()
|
||||
}
|
||||
|
||||
if(!extensionString.empty())
|
||||
@@ -1584,13 +1565,13 @@ BufferCategory MakeBufferCategory(GLenum bufferTarget)
|
||||
{
|
||||
switch(bufferTarget)
|
||||
{
|
||||
case eGL_ARRAY_BUFFER: return BufferCategory::Vertex; break;
|
||||
case eGL_ELEMENT_ARRAY_BUFFER: return BufferCategory::Index; break;
|
||||
case eGL_UNIFORM_BUFFER: return BufferCategory::Constants; break;
|
||||
case eGL_SHADER_STORAGE_BUFFER: return BufferCategory::ReadWrite; break;
|
||||
case eGL_ARRAY_BUFFER: return BufferCategory::Vertex;
|
||||
case eGL_ELEMENT_ARRAY_BUFFER: return BufferCategory::Index;
|
||||
case eGL_UNIFORM_BUFFER: return BufferCategory::Constants;
|
||||
case eGL_SHADER_STORAGE_BUFFER: return BufferCategory::ReadWrite;
|
||||
case eGL_DRAW_INDIRECT_BUFFER:
|
||||
case eGL_DISPATCH_INDIRECT_BUFFER:
|
||||
case eGL_PARAMETER_BUFFER_ARB: return BufferCategory::Indirect; break;
|
||||
case eGL_PARAMETER_BUFFER_ARB: return BufferCategory::Indirect;
|
||||
default: break;
|
||||
}
|
||||
return BufferCategory::NoFlags;
|
||||
@@ -2275,7 +2256,7 @@ GLenum MakeGLFormat(ResourceFormat fmt)
|
||||
case ResourceFormatType::R4G4B4A4: ret = eGL_RGBA4; break;
|
||||
case ResourceFormatType::D24S8: ret = eGL_DEPTH24_STENCIL8; break;
|
||||
case ResourceFormatType::D32S8: ret = eGL_DEPTH32F_STENCIL8; break;
|
||||
case ResourceFormatType::D16S8: return eGL_NONE; break;
|
||||
case ResourceFormatType::D16S8: return eGL_NONE;
|
||||
case ResourceFormatType::ASTC:
|
||||
RDCWARN("ASTC can't be decoded unambiguously");
|
||||
return eGL_NONE;
|
||||
|
||||
@@ -1409,9 +1409,7 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
|
||||
{
|
||||
case eGL_STENCIL_INDEX1: rangeScale = 1.0f; break;
|
||||
case eGL_STENCIL_INDEX4: rangeScale = 16.0f; break;
|
||||
default:
|
||||
RDCWARN("Unexpected raw format for stencil visualization");
|
||||
// fall through
|
||||
default: RDCWARN("Unexpected raw format for stencil visualization"); DELIBERATE_FALLTHROUGH();
|
||||
case eGL_DEPTH24_STENCIL8:
|
||||
case eGL_DEPTH32F_STENCIL8:
|
||||
case eGL_DEPTH_STENCIL:
|
||||
@@ -1456,9 +1454,7 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
|
||||
renderbuffer = true;
|
||||
break;
|
||||
case eGL_TEXTURE_1D: texSlot = RESTYPE_TEX1D; break;
|
||||
default:
|
||||
RDCWARN("Unexpected texture type");
|
||||
// fall through
|
||||
default: RDCWARN("Unexpected texture type"); DELIBERATE_FALLTHROUGH();
|
||||
case eGL_TEXTURE_2D: texSlot = RESTYPE_TEX2D; break;
|
||||
case eGL_TEXTURE_2D_MULTISAMPLE: texSlot = RESTYPE_TEX2DMS; break;
|
||||
case eGL_TEXTURE_2D_MULTISAMPLE_ARRAY: texSlot = RESTYPE_TEX2DMSARRAY; break;
|
||||
@@ -1680,9 +1676,7 @@ bool GLReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompType t
|
||||
renderbuffer = true;
|
||||
break;
|
||||
case eGL_TEXTURE_1D: texSlot = RESTYPE_TEX1D; break;
|
||||
default:
|
||||
RDCWARN("Unexpected texture type");
|
||||
// fall through
|
||||
default: RDCWARN("Unexpected texture type"); DELIBERATE_FALLTHROUGH();
|
||||
case eGL_TEXTURE_2D: texSlot = RESTYPE_TEX2D; break;
|
||||
case eGL_TEXTURE_2D_MULTISAMPLE: texSlot = RESTYPE_TEX2DMS; break;
|
||||
case eGL_TEXTURE_2D_MULTISAMPLE_ARRAY: texSlot = RESTYPE_TEX2DMSARRAY; break;
|
||||
@@ -1759,7 +1753,7 @@ bool GLReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompType t
|
||||
case eGL_STENCIL_INDEX4: rangeScale = 16.0f; break;
|
||||
default:
|
||||
RDCWARN("Unexpected raw format for stencil visualization");
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_DEPTH24_STENCIL8:
|
||||
case eGL_DEPTH32F_STENCIL8:
|
||||
case eGL_DEPTH_STENCIL:
|
||||
|
||||
@@ -1213,6 +1213,9 @@ bool WrappedOpenGL::Serialise_ContextConfiguration(SerialiserType &ser, void *ct
|
||||
{
|
||||
std::string name;
|
||||
|
||||
// also add a simple resource descriptor for the context
|
||||
AddResource(Context, ResourceType::Device, "Context");
|
||||
|
||||
if(m_CurrentDefaultFBO == 0)
|
||||
{
|
||||
// if we haven't created a default FBO yet this is the first. Give it a nice friendly name
|
||||
@@ -1222,14 +1225,11 @@ bool WrappedOpenGL::Serialise_ContextConfiguration(SerialiserType &ser, void *ct
|
||||
{
|
||||
// if not, we have multiple FBOs and we want to distinguish them. Give the subsequent
|
||||
// backbuffers unique names
|
||||
name = StringFormat::Fmt("Context %llu Backbuffer", Context);
|
||||
name = GetReplay()->GetResourceDesc(Context).name + " Backbuffer";
|
||||
}
|
||||
|
||||
GLuint fbo = 0;
|
||||
CreateReplayBackbuffer(InitParams, FBO, fbo, name);
|
||||
|
||||
// also add a simple resource descriptor for the context
|
||||
AddResource(Context, ResourceType::Device, "Context");
|
||||
}
|
||||
|
||||
m_CurrentDefaultFBO = GetResourceManager()->GetLiveResource(FBO).name;
|
||||
@@ -2320,8 +2320,8 @@ bool WrappedOpenGL::EndFrameCapture(void *dev, void *wnd)
|
||||
GLResourceRecord *record = it->second.m_ContextDataRecord;
|
||||
if(record)
|
||||
{
|
||||
RDCDEBUG("Getting Resource Record for context ID %llu with %zu chunks",
|
||||
it->second.m_ContextDataResourceID, record->NumChunks());
|
||||
RDCDEBUG("Getting Resource Record for context ID %s with %zu chunks",
|
||||
ToStr(it->second.m_ContextDataResourceID).c_str(), record->NumChunks());
|
||||
record->Insert(recordlist);
|
||||
}
|
||||
}
|
||||
@@ -2903,7 +2903,7 @@ void WrappedOpenGL::AttemptCapture()
|
||||
}
|
||||
|
||||
{
|
||||
RDCDEBUG("GL Context %llu Attempting capture", m_ContextResourceID);
|
||||
RDCDEBUG("GL Context %s Attempting capture", ToStr(m_ContextResourceID).c_str());
|
||||
|
||||
m_SuccessfulCapture = true;
|
||||
m_FailureReason = CaptureSucceeded;
|
||||
|
||||
@@ -1170,7 +1170,7 @@ static void ForAllProgramUniforms(SerialiserType *ser, CaptureState state,
|
||||
if(IsGLES || IsDstProgramSPIRV)
|
||||
// Image uniforms cannot be re-assigned in GLES or with SPIR-V programs.
|
||||
break;
|
||||
// deliberate fall-through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
// treat all samplers as just an int (since they just store their binding value)
|
||||
case eGL_SAMPLER_1D:
|
||||
case eGL_SAMPLER_2D:
|
||||
|
||||
@@ -65,9 +65,7 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, TexDisplayFlags flags)
|
||||
renderbuffer = true;
|
||||
break;
|
||||
case eGL_TEXTURE_1D: resType = RESTYPE_TEX1D; break;
|
||||
default:
|
||||
RDCWARN("Unexpected texture type");
|
||||
// fall through
|
||||
default: RDCWARN("Unexpected texture type"); DELIBERATE_FALLTHROUGH();
|
||||
case eGL_TEXTURE_2D: resType = RESTYPE_TEX2D; break;
|
||||
case eGL_TEXTURE_2D_MULTISAMPLE: resType = RESTYPE_TEX2DMS; break;
|
||||
case eGL_TEXTURE_2D_MULTISAMPLE_ARRAY: resType = RESTYPE_TEX2DMSARRAY; break;
|
||||
@@ -331,7 +329,7 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, TexDisplayFlags flags)
|
||||
case eGL_STENCIL_INDEX4: rangeScale = 16.0f; break;
|
||||
default:
|
||||
RDCWARN("Unexpected raw format for stencil visualization");
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_DEPTH24_STENCIL8:
|
||||
case eGL_DEPTH32F_STENCIL8:
|
||||
case eGL_DEPTH_STENCIL:
|
||||
|
||||
@@ -351,7 +351,7 @@ void GLReplay::GetBufferData(ResourceId buff, uint64_t offset, uint64_t len, byt
|
||||
{
|
||||
if(m_pDriver->m_Buffers.find(buff) == m_pDriver->m_Buffers.end())
|
||||
{
|
||||
RDCWARN("Requesting data for non-existant buffer %llu", buff);
|
||||
RDCWARN("Requesting data for non-existant buffer %s", ToStr(buff).c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ void GLReplay::CacheTexture(ResourceId id)
|
||||
if(res.resource.Namespace == eResUnknown || res.curType == eGL_NONE)
|
||||
{
|
||||
if(res.resource.Namespace == eResUnknown)
|
||||
RDCERR("Details for invalid texture id %llu requested", id);
|
||||
RDCERR("Details for invalid texture id %s requested", ToStr(id).c_str());
|
||||
|
||||
tex.format = ResourceFormat();
|
||||
tex.dimension = 1;
|
||||
@@ -687,7 +687,7 @@ BufferDescription GLReplay::GetBuffer(ResourceId id)
|
||||
|
||||
if(res.resource.Namespace == eResUnknown)
|
||||
{
|
||||
RDCERR("Details for invalid buffer id %llu requested", id);
|
||||
RDCERR("Details for invalid buffer id %s requested", ToStr(id).c_str());
|
||||
RDCEraseEl(ret);
|
||||
return ret;
|
||||
}
|
||||
@@ -1585,7 +1585,7 @@ void GLReplay::SavePipelineState(uint32_t eventId)
|
||||
{
|
||||
default:
|
||||
RDCWARN("Unexpected value for POLYGON_MODE %x", rs.PolygonMode);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_FILL:
|
||||
pipe.rasterizer.state.fillMode = FillMode::Solid;
|
||||
polygonOffsetEnableEnum = GLRenderState::eEnabled_PolyOffsetFill;
|
||||
@@ -1616,9 +1616,7 @@ void GLReplay::SavePipelineState(uint32_t eventId)
|
||||
{
|
||||
switch(rs.CullFace)
|
||||
{
|
||||
default:
|
||||
RDCWARN("Unexpected value for CULL_FACE %x", rs.CullFace);
|
||||
// fall through
|
||||
default: RDCWARN("Unexpected value for CULL_FACE %x", rs.CullFace); DELIBERATE_FALLTHROUGH();
|
||||
case eGL_BACK: pipe.rasterizer.state.cullMode = CullMode::Back; break;
|
||||
case eGL_FRONT: pipe.rasterizer.state.cullMode = CullMode::Front; break;
|
||||
case eGL_FRONT_AND_BACK: pipe.rasterizer.state.cullMode = CullMode::FrontAndBack; break;
|
||||
@@ -2095,7 +2093,7 @@ void GLReplay::OpenGLFillCBufferVariables(ResourceId shader, GLuint prog, bool b
|
||||
case VarType::Half:
|
||||
RDCERR("Unexpected base variable type %s, treating as float",
|
||||
ToStr(var.type).c_str());
|
||||
// deliberate fall-through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case VarType::Float:
|
||||
GL.glGetUniformfv(prog, location, (float *)uniformData.data());
|
||||
break;
|
||||
@@ -2140,7 +2138,7 @@ void GLReplay::OpenGLFillCBufferVariables(ResourceId shader, GLuint prog, bool b
|
||||
case VarType::Half:
|
||||
RDCERR("Unexpected base variable type %s, treating as float",
|
||||
ToStr(var.type).c_str());
|
||||
// deliberate fall-through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case VarType::Float:
|
||||
GL.glGetUniformfv(prog, location + a, (float *)uniformData.data());
|
||||
break;
|
||||
@@ -2279,7 +2277,7 @@ void GLReplay::GetTextureData(ResourceId tex, const Subresource &sub,
|
||||
|
||||
if(texType == eGL_NONE)
|
||||
{
|
||||
RDCERR("Trying to get texture data for unknown ID %llu!", tex);
|
||||
RDCERR("Trying to get texture data for unknown ID %s!", ToStr(tex).c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -305,7 +305,8 @@ void WrappedOpenGL::HandleVRFrameMarkers(const GLchar *buf, GLsizei length)
|
||||
{
|
||||
m_AcceptedCtx.clear();
|
||||
m_AcceptedCtx.insert(GetCtx().ctx);
|
||||
RDCDEBUG("Only resource ID accepted is %llu", GetCtxData().m_ContextDataResourceID);
|
||||
RDCDEBUG("Only resource ID accepted is %s",
|
||||
ToStr(GetCtxData().m_ContextDataResourceID).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4083,7 +4083,7 @@ bool WrappedOpenGL::Serialise_glClearNamedBufferDataEXT(SerialiserType &ser, GLu
|
||||
{
|
||||
default:
|
||||
RDCWARN("Unexpected format %x, defaulting to single component", format);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_RED:
|
||||
case eGL_RED_INTEGER:
|
||||
case eGL_GREEN_INTEGER:
|
||||
@@ -4113,7 +4113,7 @@ bool WrappedOpenGL::Serialise_glClearNamedBufferDataEXT(SerialiserType &ser, GLu
|
||||
case eGL_FLOAT: s *= 4; break;
|
||||
default:
|
||||
RDCWARN("Unexpected type %x, defaulting to 1 byte type", type);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_UNSIGNED_BYTE_3_3_2:
|
||||
case eGL_UNSIGNED_BYTE_2_3_3_REV: s = 1; break;
|
||||
case eGL_UNSIGNED_SHORT_5_6_5:
|
||||
@@ -4237,7 +4237,7 @@ bool WrappedOpenGL::Serialise_glClearNamedBufferSubDataEXT(SerialiserType &ser,
|
||||
{
|
||||
default:
|
||||
RDCWARN("Unexpected format %x, defaulting to single component", format);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_RED:
|
||||
case eGL_RED_INTEGER:
|
||||
case eGL_GREEN_INTEGER:
|
||||
@@ -4267,7 +4267,7 @@ bool WrappedOpenGL::Serialise_glClearNamedBufferSubDataEXT(SerialiserType &ser,
|
||||
case eGL_FLOAT: s *= 4; break;
|
||||
default:
|
||||
RDCWARN("Unexpected type %x, defaulting to 1 byte type", type);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_UNSIGNED_BYTE_3_3_2:
|
||||
case eGL_UNSIGNED_BYTE_2_3_3_REV: s = 1; break;
|
||||
case eGL_UNSIGNED_SHORT_5_6_5:
|
||||
@@ -4545,7 +4545,7 @@ bool WrappedOpenGL::Serialise_glClearTexImage(SerialiserType &ser, GLuint textur
|
||||
{
|
||||
default:
|
||||
RDCWARN("Unexpected format %x, defaulting to single component", format);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_RED:
|
||||
case eGL_RED_INTEGER:
|
||||
case eGL_GREEN_INTEGER:
|
||||
@@ -4575,7 +4575,7 @@ bool WrappedOpenGL::Serialise_glClearTexImage(SerialiserType &ser, GLuint textur
|
||||
case eGL_FLOAT: s *= 4; break;
|
||||
default:
|
||||
RDCWARN("Unexpected type %x, defaulting to 1 byte type", type);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_UNSIGNED_BYTE_3_3_2:
|
||||
case eGL_UNSIGNED_BYTE_2_3_3_REV: s = 1; break;
|
||||
case eGL_UNSIGNED_SHORT_5_6_5:
|
||||
@@ -4659,7 +4659,7 @@ bool WrappedOpenGL::Serialise_glClearTexSubImage(SerialiserType &ser, GLuint tex
|
||||
{
|
||||
default:
|
||||
RDCWARN("Unexpected format %x, defaulting to single component", format);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_RED:
|
||||
case eGL_RED_INTEGER:
|
||||
case eGL_GREEN_INTEGER:
|
||||
@@ -4689,7 +4689,7 @@ bool WrappedOpenGL::Serialise_glClearTexSubImage(SerialiserType &ser, GLuint tex
|
||||
case eGL_FLOAT: s *= 4; break;
|
||||
default:
|
||||
RDCWARN("Unexpected type %x, defaulting to 1 byte type", type);
|
||||
// fall through
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case eGL_UNSIGNED_BYTE_3_3_2:
|
||||
case eGL_UNSIGNED_BYTE_2_3_3_REV: s = 1; break;
|
||||
case eGL_UNSIGNED_SHORT_5_6_5:
|
||||
|
||||
@@ -3244,13 +3244,13 @@ void WrappedOpenGL::StoreCompressedTexData(ResourceId texId, GLenum target, GLin
|
||||
GL.glUnmapBuffer(eGL_PIXEL_UNPACK_BUFFER);
|
||||
|
||||
if(!error.empty())
|
||||
RDCWARN("StoreCompressedTexData: Unexpected %s (tex:%llu, target:%s)", error.c_str(), texId,
|
||||
ToStr(target).c_str());
|
||||
RDCWARN("StoreCompressedTexData: Unexpected %s (tex:%s, target:%s)", error.c_str(),
|
||||
ToStr(texId).c_str(), ToStr(target).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCWARN("StoreCompressedTexData: No source pixels to copy from (tex:%llu, target:%s)", texId,
|
||||
ToStr(target).c_str());
|
||||
RDCWARN("StoreCompressedTexData: No source pixels to copy from (tex:%s, target:%s)",
|
||||
ToStr(texId).c_str(), ToStr(target).c_str());
|
||||
}
|
||||
|
||||
SAFE_DELETE_ARRAY(unpackedPixels);
|
||||
|
||||
@@ -110,7 +110,7 @@ add_definitions(-DAMD_EXTENSIONS)
|
||||
add_definitions(-DNV_EXTENSIONS)
|
||||
|
||||
set_property(SOURCE ${glslang_sources}
|
||||
PROPERTY COMPILE_FLAGS "-Wno-ignored-qualifiers -Wno-strict-aliasing")
|
||||
PROPERTY COMPILE_FLAGS "-Wno-ignored-qualifiers -Wno-strict-aliasing -Wno-unreachable-code-break")
|
||||
|
||||
# GCC 7.0 and above needs -Wno-implicit-fallthrough on these files
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.9)
|
||||
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
if(it != std::map<Id, T>::end())
|
||||
return it->second;
|
||||
|
||||
RDCERR("Lookup of invalid Id %u expected in SparseIdMap", id);
|
||||
RDCERR("Lookup of invalid Id %u expected in SparseIdMap", id.value());
|
||||
return dummy;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ std::string Reflector::Disassemble(const std::string &entryPoint) const
|
||||
return ret;
|
||||
|
||||
// if we *still* have nothing, just stringise the id itself
|
||||
return StringFormat::Fmt("_%u", id);
|
||||
return StringFormat::Fmt("_%u", id.value());
|
||||
};
|
||||
auto constIntVal = [this](Id id) { return EvaluateConstant(id, {}).value.u.x; };
|
||||
auto declName = [this, &idName, &usedNames, &dynamicNames](Id typeId, Id id) -> rdcstr {
|
||||
@@ -148,7 +148,7 @@ std::string Reflector::Disassemble(const std::string &entryPoint) const
|
||||
|
||||
rdcstr ret = dataTypes[typeId].name;
|
||||
if(ret.empty())
|
||||
ret = StringFormat::Fmt("type%u", typeId);
|
||||
ret = StringFormat::Fmt("type%u", typeId.value());
|
||||
|
||||
if(id == Id())
|
||||
return ret;
|
||||
@@ -156,7 +156,7 @@ std::string Reflector::Disassemble(const std::string &entryPoint) const
|
||||
rdcstr basename = strings[id];
|
||||
if(basename.empty())
|
||||
{
|
||||
return ret + " " + StringFormat::Fmt("_%u", id);
|
||||
return ret + " " + StringFormat::Fmt("_%u", id.value());
|
||||
}
|
||||
|
||||
rdcstr name = basename;
|
||||
@@ -485,6 +485,7 @@ std::string Reflector::Disassemble(const std::string &entryPoint) const
|
||||
binary = true;
|
||||
ret += StringiseBinaryOperation(idName, op, Id::fromWord(it.word(4)),
|
||||
Id::fromWord(it.word(5)));
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@@ -968,7 +969,7 @@ std::string Reflector::Disassemble(const std::string &entryPoint) const
|
||||
else
|
||||
{
|
||||
if(strings[otherLabel].empty())
|
||||
dynamicNames[otherLabel] = StringFormat::Fmt("_continue%u", otherLabel);
|
||||
dynamicNames[otherLabel] = StringFormat::Fmt("_continue%u", otherLabel.value());
|
||||
ret += StringFormat::Fmt("if(%s%s) goto %s;", negate,
|
||||
idName(decoded.condition).c_str(),
|
||||
idName(otherLabel).c_str());
|
||||
|
||||
@@ -493,6 +493,8 @@ class Processor
|
||||
public:
|
||||
Processor();
|
||||
~Processor();
|
||||
Processor(const Processor &o) = default;
|
||||
Processor &operator=(const Processor &o) = default;
|
||||
|
||||
// accessors to structs/vectors of data
|
||||
const std::vector<EntryPoint> &GetEntries() { return entries; }
|
||||
|
||||
@@ -532,7 +532,7 @@ void Reflector::PostParse()
|
||||
}
|
||||
else if(type.type == DataType::StructType)
|
||||
{
|
||||
type.name = StringFormat::Fmt("struct%u", type.id);
|
||||
type.name = StringFormat::Fmt("struct%u", type.id.value());
|
||||
}
|
||||
else if(type.type == DataType::ArrayType)
|
||||
{
|
||||
@@ -549,7 +549,7 @@ void Reflector::PostParse()
|
||||
|
||||
// if not, it might be a spec constant, use the fallback
|
||||
if(lengthName.empty())
|
||||
lengthName = StringFormat::Fmt("_%u", type.length);
|
||||
lengthName = StringFormat::Fmt("_%u", type.length.value());
|
||||
}
|
||||
|
||||
rdcstr basename = dataTypes[type.InnerType()].name;
|
||||
@@ -614,7 +614,7 @@ void Reflector::PostParse()
|
||||
}
|
||||
else if(type.type == DataType::SamplerType)
|
||||
{
|
||||
type.name = StringFormat::Fmt("sampler", type.id);
|
||||
type.name = StringFormat::Fmt("sampler", type.id.value());
|
||||
}
|
||||
else if(type.type == DataType::SampledImageType)
|
||||
{
|
||||
@@ -827,7 +827,7 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
|
||||
// otherwise fall back to naming after the ID
|
||||
if(name.empty())
|
||||
name = StringFormat::Fmt("sig%u", global.id);
|
||||
name = StringFormat::Fmt("sig%u", global.id.value());
|
||||
|
||||
const bool used = usedIds.find(global.id) != usedIds.end();
|
||||
|
||||
@@ -968,7 +968,7 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
if(res.name.empty())
|
||||
res.name = varType->name;
|
||||
if(res.name.empty())
|
||||
res.name = StringFormat::Fmt("atomic%u", global.id);
|
||||
res.name = StringFormat::Fmt("atomic%u", global.id.value());
|
||||
res.resType = TextureType::Buffer;
|
||||
|
||||
res.variableType.descriptor.columns = 1;
|
||||
@@ -995,7 +995,7 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
|
||||
res.name = strings[global.id];
|
||||
if(res.name.empty())
|
||||
res.name = StringFormat::Fmt("res%u", global.id);
|
||||
res.name = StringFormat::Fmt("res%u", global.id.value());
|
||||
|
||||
if(varType->type == DataType::SamplerType)
|
||||
{
|
||||
@@ -1083,7 +1083,7 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
res.isTexture = false;
|
||||
res.name = strings[global.id];
|
||||
if(res.name.empty())
|
||||
res.name = StringFormat::Fmt("ssbo%u", global.id);
|
||||
res.name = StringFormat::Fmt("ssbo%u", global.id.value());
|
||||
res.resType = TextureType::Buffer;
|
||||
|
||||
res.variableType.descriptor.columns = 0;
|
||||
@@ -1104,7 +1104,7 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
|
||||
cblock.name = strings[global.id];
|
||||
if(cblock.name.empty())
|
||||
cblock.name = StringFormat::Fmt("uniforms%u", global.id);
|
||||
cblock.name = StringFormat::Fmt("uniforms%u", global.id.value());
|
||||
cblock.bufferBacked = !pushConst;
|
||||
|
||||
MakeConstantBlockVariables(*varType, 0, 0, cblock.variables, pointerTypes, specInfo);
|
||||
@@ -1381,7 +1381,7 @@ ShaderVariable Reflector::EvaluateConstant(Id constID, const std::vector<SpecCon
|
||||
|
||||
if(it == constants.end())
|
||||
{
|
||||
RDCERR("Lookup of unknown constant %u", constID);
|
||||
RDCERR("Lookup of unknown constant %u", constID.value());
|
||||
return ShaderVariable("unknown", 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ void AnnotateShader(const SPIRVPatchData &patchData, const char *entryName,
|
||||
|
||||
if(indexType == rdcspv::Id())
|
||||
{
|
||||
RDCERR("Unknown type for ID %u, defaulting to uint32_t", index);
|
||||
RDCERR("Unknown type for ID %u, defaulting to uint32_t", index.value());
|
||||
indexType = uint32ID;
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ void AnnotateShader(const SPIRVPatchData &patchData, const char *entryName,
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Unknown index type ID %u, defaulting to uint32_t", indexType);
|
||||
RDCERR("Unknown index type ID %u, defaulting to uint32_t", indexType.value());
|
||||
}
|
||||
|
||||
// if it's signed, bitcast it to unsigned
|
||||
|
||||
@@ -456,21 +456,17 @@ Topology MakePrimitiveTopology(VkPrimitiveTopology Topo, uint32_t patchControlPo
|
||||
switch(Topo)
|
||||
{
|
||||
default: break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_POINT_LIST: return Topology::PointList; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_LIST: return Topology::LineList; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP: return Topology::LineStrip; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST: return Topology::TriangleList; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP: return Topology::TriangleStrip; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN: return Topology::TriangleFan; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY: return Topology::LineList_Adj; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY: return Topology::LineStrip_Adj; break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY:
|
||||
return Topology::TriangleList_Adj;
|
||||
break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY:
|
||||
return Topology::TriangleStrip_Adj;
|
||||
break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_PATCH_LIST: return PatchList_Topology(patchControlPoints); break;
|
||||
case VK_PRIMITIVE_TOPOLOGY_POINT_LIST: return Topology::PointList;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_LIST: return Topology::LineList;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP: return Topology::LineStrip;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST: return Topology::TriangleList;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP: return Topology::TriangleStrip;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN: return Topology::TriangleFan;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY: return Topology::LineList_Adj;
|
||||
case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY: return Topology::LineStrip_Adj;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY: return Topology::TriangleList_Adj;
|
||||
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY: return Topology::TriangleStrip_Adj;
|
||||
case VK_PRIMITIVE_TOPOLOGY_PATCH_LIST: return PatchList_Topology(patchControlPoints);
|
||||
}
|
||||
|
||||
return Topology::Unknown;
|
||||
@@ -859,11 +855,11 @@ FrameRefType GetRefType(VkDescriptorType descType)
|
||||
case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:
|
||||
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
|
||||
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
|
||||
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: return eFrameRef_Read; break;
|
||||
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: return eFrameRef_Read;
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: return eFrameRef_ReadBeforeWrite; break;
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: return eFrameRef_ReadBeforeWrite;
|
||||
default: RDCERR("Unexpected descriptor type");
|
||||
}
|
||||
|
||||
|
||||
@@ -1951,8 +1951,8 @@ bool WrappedVulkan::EndFrameCapture(void *dev, void *wnd)
|
||||
{
|
||||
m_CmdBufferRecords[i]->Insert(recordlist);
|
||||
|
||||
RDCDEBUG("Adding %u chunks to file serialiser from command buffer %llu",
|
||||
(uint32_t)recordlist.size(), m_CmdBufferRecords[i]->GetResourceID());
|
||||
RDCDEBUG("Adding %u chunks to file serialiser from command buffer %s",
|
||||
(uint32_t)recordlist.size(), ToStr(m_CmdBufferRecords[i]->GetResourceID()).c_str());
|
||||
}
|
||||
|
||||
m_FrameCaptureRecord->Insert(recordlist);
|
||||
@@ -2584,402 +2584,283 @@ bool WrappedVulkan::ProcessChunk(ReadSerialiser &ser, VulkanChunk chunk)
|
||||
{
|
||||
case VulkanChunk::vkEnumeratePhysicalDevices:
|
||||
return Serialise_vkEnumeratePhysicalDevices(ser, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateDevice:
|
||||
return Serialise_vkCreateDevice(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkGetDeviceQueue:
|
||||
return Serialise_vkGetDeviceQueue(ser, VK_NULL_HANDLE, 0, 0, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkAllocateMemory:
|
||||
return Serialise_vkAllocateMemory(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkUnmapMemory:
|
||||
return Serialise_vkUnmapMemory(ser, VK_NULL_HANDLE, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkFlushMappedMemoryRanges:
|
||||
return Serialise_vkFlushMappedMemoryRanges(ser, VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateCommandPool:
|
||||
return Serialise_vkCreateCommandPool(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkAllocateCommandBuffers:
|
||||
return Serialise_vkAllocateCommandBuffers(ser, VK_NULL_HANDLE, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateFramebuffer:
|
||||
return Serialise_vkCreateFramebuffer(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateRenderPass:
|
||||
return Serialise_vkCreateRenderPass(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateDescriptorPool:
|
||||
return Serialise_vkCreateDescriptorPool(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateDescriptorSetLayout:
|
||||
return Serialise_vkCreateDescriptorSetLayout(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateBuffer:
|
||||
return Serialise_vkCreateBuffer(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateBufferView:
|
||||
return Serialise_vkCreateBufferView(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateImage:
|
||||
return Serialise_vkCreateImage(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateImageView:
|
||||
return Serialise_vkCreateImageView(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateSampler:
|
||||
return Serialise_vkCreateSampler(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateShaderModule:
|
||||
return Serialise_vkCreateShaderModule(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreatePipelineLayout:
|
||||
return Serialise_vkCreatePipelineLayout(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreatePipelineCache:
|
||||
return Serialise_vkCreatePipelineCache(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateGraphicsPipelines:
|
||||
return Serialise_vkCreateGraphicsPipelines(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, NULL, NULL,
|
||||
NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateComputePipelines:
|
||||
return Serialise_vkCreateComputePipelines(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, NULL, NULL,
|
||||
NULL);
|
||||
break;
|
||||
case VulkanChunk::vkGetSwapchainImagesKHR:
|
||||
return Serialise_vkGetSwapchainImagesKHR(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, NULL, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCreateSemaphore:
|
||||
return Serialise_vkCreateSemaphore(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCreateFence:
|
||||
// these chunks re-use serialisation from vkCreateFence, but have separate chunks for user
|
||||
// identification
|
||||
case VulkanChunk::vkRegisterDeviceEventEXT:
|
||||
case VulkanChunk::vkRegisterDisplayEventEXT:
|
||||
return Serialise_vkCreateFence(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkGetFenceStatus:
|
||||
return Serialise_vkGetFenceStatus(ser, VK_NULL_HANDLE, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkResetFences:
|
||||
return Serialise_vkResetFences(ser, VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkResetFences: return Serialise_vkResetFences(ser, VK_NULL_HANDLE, 0, NULL);
|
||||
case VulkanChunk::vkWaitForFences:
|
||||
return Serialise_vkWaitForFences(ser, VK_NULL_HANDLE, 0, NULL, VK_FALSE, 0);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCreateEvent:
|
||||
return Serialise_vkCreateEvent(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkGetEventStatus:
|
||||
return Serialise_vkGetEventStatus(ser, VK_NULL_HANDLE, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkSetEvent:
|
||||
return Serialise_vkSetEvent(ser, VK_NULL_HANDLE, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkSetEvent: return Serialise_vkSetEvent(ser, VK_NULL_HANDLE, VK_NULL_HANDLE);
|
||||
case VulkanChunk::vkResetEvent:
|
||||
return Serialise_vkResetEvent(ser, VK_NULL_HANDLE, VK_NULL_HANDLE);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCreateQueryPool:
|
||||
return Serialise_vkCreateQueryPool(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkAllocateDescriptorSets:
|
||||
return Serialise_vkAllocateDescriptorSets(ser, VK_NULL_HANDLE, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkUpdateDescriptorSets:
|
||||
return Serialise_vkUpdateDescriptorSets(ser, VK_NULL_HANDLE, 0, NULL, 0, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkBeginCommandBuffer:
|
||||
return Serialise_vkBeginCommandBuffer(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkEndCommandBuffer:
|
||||
return Serialise_vkEndCommandBuffer(ser, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkEndCommandBuffer: return Serialise_vkEndCommandBuffer(ser, VK_NULL_HANDLE);
|
||||
|
||||
case VulkanChunk::vkQueueWaitIdle: return Serialise_vkQueueWaitIdle(ser, VK_NULL_HANDLE); break;
|
||||
case VulkanChunk::vkDeviceWaitIdle:
|
||||
return Serialise_vkDeviceWaitIdle(ser, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkQueueWaitIdle: return Serialise_vkQueueWaitIdle(ser, VK_NULL_HANDLE);
|
||||
case VulkanChunk::vkDeviceWaitIdle: return Serialise_vkDeviceWaitIdle(ser, VK_NULL_HANDLE);
|
||||
|
||||
case VulkanChunk::vkQueueSubmit:
|
||||
return Serialise_vkQueueSubmit(ser, VK_NULL_HANDLE, 0, NULL, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkBindBufferMemory:
|
||||
return Serialise_vkBindBufferMemory(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_NULL_HANDLE, 0);
|
||||
break;
|
||||
case VulkanChunk::vkBindImageMemory:
|
||||
return Serialise_vkBindImageMemory(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_NULL_HANDLE, 0);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkQueueBindSparse:
|
||||
return Serialise_vkQueueBindSparse(ser, VK_NULL_HANDLE, 0, NULL, VK_NULL_HANDLE);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdBeginRenderPass:
|
||||
return Serialise_vkCmdBeginRenderPass(ser, VK_NULL_HANDLE, NULL, VK_SUBPASS_CONTENTS_MAX_ENUM);
|
||||
break;
|
||||
case VulkanChunk::vkCmdNextSubpass:
|
||||
return Serialise_vkCmdNextSubpass(ser, VK_NULL_HANDLE, VK_SUBPASS_CONTENTS_MAX_ENUM);
|
||||
break;
|
||||
case VulkanChunk::vkCmdExecuteCommands:
|
||||
return Serialise_vkCmdExecuteCommands(ser, VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdEndRenderPass:
|
||||
return Serialise_vkCmdEndRenderPass(ser, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkCmdEndRenderPass: return Serialise_vkCmdEndRenderPass(ser, VK_NULL_HANDLE);
|
||||
|
||||
case VulkanChunk::vkCmdBindPipeline:
|
||||
return Serialise_vkCmdBindPipeline(ser, VK_NULL_HANDLE, VK_PIPELINE_BIND_POINT_MAX_ENUM,
|
||||
VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetViewport:
|
||||
return Serialise_vkCmdSetViewport(ser, VK_NULL_HANDLE, 0, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetScissor:
|
||||
return Serialise_vkCmdSetScissor(ser, VK_NULL_HANDLE, 0, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetLineWidth:
|
||||
return Serialise_vkCmdSetLineWidth(ser, VK_NULL_HANDLE, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetLineWidth: return Serialise_vkCmdSetLineWidth(ser, VK_NULL_HANDLE, 0);
|
||||
case VulkanChunk::vkCmdSetDepthBias:
|
||||
return Serialise_vkCmdSetDepthBias(ser, VK_NULL_HANDLE, 0.0f, 0.0f, 0.0f);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetBlendConstants:
|
||||
return Serialise_vkCmdSetBlendConstants(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetDepthBounds:
|
||||
return Serialise_vkCmdSetDepthBounds(ser, VK_NULL_HANDLE, 0.0f, 0.0f);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetStencilCompareMask:
|
||||
return Serialise_vkCmdSetStencilCompareMask(ser, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetStencilWriteMask:
|
||||
return Serialise_vkCmdSetStencilWriteMask(ser, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetStencilReference:
|
||||
return Serialise_vkCmdSetStencilReference(ser, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdBindDescriptorSets:
|
||||
return Serialise_vkCmdBindDescriptorSets(ser, VK_NULL_HANDLE, VK_PIPELINE_BIND_POINT_MAX_ENUM,
|
||||
VK_NULL_HANDLE, 0, 0, NULL, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdBindIndexBuffer:
|
||||
return Serialise_vkCmdBindIndexBuffer(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0,
|
||||
VK_INDEX_TYPE_MAX_ENUM);
|
||||
break;
|
||||
case VulkanChunk::vkCmdBindVertexBuffers:
|
||||
return Serialise_vkCmdBindVertexBuffers(ser, VK_NULL_HANDLE, 0, 0, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdCopyBufferToImage:
|
||||
return Serialise_vkCmdCopyBufferToImage(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_IMAGE_LAYOUT_MAX_ENUM, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdCopyImageToBuffer:
|
||||
return Serialise_vkCmdCopyImageToBuffer(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_IMAGE_LAYOUT_MAX_ENUM, VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdCopyImage:
|
||||
return Serialise_vkCmdCopyImage(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_MAX_ENUM,
|
||||
VK_NULL_HANDLE, VK_IMAGE_LAYOUT_MAX_ENUM, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdBlitImage:
|
||||
return Serialise_vkCmdBlitImage(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_MAX_ENUM,
|
||||
VK_NULL_HANDLE, VK_IMAGE_LAYOUT_MAX_ENUM, 0, NULL,
|
||||
VK_FILTER_MAX_ENUM);
|
||||
break;
|
||||
case VulkanChunk::vkCmdResolveImage:
|
||||
return Serialise_vkCmdResolveImage(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_IMAGE_LAYOUT_MAX_ENUM, VK_NULL_HANDLE,
|
||||
VK_IMAGE_LAYOUT_MAX_ENUM, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdCopyBuffer:
|
||||
return Serialise_vkCmdCopyBuffer(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdUpdateBuffer:
|
||||
return Serialise_vkCmdUpdateBuffer(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdFillBuffer:
|
||||
return Serialise_vkCmdFillBuffer(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdPushConstants:
|
||||
return Serialise_vkCmdPushConstants(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_SHADER_STAGE_ALL,
|
||||
0, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdClearColorImage:
|
||||
return Serialise_vkCmdClearColorImage(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_IMAGE_LAYOUT_MAX_ENUM, NULL, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdClearDepthStencilImage:
|
||||
return Serialise_vkCmdClearDepthStencilImage(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_IMAGE_LAYOUT_MAX_ENUM, NULL, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdClearAttachments:
|
||||
return Serialise_vkCmdClearAttachments(ser, VK_NULL_HANDLE, 0, NULL, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdPipelineBarrier:
|
||||
return Serialise_vkCmdPipelineBarrier(ser, VK_NULL_HANDLE, 0, 0, VK_FALSE, 0, NULL, 0, NULL,
|
||||
0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdWriteTimestamp:
|
||||
return Serialise_vkCmdWriteTimestamp(ser, VK_NULL_HANDLE, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_NULL_HANDLE, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdCopyQueryPoolResults:
|
||||
return Serialise_vkCmdCopyQueryPoolResults(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0,
|
||||
VK_NULL_HANDLE, 0, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdBeginQuery:
|
||||
return Serialise_vkCmdBeginQuery(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdEndQuery:
|
||||
return Serialise_vkCmdEndQuery(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdResetQueryPool:
|
||||
return Serialise_vkCmdResetQueryPool(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdSetEvent:
|
||||
return Serialise_vkCmdSetEvent(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
|
||||
break;
|
||||
case VulkanChunk::vkCmdResetEvent:
|
||||
return Serialise_vkCmdResetEvent(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
|
||||
break;
|
||||
case VulkanChunk::vkCmdWaitEvents:
|
||||
return Serialise_vkCmdWaitEvents(
|
||||
ser, VK_NULL_HANDLE, 0, NULL, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, NULL, 0, NULL, 0, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdDraw: return Serialise_vkCmdDraw(ser, VK_NULL_HANDLE, 0, 0, 0, 0); break;
|
||||
case VulkanChunk::vkCmdDraw: return Serialise_vkCmdDraw(ser, VK_NULL_HANDLE, 0, 0, 0, 0);
|
||||
case VulkanChunk::vkCmdDrawIndirect:
|
||||
return Serialise_vkCmdDrawIndirect(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDrawIndexed:
|
||||
return Serialise_vkCmdDrawIndexed(ser, VK_NULL_HANDLE, 0, 0, 0, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDrawIndexedIndirect:
|
||||
return Serialise_vkCmdDrawIndexedIndirect(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDispatch:
|
||||
return Serialise_vkCmdDispatch(ser, VK_NULL_HANDLE, 0, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDispatch: return Serialise_vkCmdDispatch(ser, VK_NULL_HANDLE, 0, 0, 0);
|
||||
case VulkanChunk::vkCmdDispatchIndirect:
|
||||
return Serialise_vkCmdDispatchIndirect(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdDebugMarkerBeginEXT:
|
||||
return Serialise_vkCmdDebugMarkerBeginEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDebugMarkerInsertEXT:
|
||||
return Serialise_vkCmdDebugMarkerInsertEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDebugMarkerEndEXT:
|
||||
return Serialise_vkCmdDebugMarkerEndEXT(ser, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkDebugMarkerSetObjectNameEXT:
|
||||
return Serialise_vkDebugMarkerSetObjectNameEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::SetShaderDebugPath:
|
||||
return Serialise_SetShaderDebugPath(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCreateSwapchainKHR:
|
||||
return Serialise_vkCreateSwapchainKHR(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdIndirectSubCommand:
|
||||
// this is a fake chunk generated at runtime as part of indirect draws.
|
||||
// Just in case it gets exported and imported, completely ignore it.
|
||||
return true;
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdPushDescriptorSetKHR:
|
||||
return Serialise_vkCmdPushDescriptorSetKHR(
|
||||
ser, VK_NULL_HANDLE, VK_PIPELINE_BIND_POINT_GRAPHICS, VK_NULL_HANDLE, 0, 0, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdPushDescriptorSetWithTemplateKHR:
|
||||
return Serialise_vkCmdPushDescriptorSetWithTemplateKHR(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCreateDescriptorUpdateTemplate:
|
||||
return Serialise_vkCreateDescriptorUpdateTemplate(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkUpdateDescriptorSetWithTemplate:
|
||||
return Serialise_vkUpdateDescriptorSetWithTemplate(ser, VK_NULL_HANDLE, VK_NULL_HANDLE,
|
||||
VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkBindBufferMemory2:
|
||||
return Serialise_vkBindBufferMemory2(ser, VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkBindImageMemory2:
|
||||
return Serialise_vkBindImageMemory2(ser, VK_NULL_HANDLE, 0, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdWriteBufferMarkerAMD:
|
||||
return Serialise_vkCmdWriteBufferMarkerAMD(
|
||||
ser, VK_NULL_HANDLE, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkSetDebugUtilsObjectNameEXT:
|
||||
return Serialise_vkSetDebugUtilsObjectNameEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkQueueBeginDebugUtilsLabelEXT:
|
||||
return Serialise_vkQueueBeginDebugUtilsLabelEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkQueueEndDebugUtilsLabelEXT:
|
||||
return Serialise_vkQueueEndDebugUtilsLabelEXT(ser, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkQueueInsertDebugUtilsLabelEXT:
|
||||
return Serialise_vkQueueInsertDebugUtilsLabelEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdBeginDebugUtilsLabelEXT:
|
||||
return Serialise_vkCmdBeginDebugUtilsLabelEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
case VulkanChunk::vkCmdEndDebugUtilsLabelEXT:
|
||||
return Serialise_vkCmdEndDebugUtilsLabelEXT(ser, VK_NULL_HANDLE);
|
||||
break;
|
||||
case VulkanChunk::vkCmdInsertDebugUtilsLabelEXT:
|
||||
return Serialise_vkCmdInsertDebugUtilsLabelEXT(ser, VK_NULL_HANDLE, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCreateSamplerYcbcrConversion:
|
||||
return Serialise_vkCreateSamplerYcbcrConversion(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdSetDeviceMask:
|
||||
return Serialise_vkCmdSetDeviceMask(ser, VK_NULL_HANDLE, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDispatchBase:
|
||||
return Serialise_vkCmdDispatchBase(ser, VK_NULL_HANDLE, 0, 0, 0, 0, 0, 0);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkGetDeviceQueue2:
|
||||
return Serialise_vkGetDeviceQueue2(ser, VK_NULL_HANDLE, NULL, NULL);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCmdDrawIndirectCountKHR:
|
||||
return Serialise_vkCmdDrawIndirectCountKHR(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0,
|
||||
VK_NULL_HANDLE, 0, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdDrawIndexedIndirectCountKHR:
|
||||
return Serialise_vkCmdDrawIndexedIndirectCountKHR(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0,
|
||||
VK_NULL_HANDLE, 0, 0, 0);
|
||||
break;
|
||||
|
||||
case VulkanChunk::vkCreateRenderPass2KHR:
|
||||
return Serialise_vkCreateRenderPass2KHR(ser, VK_NULL_HANDLE, NULL, NULL, NULL);
|
||||
@@ -3019,10 +2900,8 @@ bool WrappedVulkan::ProcessChunk(ReadSerialiser &ser, VulkanChunk chunk)
|
||||
}
|
||||
case VulkanChunk::vkResetQueryPoolEXT:
|
||||
return Serialise_vkResetQueryPoolEXT(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::vkCmdSetLineStippleEXT:
|
||||
return Serialise_vkCmdSetLineStippleEXT(ser, VK_NULL_HANDLE, 0, 0);
|
||||
break;
|
||||
case VulkanChunk::ImageRefs:
|
||||
{
|
||||
std::vector<ImgRefsPair> data;
|
||||
@@ -3658,7 +3537,7 @@ VkCommandBuffer WrappedVulkan::RerecordCmdBuf(ResourceId cmdid, PartialReplayInd
|
||||
|
||||
if(it == m_RerecordCmds.end())
|
||||
{
|
||||
RDCERR("Didn't generate re-record command for %llu", cmdid);
|
||||
RDCERR("Didn't generate re-record command for %s", ToStr(cmdid).c_str());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -699,6 +699,8 @@ private:
|
||||
struct DescriptorSetInfo
|
||||
{
|
||||
DescriptorSetInfo(bool p = false) : push(p) {}
|
||||
DescriptorSetInfo(const DescriptorSetInfo &) = default;
|
||||
DescriptorSetInfo &operator=(const DescriptorSetInfo &) = default;
|
||||
~DescriptorSetInfo() { clear(); }
|
||||
ResourceId layout;
|
||||
std::vector<DescriptorSetBindingElement *> currentBindings;
|
||||
|
||||
@@ -1501,7 +1501,7 @@ void VulkanDebugManager::GetBufferData(ResourceId buff, uint64_t offset, uint64_
|
||||
|
||||
if(res == VK_NULL_HANDLE)
|
||||
{
|
||||
RDCERR("Getting buffer data for unknown buffer/memory %llu!", buff);
|
||||
RDCERR("Getting buffer data for unknown buffer/memory %s!", ToStr(buff).c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -957,7 +957,7 @@ static TextureSwizzle Convert(VkComponentSwizzle s, int i)
|
||||
{
|
||||
switch(s)
|
||||
{
|
||||
default: RDCWARN("Unexpected component swizzle value %d", (int)s);
|
||||
default: RDCWARN("Unexpected component swizzle value %d", (int)s); DELIBERATE_FALLTHROUGH();
|
||||
case VK_COMPONENT_SWIZZLE_IDENTITY: break;
|
||||
case VK_COMPONENT_SWIZZLE_ZERO: return TextureSwizzle::Zero;
|
||||
case VK_COMPONENT_SWIZZLE_ONE: return TextureSwizzle::One;
|
||||
|
||||
@@ -89,6 +89,19 @@ struct DescSetLayout
|
||||
memcpy(immutableSampler, b.immutableSampler, sizeof(ResourceId) * descriptorCount);
|
||||
}
|
||||
}
|
||||
const Binding &operator=(const Binding &b)
|
||||
{
|
||||
descriptorType = b.descriptorType;
|
||||
descriptorCount = b.descriptorCount;
|
||||
stageFlags = b.stageFlags;
|
||||
SAFE_DELETE_ARRAY(immutableSampler);
|
||||
if(b.immutableSampler)
|
||||
{
|
||||
immutableSampler = new ResourceId[descriptorCount];
|
||||
memcpy(immutableSampler, b.immutableSampler, sizeof(ResourceId) * descriptorCount);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
~Binding() { SAFE_DELETE_ARRAY(immutableSampler); }
|
||||
VkDescriptorType descriptorType;
|
||||
uint32_t descriptorCount;
|
||||
|
||||
@@ -1311,7 +1311,7 @@ void WrappedVulkan::Create_InitialState(ResourceId id, WrappedVkRes *live, bool
|
||||
|
||||
if(m_ImageLayouts.find(liveid) == m_ImageLayouts.end())
|
||||
{
|
||||
RDCERR("Couldn't find image info for %llu", id);
|
||||
RDCERR("Couldn't find image info for %s", ToStr(id).c_str());
|
||||
GetResourceManager()->SetInitialContents(
|
||||
id, VkInitialContents(type, VkInitialContents::ClearColorImage));
|
||||
return;
|
||||
@@ -2232,13 +2232,13 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live, const VkInitialConten
|
||||
VkBuffer dstBuf = m_CreationInfo.m_Memory[id].wholeMemBuf;
|
||||
if(dstBuf == VK_NULL_HANDLE)
|
||||
{
|
||||
RDCERR("Whole memory buffer not present for %llu", id);
|
||||
RDCERR("Whole memory buffer not present for %s", ToStr(id).c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if(resetReq.size() == 1 && resetReq.begin()->value() == eInitReq_None)
|
||||
{
|
||||
RDCDEBUG("Apply_InitialState (Mem %llu): skipped", orig);
|
||||
RDCDEBUG("Apply_InitialState (Mem %s): skipped", ToStr(orig).c_str());
|
||||
return; // no copy or clear required
|
||||
}
|
||||
|
||||
@@ -2268,7 +2268,8 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live, const VkInitialConten
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
RDCDEBUG("Apply_InitialState (Mem %llu): %d fills, %d copies", orig, fillCount, regions.size());
|
||||
RDCDEBUG("Apply_InitialState (Mem %s): %d fills, %d copies", ToStr(orig).c_str(), fillCount,
|
||||
regions.size());
|
||||
if(regions.size() > 0)
|
||||
ObjDisp(cmd)->CmdCopyBuffer(Unwrap(cmd), Unwrap(srcBuf), Unwrap(dstBuf),
|
||||
(uint32_t)regions.size(), regions.data());
|
||||
|
||||
@@ -199,7 +199,7 @@ void VulkanResourceManager::RecordBarriers(std::vector<rdcpair<ResourceId, Image
|
||||
|
||||
if(id == ResourceId())
|
||||
{
|
||||
RDCERR("Couldn't get ID for image %p in barrier", t.image);
|
||||
RDCERR("Couldn't get ID for image %p in barrier", GetWrapped(t.image));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ bool VulkanResourceManager::Serialise_DeviceMemoryRefs(SerialiserType &ser,
|
||||
start = nextDWord;
|
||||
}
|
||||
}
|
||||
RDCASSERT("MemRefInterval starts must be increasing", start >= last);
|
||||
RDCASSERTMSG("MemRefInterval starts must be increasing", start >= last);
|
||||
|
||||
if(last < start)
|
||||
it_ints->split(start);
|
||||
|
||||
@@ -2682,7 +2682,7 @@ void VulkanReplay::FetchTessGSOut(uint32_t eventId)
|
||||
default:
|
||||
RDCERR("Unexpected output topology %s",
|
||||
ToStr(pipeInfo.shaders[stageIndex].patchData->outTopo).c_str());
|
||||
// deliberate fallthrough
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case Topology::TriangleList:
|
||||
case Topology::TriangleStrip:
|
||||
m_PostVS.Data[eventId].gsout.topo = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
|
||||
@@ -2806,7 +2806,7 @@ void VulkanReplay::GetTextureData(ResourceId tex, const Subresource &sub,
|
||||
|
||||
if(m_pDriver->m_CreationInfo.m_Image.find(tex) == m_pDriver->m_CreationInfo.m_Image.end())
|
||||
{
|
||||
RDCERR("Trying to get texture data for unknown ID %llu!", tex);
|
||||
RDCERR("Trying to get texture data for unknown ID %s!", ToStr(tex).c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,6 +186,10 @@ struct OptionalResources<Serialiser<SerialiserMode::Writing>>
|
||||
{
|
||||
}
|
||||
~OptionalResources<Serialiser<SerialiserMode::Writing>>() {}
|
||||
OptionalResources<Serialiser<SerialiserMode::Writing>>(
|
||||
const OptionalResources<Serialiser<SerialiserMode::Writing>> &) = default;
|
||||
OptionalResources<Serialiser<SerialiserMode::Writing>> &operator=(
|
||||
const OptionalResources<Serialiser<SerialiserMode::Writing>> &) = default;
|
||||
};
|
||||
|
||||
template <>
|
||||
@@ -196,6 +200,10 @@ struct OptionalResources<Serialiser<SerialiserMode::Reading>>
|
||||
Counter++;
|
||||
}
|
||||
~OptionalResources<Serialiser<SerialiserMode::Reading>>() { Counter--; }
|
||||
OptionalResources<Serialiser<SerialiserMode::Reading>>(
|
||||
const OptionalResources<Serialiser<SerialiserMode::Reading>> &) = default;
|
||||
OptionalResources<Serialiser<SerialiserMode::Reading>> &operator=(
|
||||
const OptionalResources<Serialiser<SerialiserMode::Reading>> &) = default;
|
||||
static int Counter;
|
||||
};
|
||||
|
||||
@@ -244,8 +252,8 @@ void DoSerialiseViaResourceId(SerialiserType &ser, type &el)
|
||||
{
|
||||
// It can be OK for a resource to have no live equivalent if the capture decided its not
|
||||
// needed, which some APIs do fairly often.
|
||||
RDCWARN("Capture may be missing reference to %s resource (%llu).", TypeName<type>().c_str(),
|
||||
id);
|
||||
RDCWARN("Capture may be missing reference to %s resource (%s).", TypeName<type>().c_str(),
|
||||
ToStr(id).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p
|
||||
rs.pNext = NULL;
|
||||
|
||||
rs.depthClampEnable = pipeInfo.depthClampEnable;
|
||||
rs.rasterizerDiscardEnable = pipeInfo.rasterizerDiscardEnable,
|
||||
rs.rasterizerDiscardEnable = pipeInfo.rasterizerDiscardEnable;
|
||||
rs.polygonMode = pipeInfo.polygonMode;
|
||||
rs.cullMode = pipeInfo.cullMode;
|
||||
rs.frontFace = pipeInfo.frontFace;
|
||||
|
||||
@@ -749,7 +749,7 @@ bool WrappedVulkan::Apply_SparseInitialState(WrappedVkBuffer *buf, const VkIniti
|
||||
if(dstBuf != VK_NULL_HANDLE)
|
||||
ObjDisp(cmd)->CmdCopyBuffer(Unwrap(cmd), Unwrap(srcBuf), Unwrap(dstBuf), 1, ®ion);
|
||||
else
|
||||
RDCERR("Whole memory buffer not present for %llu", id);
|
||||
RDCERR("Whole memory buffer not present for %s", ToStr(id).c_str());
|
||||
}
|
||||
|
||||
vkr = ObjDisp(cmd)->EndCommandBuffer(Unwrap(cmd));
|
||||
@@ -846,7 +846,7 @@ bool WrappedVulkan::Apply_SparseInitialState(WrappedVkImage *im, const VkInitial
|
||||
if(!info.pageBinds[a])
|
||||
continue;
|
||||
|
||||
imgBinds[bindsparse.imageBindCount].image = im->real.As<VkImage>(),
|
||||
imgBinds[bindsparse.imageBindCount].image = im->real.As<VkImage>();
|
||||
imgBinds[bindsparse.imageBindCount].bindCount = info.pageCount[a];
|
||||
imgBinds[bindsparse.imageBindCount].pBinds = info.pageBinds[a];
|
||||
|
||||
@@ -886,7 +886,7 @@ bool WrappedVulkan::Apply_SparseInitialState(WrappedVkImage *im, const VkInitial
|
||||
if(dstBuf != VK_NULL_HANDLE)
|
||||
ObjDisp(cmd)->CmdCopyBuffer(Unwrap(cmd), Unwrap(srcBuf), Unwrap(dstBuf), 1, ®ion);
|
||||
else
|
||||
RDCERR("Whole memory buffer not present for %llu", id);
|
||||
RDCERR("Whole memory buffer not present for %s", ToStr(id).c_str());
|
||||
}
|
||||
|
||||
vkr = ObjDisp(cmd)->EndCommandBuffer(Unwrap(cmd));
|
||||
|
||||
@@ -395,9 +395,10 @@ bool WrappedVulkan::Serialise_vkAllocateDescriptorSets(SerialiserType &ser, VkDe
|
||||
if(ret != VK_SUCCESS)
|
||||
{
|
||||
RDCWARN(
|
||||
"Failed to allocate descriptor set %llu from pool %llu on replay. Assuming pool was "
|
||||
"Failed to allocate descriptor set %s from pool %s on replay. Assuming pool was "
|
||||
"reset and re-used mid-capture, so overflowing.",
|
||||
DescriptorSet, GetResourceManager()->GetOriginalID(GetResID(AllocateInfo.descriptorPool)));
|
||||
ToStr(DescriptorSet).c_str(),
|
||||
ToStr(GetResourceManager()->GetOriginalID(GetResID(AllocateInfo.descriptorPool))).c_str());
|
||||
|
||||
VulkanCreationInfo::DescSetPool &poolInfo =
|
||||
m_CreationInfo.m_DescSetPool[GetResID(AllocateInfo.descriptorPool)];
|
||||
|
||||
@@ -196,8 +196,8 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(SerialiserType &ser, VkQueue queue,
|
||||
// before executing this, as we don't have the sync information to properly sync.
|
||||
if(m_PrevQueue != queue)
|
||||
{
|
||||
RDCDEBUG("Previous queue execution was on queue %llu, now executing %llu, syncing GPU",
|
||||
GetResID(m_PrevQueue), GetResID(queue));
|
||||
RDCDEBUG("Previous queue execution was on queue %s, now executing %s, syncing GPU",
|
||||
ToStr(GetResID(m_PrevQueue)).c_str(), ToStr(GetResID(queue)).c_str());
|
||||
if(m_PrevQueue != VK_NULL_HANDLE)
|
||||
ObjDisp(m_PrevQueue)->QueueWaitIdle(Unwrap(m_PrevQueue));
|
||||
|
||||
@@ -394,8 +394,8 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(SerialiserType &ser, VkQueue queue,
|
||||
VkCommandBuffer cmd = RerecordCmdBuf(cmdId);
|
||||
ResourceId rerecord = GetResID(cmd);
|
||||
#if ENABLED(VERBOSE_PARTIAL_REPLAY)
|
||||
RDCDEBUG("Queue Submit re-recorded replay of %llu, using %llu (%u -> %u <= %u)",
|
||||
cmdId, rerecord, eid, end, m_LastEventID);
|
||||
RDCDEBUG("Queue Submit re-recorded replay of %s, using %s (%u -> %u <= %u)",
|
||||
ToStr(cmdId).c_str(), ToStr(rerecord).c_str(), eid, end, m_LastEventID);
|
||||
#endif
|
||||
rerecordedCmds.push_back(Unwrap(cmd));
|
||||
|
||||
@@ -406,7 +406,7 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(SerialiserType &ser, VkQueue queue,
|
||||
else
|
||||
{
|
||||
#if ENABLED(VERBOSE_PARTIAL_REPLAY)
|
||||
RDCDEBUG("Queue not submitting %llu", cmdId);
|
||||
RDCDEBUG("Queue not submitting %s", ToStr(cmdId).c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -960,8 +960,8 @@ VkResult WrappedVulkan::vkQueueSubmit(VkQueue queue, uint32_t submitCount,
|
||||
// only need to flush memory that could affect this submitted batch of work
|
||||
if(refdIDs.find(record->GetResourceID()) == refdIDs.end())
|
||||
{
|
||||
RDCDEBUG("Map of memory %llu not referenced in this queue - not flushing",
|
||||
record->GetResourceID());
|
||||
RDCDEBUG("Map of memory %s not referenced in this queue - not flushing",
|
||||
ToStr(record->GetResourceID()).c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1007,8 +1007,8 @@ VkResult WrappedVulkan::vkQueueSubmit(VkQueue queue, uint32_t submitCount,
|
||||
VkDevice dev = GetDev();
|
||||
|
||||
{
|
||||
RDCLOG("Persistent map flush forced for %llu (%llu -> %llu)", record->GetResourceID(),
|
||||
(uint64_t)diffStart, (uint64_t)diffEnd);
|
||||
RDCLOG("Persistent map flush forced for %s (%llu -> %llu)",
|
||||
ToStr(record->GetResourceID()).c_str(), (uint64_t)diffStart, (uint64_t)diffEnd);
|
||||
VkMappedMemoryRange range = {VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, NULL,
|
||||
(VkDeviceMemory)(uint64_t)record->Resource,
|
||||
state.mapOffset + diffStart, diffEnd - diffStart};
|
||||
@@ -1020,7 +1020,8 @@ VkResult WrappedVulkan::vkQueueSubmit(VkQueue queue, uint32_t submitCount,
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCDEBUG("Persistent map flush not needed for %llu", record->GetResourceID());
|
||||
RDCDEBUG("Persistent map flush not needed for %s",
|
||||
ToStr(record->GetResourceID()).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,11 +207,11 @@ bool WrappedVulkan::CheckMemoryRequirements(const char *resourceName, ResourceId
|
||||
}
|
||||
|
||||
RDCERR(
|
||||
"Trying to bind %s to memory %llu which is type %u, "
|
||||
"Trying to bind %s to memory %s which is type %u, "
|
||||
"but only these types are allowed: %s\n"
|
||||
"This is most likely caused by incompatible hardware or drivers between capture and "
|
||||
"replay, causing a change in memory requirements.",
|
||||
resourceName, memOrigId, memInfo.memoryTypeIndex, bitsString.c_str());
|
||||
resourceName, ToStr(memOrigId).c_str(), memInfo.memoryTypeIndex, bitsString.c_str());
|
||||
m_FailedReplayStatus = ReplayStatus::APIHardwareUnsupported;
|
||||
return false;
|
||||
}
|
||||
@@ -220,11 +220,11 @@ bool WrappedVulkan::CheckMemoryRequirements(const char *resourceName, ResourceId
|
||||
if((memoryOffset % mrq.alignment) != 0)
|
||||
{
|
||||
RDCERR(
|
||||
"Trying to bind %s to memory %llu which is type %u, "
|
||||
"Trying to bind %s to memory %s which is type %u, "
|
||||
"but offset 0x%llx doesn't satisfy alignment 0x%llx.\n"
|
||||
"This is most likely caused by incompatible hardware or drivers between capture and "
|
||||
"replay, causing a change in memory requirements.",
|
||||
resourceName, memOrigId, memInfo.memoryTypeIndex, memoryOffset, mrq.alignment);
|
||||
resourceName, ToStr(memOrigId).c_str(), memInfo.memoryTypeIndex, memoryOffset, mrq.alignment);
|
||||
m_FailedReplayStatus = ReplayStatus::APIHardwareUnsupported;
|
||||
return false;
|
||||
}
|
||||
@@ -233,11 +233,12 @@ bool WrappedVulkan::CheckMemoryRequirements(const char *resourceName, ResourceId
|
||||
if(mrq.size > memInfo.size - memoryOffset)
|
||||
{
|
||||
RDCERR(
|
||||
"Trying to bind %s to memory %llu which is type %u, "
|
||||
"Trying to bind %s to memory %s which is type %u, "
|
||||
"but at offset 0x%llx the reported size of 0x%llx won't fit the 0x%llx bytes of memory.\n"
|
||||
"This is most likely caused by incompatible hardware or drivers between capture and "
|
||||
"replay, causing a change in memory requirements.",
|
||||
resourceName, memOrigId, memInfo.memoryTypeIndex, memoryOffset, mrq.size, memInfo.size);
|
||||
resourceName, ToStr(memOrigId).c_str(), memInfo.memoryTypeIndex, memoryOffset, mrq.size,
|
||||
memInfo.size);
|
||||
m_FailedReplayStatus = ReplayStatus::APIHardwareUnsupported;
|
||||
return false;
|
||||
}
|
||||
@@ -325,7 +326,7 @@ bool WrappedVulkan::Serialise_vkAllocateMemory(SerialiserType &ser, VkDevice dev
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCWARN("Can't create buffer covering memory allocation %llu", Memory);
|
||||
RDCWARN("Can't create buffer covering memory allocation %s", ToStr(Memory).c_str());
|
||||
ObjDisp(device)->DestroyBuffer(Unwrap(device), buf, NULL);
|
||||
|
||||
m_CreationInfo.m_Memory[live].wholeMemBuf = VK_NULL_HANDLE;
|
||||
@@ -907,8 +908,8 @@ bool WrappedVulkan::Serialise_vkBindBufferMemory(SerialiserType &ser, VkDevice d
|
||||
VkMemoryRequirements mrq = {};
|
||||
ObjDisp(device)->GetBufferMemoryRequirements(Unwrap(device), Unwrap(buffer), &mrq);
|
||||
|
||||
bool ok = CheckMemoryRequirements(StringFormat::Fmt("Buffer %llu", resOrigId).c_str(),
|
||||
GetResID(memory), memoryOffset, mrq);
|
||||
bool ok = CheckMemoryRequirements(("Buffer " + ToStr(resOrigId)).c_str(), GetResID(memory),
|
||||
memoryOffset, mrq);
|
||||
|
||||
if(!ok)
|
||||
return false;
|
||||
@@ -1008,8 +1009,8 @@ bool WrappedVulkan::Serialise_vkBindImageMemory(SerialiserType &ser, VkDevice de
|
||||
VkMemoryRequirements mrq = {};
|
||||
ObjDisp(device)->GetImageMemoryRequirements(Unwrap(device), Unwrap(image), &mrq);
|
||||
|
||||
bool ok = CheckMemoryRequirements(StringFormat::Fmt("Image %llu", resOrigId).c_str(),
|
||||
GetResID(memory), memoryOffset, mrq);
|
||||
bool ok = CheckMemoryRequirements(("Image " + ToStr(resOrigId)).c_str(), GetResID(memory),
|
||||
memoryOffset, mrq);
|
||||
|
||||
if(!ok)
|
||||
return false;
|
||||
@@ -2017,7 +2018,7 @@ bool WrappedVulkan::Serialise_vkBindBufferMemory2(SerialiserType &ser, VkDevice
|
||||
VkMemoryRequirements mrq = {};
|
||||
ObjDisp(device)->GetBufferMemoryRequirements(Unwrap(device), Unwrap(bindInfo.buffer), &mrq);
|
||||
|
||||
bool ok = CheckMemoryRequirements(StringFormat::Fmt("Buffer %llu", resOrigId).c_str(),
|
||||
bool ok = CheckMemoryRequirements(("Buffer " + ToStr(resOrigId)).c_str(),
|
||||
GetResID(bindInfo.memory), bindInfo.memoryOffset, mrq);
|
||||
|
||||
if(!ok)
|
||||
@@ -2132,7 +2133,7 @@ bool WrappedVulkan::Serialise_vkBindImageMemory2(SerialiserType &ser, VkDevice d
|
||||
VkMemoryRequirements mrq = {};
|
||||
ObjDisp(device)->GetImageMemoryRequirements(Unwrap(device), Unwrap(bindInfo.image), &mrq);
|
||||
|
||||
bool ok = CheckMemoryRequirements(StringFormat::Fmt("Image %llu", resOrigId).c_str(),
|
||||
bool ok = CheckMemoryRequirements(("Image " + ToStr(resOrigId)).c_str(),
|
||||
GetResID(bindInfo.memory), bindInfo.memoryOffset, mrq);
|
||||
|
||||
if(!ok)
|
||||
|
||||
@@ -555,8 +555,8 @@ VkResult WrappedVulkan::vkCreateGraphicsPipelines(VkDevice device, VkPipelineCac
|
||||
VkResourceRecord *baserecord = GetRecord(pCreateInfos[i].basePipelineHandle);
|
||||
record->AddParent(baserecord);
|
||||
|
||||
RDCDEBUG("Creating pipeline %llu base is %llu", record->GetResourceID(),
|
||||
baserecord->GetResourceID());
|
||||
RDCDEBUG("Creating pipeline %s base is %s", ToStr(record->GetResourceID()).c_str(),
|
||||
ToStr(baserecord->GetResourceID()).c_str());
|
||||
}
|
||||
else if(pCreateInfos[i].basePipelineIndex != -1 &&
|
||||
pCreateInfos[i].basePipelineIndex < (int)i)
|
||||
|
||||
@@ -453,6 +453,8 @@ inline uint64_t CountLeadingZeroes(uint64_t value);
|
||||
// OS_DEBUG_BREAK() - instruction that debugbreaks the debugger - define instead of function to
|
||||
// preserve callstacks
|
||||
// EndianSwapXX() for XX = 16, 32, 64
|
||||
// DELIBERATE_FALLTHROUGH(); - maps either to something to silence deliberate fallthrough warnings,
|
||||
// or an empty string, depending on compiler support
|
||||
|
||||
#if ENABLED(RDOC_WIN32)
|
||||
#include "win32/win32_specific.h"
|
||||
|
||||
@@ -46,11 +46,11 @@ public:
|
||||
void Set(uint64_t *calls, size_t num)
|
||||
{
|
||||
numLevels = num;
|
||||
for(int i = 0; i < numLevels; i++)
|
||||
for(size_t i = 0; i < numLevels; i++)
|
||||
addrs[i] = calls[i];
|
||||
}
|
||||
|
||||
size_t NumLevels() const { return size_t(numLevels); }
|
||||
size_t NumLevels() const { return numLevels; }
|
||||
const uint64_t *GetAddrs() const { return addrs; }
|
||||
private:
|
||||
LinuxCallstack(const Callstack::Stackwalk &other);
|
||||
@@ -59,7 +59,11 @@ private:
|
||||
{
|
||||
void *addrs_ptr[ARRAY_COUNT(addrs)];
|
||||
|
||||
numLevels = backtrace(addrs_ptr, ARRAY_COUNT(addrs));
|
||||
int ret = backtrace(addrs_ptr, ARRAY_COUNT(addrs));
|
||||
|
||||
numLevels = 0;
|
||||
if(ret > 0)
|
||||
numLevels = (size_t)ret;
|
||||
|
||||
int offs = 0;
|
||||
// if we want to trim levels of the stack, we can do that here
|
||||
@@ -70,12 +74,12 @@ private:
|
||||
numLevels--;
|
||||
}
|
||||
|
||||
for(int i = 0; i < numLevels; i++)
|
||||
for(size_t i = 0; i < numLevels; i++)
|
||||
addrs[i] = (uint64_t)addrs_ptr[i + offs];
|
||||
}
|
||||
|
||||
uint64_t addrs[128];
|
||||
int numLevels;
|
||||
size_t numLevels;
|
||||
};
|
||||
|
||||
namespace Callstack
|
||||
|
||||
@@ -30,6 +30,25 @@
|
||||
|
||||
#define __PRETTY_FUNCTION_SIGNATURE__ __PRETTY_FUNCTION__
|
||||
|
||||
// this works on all supported clang versions
|
||||
#if defined(__clang__)
|
||||
|
||||
#define DELIBERATE_FALLTHROUGH() [[clang::fallthrough]]
|
||||
|
||||
// works on GCC 7.0 and up. Before then there was no warning, so we're fine
|
||||
#elif defined(__GNUC__) && (__GNUC__ >= 7)
|
||||
|
||||
#define DELIBERATE_FALLTHROUGH() __attribute__((fallthrough))
|
||||
|
||||
#else
|
||||
|
||||
#define DELIBERATE_FALLTHROUGH() \
|
||||
do \
|
||||
{ \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
||||
#define OS_DEBUG_BREAK() raise(SIGTRAP)
|
||||
|
||||
#if ENABLED(RDOC_APPLE)
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
|
||||
#define OS_DEBUG_BREAK() __debugbreak()
|
||||
|
||||
#define DELIBERATE_FALLTHROUGH() \
|
||||
do \
|
||||
{ \
|
||||
} while(0)
|
||||
|
||||
#define EndianSwap16(x) _byteswap_ushort(x)
|
||||
#define EndianSwap32(x) _byteswap_ulong(x)
|
||||
#define EndianSwap64(x) _byteswap_uint64(x)
|
||||
|
||||
@@ -600,9 +600,7 @@ TEST_CASE("Test string type", "[basictypes][string]")
|
||||
|
||||
SECTION("Empty string after containing data")
|
||||
{
|
||||
rdcstr test;
|
||||
|
||||
auto lambda = [](rdcstr test, const char *str) {
|
||||
auto lambda = [](rdcstr test, const char *c_str) {
|
||||
test.clear();
|
||||
|
||||
CHECK(test.size() == 0);
|
||||
|
||||
@@ -300,10 +300,10 @@ ReplayStatus CaptureFile::Init()
|
||||
|
||||
switch(m_RDC->ErrorCode())
|
||||
{
|
||||
case ContainerError::FileNotFound: return ReplayStatus::FileNotFound; break;
|
||||
case ContainerError::FileIO: return ReplayStatus::FileIOFailed; break;
|
||||
case ContainerError::Corrupt: return ReplayStatus::FileCorrupted; break;
|
||||
case ContainerError::UnsupportedVersion: return ReplayStatus::FileIncompatibleVersion; break;
|
||||
case ContainerError::FileNotFound: return ReplayStatus::FileNotFound;
|
||||
case ContainerError::FileIO: return ReplayStatus::FileIOFailed;
|
||||
case ContainerError::Corrupt: return ReplayStatus::FileCorrupted;
|
||||
case ContainerError::UnsupportedVersion: return ReplayStatus::FileIncompatibleVersion;
|
||||
case ContainerError::NoError:
|
||||
{
|
||||
RDCDriver driverType = m_RDC->GetDriver();
|
||||
@@ -457,8 +457,8 @@ ReplayStatus CaptureFile::Convert(const char *filename, const char *filetype, co
|
||||
{
|
||||
switch(output.ErrorCode())
|
||||
{
|
||||
case ContainerError::FileNotFound: return ReplayStatus::FileNotFound; break;
|
||||
case ContainerError::FileIO: return ReplayStatus::FileIOFailed; break;
|
||||
case ContainerError::FileNotFound: return ReplayStatus::FileNotFound;
|
||||
case ContainerError::FileIO: return ReplayStatus::FileIOFailed;
|
||||
default: break;
|
||||
}
|
||||
return ReplayStatus::InternalError;
|
||||
|
||||
@@ -371,9 +371,9 @@ RENDERDOC_InjectIntoProcess(uint32_t pid, const rdcarray<EnvironmentModification
|
||||
return Process::InjectIntoProcess(pid, env, capturefile, opts, waitForExit != 0);
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_FreeArrayMem(const void *mem)
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_FreeArrayMem(void *mem)
|
||||
{
|
||||
free((void *)mem);
|
||||
free(mem);
|
||||
}
|
||||
|
||||
// not exported, this is needed for calling from the container allocate functions
|
||||
|
||||
@@ -643,7 +643,7 @@ bytebuf ReplayController::GetBufferData(ResourceId buff, uint64_t offset, uint64
|
||||
|
||||
if(liveId == ResourceId())
|
||||
{
|
||||
RDCERR("Couldn't get Live ID for %llu getting buffer data", buff);
|
||||
RDCERR("Couldn't get Live ID for %s getting buffer data", ToStr(buff).c_str());
|
||||
return retData;
|
||||
}
|
||||
|
||||
@@ -662,7 +662,7 @@ bytebuf ReplayController::GetTextureData(ResourceId tex, const Subresource &sub)
|
||||
|
||||
if(liveId == ResourceId())
|
||||
{
|
||||
RDCERR("Couldn't get Live ID for %llu getting texture data", tex);
|
||||
RDCERR("Couldn't get Live ID for %s getting texture data", ToStr(tex).c_str());
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path
|
||||
|
||||
if(liveid == ResourceId())
|
||||
{
|
||||
RDCERR("Couldn't get Live ID for %llu getting texture data", sd.resourceId);
|
||||
RDCERR("Couldn't get Live ID for %s getting texture data", ToStr(sd.resourceId).c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1168,15 +1168,15 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path
|
||||
case 4:
|
||||
memcpy(&subdata[0][(y * td.width + x) * pixelStride + 3 * compWidth], &max,
|
||||
td.format.compByteWidth);
|
||||
// deliberate fallthrough
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case 3:
|
||||
memcpy(&subdata[0][(y * td.width + x) * pixelStride + 2 * compWidth], &val,
|
||||
td.format.compByteWidth);
|
||||
// deliberate fallthrough
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case 2:
|
||||
memcpy(&subdata[0][(y * td.width + x) * pixelStride + 1 * compWidth], &val,
|
||||
td.format.compByteWidth);
|
||||
// deliberate fallthrough
|
||||
DELIBERATE_FALLTHROUGH();
|
||||
case 1:
|
||||
memcpy(&subdata[0][(y * td.width + x) * pixelStride + 0 * compWidth], &val,
|
||||
td.format.compByteWidth);
|
||||
@@ -1570,7 +1570,7 @@ rdcarray<PixelModification> ReplayController::PixelHistory(ResourceId target, ui
|
||||
{
|
||||
if(x >= m_Textures[t].width || y >= m_Textures[t].height)
|
||||
{
|
||||
RDCDEBUG("PixelHistory out of bounds on %llu (%u,%u) vs (%u,%u)", target, x, y,
|
||||
RDCDEBUG("PixelHistory out of bounds on %s (%u,%u) vs (%u,%u)", ToStr(target).c_str(), x, y,
|
||||
m_Textures[t].width, m_Textures[t].height);
|
||||
return ret;
|
||||
}
|
||||
@@ -1659,7 +1659,7 @@ rdcarray<PixelModification> ReplayController::PixelHistory(ResourceId target, ui
|
||||
|
||||
if(events.empty())
|
||||
{
|
||||
RDCDEBUG("Target %llu not written to before %u", target, m_EventID);
|
||||
RDCDEBUG("Target %s not written to before %u", ToStr(target).c_str(), m_EventID);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -308,29 +308,11 @@ void PatchTriangleFanRestartIndexBufer(std::vector<uint32_t> &patchedIndices, ui
|
||||
|
||||
// output 3 dummy degenerate triangles so vertex ID mapping is easy
|
||||
// we rotate the triangles so the important vertex is last in each.
|
||||
newIndices.push_back(restartIndex);
|
||||
newIndices.push_back(restartIndex);
|
||||
newIndices.push_back(restartIndex);
|
||||
|
||||
if(1)
|
||||
for(size_t dummy = 0; dummy < 3; dummy++)
|
||||
{
|
||||
newIndices.push_back(restartIndex);
|
||||
newIndices.push_back(restartIndex);
|
||||
newIndices.push_back(restartIndex);
|
||||
|
||||
newIndices.push_back(restartIndex);
|
||||
newIndices.push_back(restartIndex);
|
||||
newIndices.push_back(restartIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
newIndices.push_back(next[0]);
|
||||
newIndices.push_back(next[1]);
|
||||
newIndices.push_back(firstIndex);
|
||||
|
||||
newIndices.push_back(next[1]);
|
||||
newIndices.push_back(firstIndex);
|
||||
newIndices.push_back(next[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ static void HexDecode(const char *str, const char *end, std::vector<byte> &out)
|
||||
{
|
||||
if(IsHex(str[0]) && IsHex(str[1]))
|
||||
{
|
||||
out.push_back((FromHex(str[0]) << 4) | FromHex(str[1]));
|
||||
out.push_back(byte((FromHex(str[0]) << 4) | FromHex(str[1])));
|
||||
|
||||
str += 2;
|
||||
|
||||
|
||||
@@ -646,7 +646,8 @@ public:
|
||||
Serialise(name, str, flags);
|
||||
if(str.length() >= N)
|
||||
{
|
||||
RDCWARN("Serialising string too large for fixed-size array '%s', will be truncated", name);
|
||||
RDCWARN("Serialising string too large for fixed-size array '%s', will be truncated",
|
||||
name.c_str());
|
||||
memcpy(el, str.c_str(), N - 1);
|
||||
el[N - 1] = 0;
|
||||
}
|
||||
|
||||
@@ -249,15 +249,15 @@ TEST_CASE("Test stream I/O operations over the network", "[streamio][network]")
|
||||
});
|
||||
|
||||
recvThread = Threading::CreateThread([&threadB, &reader, &receivedValues]() {
|
||||
uint64_t vals[10];
|
||||
uint64_t tmp[10];
|
||||
|
||||
reader.Read(vals);
|
||||
reader.Read(tmp);
|
||||
|
||||
// keep reading indefinitely until we hit an error (i.e. socket disconnected)
|
||||
while(!reader.IsErrored())
|
||||
{
|
||||
receivedValues.insert(receivedValues.end(), vals, vals + ARRAY_COUNT(vals));
|
||||
reader.Read(vals);
|
||||
receivedValues.insert(receivedValues.end(), tmp, tmp + ARRAY_COUNT(tmp));
|
||||
reader.Read(tmp);
|
||||
}
|
||||
|
||||
Atomic::Inc32(&threadB);
|
||||
|
||||
@@ -92,6 +92,20 @@
|
||||
...
|
||||
obj:*libdbus-1.so*
|
||||
}
|
||||
{
|
||||
GTKLeak
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: all
|
||||
...
|
||||
obj:*libgtk-3.so*
|
||||
}
|
||||
{
|
||||
ResourcesLeak
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: all
|
||||
...
|
||||
fun:_ZN9Resources10InitialiseEv
|
||||
}
|
||||
{
|
||||
QtPostEventLeak
|
||||
Memcheck:Leak
|
||||
|
||||
Reference in New Issue
Block a user