mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-04 13:50:59 +00:00
Normalise and make python/public interface more consistent
* We enforce a naming scheme more strongly - types, member functions, and enum values must be UpperCaseCamel, and member variables must be lowerCaseCamel. No underscores allowed. * eventId not eventID or EID, and Id preferred to ID in general. Also for resourceId. * Removed some lingering hungarian m_Foo naming. * Some pipeline state structs that are almost identical between the different APIs are pulled out into common structs. Where something doesn't make sense (e.g. viewport enable for vulkan) it will just be set to a sensible default (in that case always true). * Changed scissors to be x/y & width/height instead of sometimes left/top/right/bottom * Abbreviations are discouraged, e.g. operation not op, function not func.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -35,42 +35,42 @@ struct BoundResource
|
||||
DOCUMENT("");
|
||||
BoundResource()
|
||||
{
|
||||
Id = ResourceId();
|
||||
HighestMip = -1;
|
||||
FirstSlice = -1;
|
||||
resourceId = ResourceId();
|
||||
firstMip = -1;
|
||||
firstSlice = -1;
|
||||
typeHint = CompType::Typeless;
|
||||
}
|
||||
BoundResource(ResourceId id)
|
||||
{
|
||||
Id = id;
|
||||
HighestMip = -1;
|
||||
FirstSlice = -1;
|
||||
resourceId = id;
|
||||
firstMip = -1;
|
||||
firstSlice = -1;
|
||||
typeHint = CompType::Typeless;
|
||||
}
|
||||
|
||||
bool operator==(const BoundResource &o) const
|
||||
{
|
||||
return Id == o.Id && HighestMip == o.HighestMip && FirstSlice == o.FirstSlice &&
|
||||
return resourceId == o.resourceId && firstMip == o.firstMip && firstSlice == o.firstSlice &&
|
||||
typeHint == o.typeHint;
|
||||
}
|
||||
bool operator<(const BoundResource &o) const
|
||||
{
|
||||
if(Id != o.Id)
|
||||
return Id < o.Id;
|
||||
if(HighestMip != o.HighestMip)
|
||||
return HighestMip < o.HighestMip;
|
||||
if(FirstSlice != o.FirstSlice)
|
||||
return FirstSlice < o.FirstSlice;
|
||||
if(resourceId != o.resourceId)
|
||||
return resourceId < o.resourceId;
|
||||
if(firstMip != o.firstMip)
|
||||
return firstMip < o.firstMip;
|
||||
if(firstSlice != o.firstSlice)
|
||||
return firstSlice < o.firstSlice;
|
||||
if(typeHint != o.typeHint)
|
||||
return typeHint < o.typeHint;
|
||||
return false;
|
||||
}
|
||||
DOCUMENT("A :class:`~renderdoc.ResourceId` identifying the bound resource.");
|
||||
ResourceId Id;
|
||||
ResourceId resourceId;
|
||||
DOCUMENT("For textures, the highest mip level available on this binding, or -1 for all mips");
|
||||
int HighestMip;
|
||||
int firstMip;
|
||||
DOCUMENT("For textures, the first array slice available on this binding. or -1 for all slices.");
|
||||
int FirstSlice;
|
||||
int firstSlice;
|
||||
DOCUMENT(
|
||||
"For textures, a :class:`~renderdoc.CompType` hint for how to interpret typeless textures.");
|
||||
CompType typeHint;
|
||||
@@ -86,61 +86,58 @@ struct BoundResourceArray
|
||||
{
|
||||
DOCUMENT("");
|
||||
BoundResourceArray() = default;
|
||||
BoundResourceArray(BindpointMap b) : BindPoint(b) {}
|
||||
BoundResourceArray(BindpointMap b, const rdcarray<BoundResource> &r) : BindPoint(b), Resources(r)
|
||||
{
|
||||
}
|
||||
|
||||
BoundResourceArray(Bindpoint b) : bindPoint(b) {}
|
||||
BoundResourceArray(Bindpoint b, const rdcarray<BoundResource> &r) : bindPoint(b), resources(r) {}
|
||||
// for convenience for searching the array, we compare only using the BindPoint
|
||||
bool operator==(const BoundResourceArray &o) const { return BindPoint == o.BindPoint; }
|
||||
bool operator!=(const BoundResourceArray &o) const { return !(BindPoint == o.BindPoint); }
|
||||
bool operator<(const BoundResourceArray &o) const { return BindPoint < o.BindPoint; }
|
||||
bool operator==(const BoundResourceArray &o) const { return bindPoint == o.bindPoint; }
|
||||
bool operator!=(const BoundResourceArray &o) const { return !(bindPoint == o.bindPoint); }
|
||||
bool operator<(const BoundResourceArray &o) const { return bindPoint < o.bindPoint; }
|
||||
DOCUMENT("The bind point for this array of bound resources.");
|
||||
BindpointMap BindPoint;
|
||||
Bindpoint bindPoint;
|
||||
|
||||
DOCUMENT("The resources at this bind point");
|
||||
rdcarray<BoundResource> Resources;
|
||||
rdcarray<BoundResource> resources;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(BoundResourceArray);
|
||||
|
||||
DOCUMENT("Information about a single vertex or index buffer binding.");
|
||||
struct BoundBuffer
|
||||
struct BoundVBuffer
|
||||
{
|
||||
DOCUMENT("");
|
||||
bool operator==(const BoundBuffer &o) const
|
||||
bool operator==(const BoundVBuffer &o) const
|
||||
{
|
||||
return Buffer == o.Buffer && ByteOffset == o.ByteOffset && ByteStride == o.ByteStride;
|
||||
return resourceId == o.resourceId && byteOffset == o.byteOffset && byteStride == o.byteStride;
|
||||
}
|
||||
bool operator<(const BoundBuffer &o) const
|
||||
bool operator<(const BoundVBuffer &o) const
|
||||
{
|
||||
if(Buffer != o.Buffer)
|
||||
return Buffer < o.Buffer;
|
||||
if(ByteOffset != o.ByteOffset)
|
||||
return ByteOffset < o.ByteOffset;
|
||||
if(ByteStride != o.ByteStride)
|
||||
return ByteStride < o.ByteStride;
|
||||
if(resourceId != o.resourceId)
|
||||
return resourceId < o.resourceId;
|
||||
if(byteOffset != o.byteOffset)
|
||||
return byteOffset < o.byteOffset;
|
||||
if(byteStride != o.byteStride)
|
||||
return byteStride < o.byteStride;
|
||||
return false;
|
||||
}
|
||||
DOCUMENT("A :class:`~renderdoc.ResourceId` identifying the buffer.");
|
||||
ResourceId Buffer;
|
||||
ResourceId resourceId;
|
||||
DOCUMENT("The offset in bytes from the start of the buffer to the data.");
|
||||
uint64_t ByteOffset = 0;
|
||||
uint64_t byteOffset = 0;
|
||||
DOCUMENT("The stride in bytes between the start of one element and the start of the next.");
|
||||
uint32_t ByteStride = 0;
|
||||
uint32_t byteStride = 0;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(BoundBuffer);
|
||||
DECLARE_REFLECTION_STRUCT(BoundVBuffer);
|
||||
|
||||
DOCUMENT("Information about a single constant buffer binding.");
|
||||
struct BoundCBuffer
|
||||
{
|
||||
DOCUMENT("A :class:`~renderdoc.ResourceId` identifying the buffer.");
|
||||
ResourceId Buffer;
|
||||
ResourceId resourceId;
|
||||
DOCUMENT("The offset in bytes from the start of the buffer to the constant data.");
|
||||
uint64_t ByteOffset = 0;
|
||||
uint64_t byteOffset = 0;
|
||||
DOCUMENT("The size in bytes for the constant buffer. Access outside this size returns 0.");
|
||||
uint32_t ByteSize = 0;
|
||||
uint32_t byteSize = 0;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(BoundCBuffer);
|
||||
@@ -151,76 +148,60 @@ struct VertexInputAttribute
|
||||
DOCUMENT("");
|
||||
bool operator==(const VertexInputAttribute &o) const
|
||||
{
|
||||
return Name == o.Name && VertexBuffer == o.VertexBuffer &&
|
||||
RelativeByteOffset == o.RelativeByteOffset && PerInstance == o.PerInstance &&
|
||||
InstanceRate == o.InstanceRate && Format == o.Format &&
|
||||
!memcmp(&GenericValue, &o.GenericValue, sizeof(GenericValue)) &&
|
||||
GenericEnabled == o.GenericEnabled && Used == o.Used;
|
||||
return name == o.name && vertexBuffer == o.vertexBuffer && byteOffset == o.byteOffset &&
|
||||
perInstance == o.perInstance && instanceRate == o.instanceRate && format == o.format &&
|
||||
!memcmp(&genericValue, &o.genericValue, sizeof(genericValue)) &&
|
||||
genericEnabled == o.genericEnabled && used == o.used;
|
||||
}
|
||||
bool operator<(const VertexInputAttribute &o) const
|
||||
{
|
||||
if(Name != o.Name)
|
||||
return Name < o.Name;
|
||||
if(VertexBuffer != o.VertexBuffer)
|
||||
return VertexBuffer < o.VertexBuffer;
|
||||
if(RelativeByteOffset != o.RelativeByteOffset)
|
||||
return RelativeByteOffset < o.RelativeByteOffset;
|
||||
if(PerInstance != o.PerInstance)
|
||||
return PerInstance < o.PerInstance;
|
||||
if(InstanceRate != o.InstanceRate)
|
||||
return InstanceRate < o.InstanceRate;
|
||||
if(Format != o.Format)
|
||||
return Format < o.Format;
|
||||
if(memcmp(&GenericValue, &o.GenericValue, sizeof(GenericValue)) < 0)
|
||||
if(name != o.name)
|
||||
return name < o.name;
|
||||
if(vertexBuffer != o.vertexBuffer)
|
||||
return vertexBuffer < o.vertexBuffer;
|
||||
if(byteOffset != o.byteOffset)
|
||||
return byteOffset < o.byteOffset;
|
||||
if(perInstance != o.perInstance)
|
||||
return perInstance < o.perInstance;
|
||||
if(instanceRate != o.instanceRate)
|
||||
return instanceRate < o.instanceRate;
|
||||
if(format != o.format)
|
||||
return format < o.format;
|
||||
if(memcmp(&genericValue, &o.genericValue, sizeof(genericValue)) < 0)
|
||||
return true;
|
||||
if(GenericEnabled != o.GenericEnabled)
|
||||
return GenericEnabled < o.GenericEnabled;
|
||||
if(Used != o.Used)
|
||||
return Used < o.Used;
|
||||
if(genericEnabled != o.genericEnabled)
|
||||
return genericEnabled < o.genericEnabled;
|
||||
if(used != o.used)
|
||||
return used < o.used;
|
||||
return false;
|
||||
}
|
||||
|
||||
DOCUMENT("The name of this input. This may be a variable name or a semantic name.");
|
||||
rdcstr Name;
|
||||
rdcstr name;
|
||||
DOCUMENT("The index of the vertex buffer used to provide this attribute.");
|
||||
int VertexBuffer;
|
||||
int vertexBuffer;
|
||||
DOCUMENT("The byte offset from the start of the vertex data for this VB to this attribute.");
|
||||
uint32_t RelativeByteOffset;
|
||||
uint32_t byteOffset;
|
||||
DOCUMENT("``True`` if this attribute runs at instance rate.");
|
||||
bool PerInstance;
|
||||
DOCUMENT(R"(If :data:`PerInstance` is ``True``, the number of instances that source the same value
|
||||
bool perInstance;
|
||||
DOCUMENT(R"(If :data:`perInstance` is ``True``, the number of instances that source the same value
|
||||
from the vertex buffer before advancing to the next value.
|
||||
)");
|
||||
int InstanceRate;
|
||||
int instanceRate;
|
||||
DOCUMENT("A :class:`~renderdoc.ResourceFormat` with the interpreted format of this attribute.");
|
||||
ResourceFormat Format;
|
||||
ResourceFormat format;
|
||||
DOCUMENT(R"(A :class:`~renderdoc.PixelValue` with the generic value for this attribute if it has
|
||||
no VB bound.
|
||||
)");
|
||||
PixelValue GenericValue;
|
||||
DOCUMENT("``True`` if this attribute is using :data:`GenericValue` for its data.");
|
||||
bool GenericEnabled;
|
||||
PixelValue genericValue;
|
||||
DOCUMENT("``True`` if this attribute is using :data:`genericValue` for its data.");
|
||||
bool genericEnabled;
|
||||
DOCUMENT("``True`` if this attribute is enabled and used by the vertex shader.");
|
||||
bool Used;
|
||||
bool used;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(VertexInputAttribute);
|
||||
|
||||
DOCUMENT("Information about a viewport.");
|
||||
struct Viewport
|
||||
{
|
||||
DOCUMENT("The X co-ordinate of the viewport.");
|
||||
float x;
|
||||
DOCUMENT("The Y co-ordinate of the viewport.");
|
||||
float y;
|
||||
DOCUMENT("The width of the viewport.");
|
||||
float width;
|
||||
DOCUMENT("The height of the viewport.");
|
||||
float height;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(Viewport);
|
||||
|
||||
DOCUMENT(R"(An API-agnostic view of the common aspects of the pipeline state. This allows simple
|
||||
access to e.g. find out the bound resources or vertex buffers, or certain pipeline state which is
|
||||
available on all APIs.
|
||||
@@ -235,10 +216,10 @@ public:
|
||||
DOCUMENT(R"(Set the source API-specific states to read data from.
|
||||
|
||||
:param ~renderdoc.APIProperties props: The properties of the current capture.
|
||||
:param ~renderdoc.D3D11_State d3d11: The D3D11 state.
|
||||
:param ~renderdoc.D3D12_State d3d12: The D3D11 state.
|
||||
:param ~renderdoc.GL_State gl: The OpenGL state.
|
||||
:param ~renderdoc.VK_State vk: The Vulkan state.
|
||||
:param ~renderdoc.D3D11State d3d11: The D3D11 state.
|
||||
:param ~renderdoc.D3D12State d3d12: The D3D11 state.
|
||||
:param ~renderdoc.GLState gl: The OpenGL state.
|
||||
:param ~renderdoc.VKState vk: The Vulkan state.
|
||||
)");
|
||||
void SetStates(APIProperties props, const D3D11Pipe::State *d3d11, const D3D12Pipe::State *d3d12,
|
||||
const GLPipe::State *gl, const VKPipe::State *vk)
|
||||
@@ -253,7 +234,7 @@ public:
|
||||
DOCUMENT(
|
||||
"The default :class:`~renderdoc.GraphicsAPI` to pretend to contain, if no capture is "
|
||||
"loaded.");
|
||||
GraphicsAPI DefaultType = GraphicsAPI::D3D11;
|
||||
GraphicsAPI defaultType = GraphicsAPI::D3D11;
|
||||
|
||||
DOCUMENT(R"(Determines whether or not a capture is currently loaded.
|
||||
|
||||
@@ -317,16 +298,16 @@ public:
|
||||
if(IsCaptureLoaded())
|
||||
{
|
||||
if(IsCaptureD3D11())
|
||||
return m_D3D11 != NULL && m_D3D11->m_HS.Object != ResourceId();
|
||||
return m_D3D11 != NULL && m_D3D11->hullShader.resourceId != ResourceId();
|
||||
|
||||
if(IsCaptureD3D12())
|
||||
return m_D3D12 != NULL && m_D3D12->m_HS.Object != ResourceId();
|
||||
return m_D3D12 != NULL && m_D3D12->hullShader.resourceId != ResourceId();
|
||||
|
||||
if(IsCaptureGL())
|
||||
return m_GL != NULL && m_GL->m_TES.Object != ResourceId();
|
||||
return m_GL != NULL && m_GL->tessEvalShader.shaderResourceId != ResourceId();
|
||||
|
||||
if(IsCaptureVK())
|
||||
return m_Vulkan != NULL && m_Vulkan->m_TES.Object != ResourceId();
|
||||
return m_Vulkan != NULL && m_Vulkan->tessEvalShader.resourceId != ResourceId();
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -377,12 +358,20 @@ requirements.
|
||||
|
||||
DOCUMENT(R"(Retrieves the viewport for a given index.
|
||||
|
||||
:param int index: The viewport index to retrieve.
|
||||
:param int index: The index to retrieve.
|
||||
:return: The viewport for the given index.
|
||||
:rtype: Viewport
|
||||
:rtype: ~renderdoc.Viewport
|
||||
)");
|
||||
Viewport GetViewport(int index);
|
||||
|
||||
DOCUMENT(R"(Retrieves the scissor region for a given index.
|
||||
|
||||
:param int index: The index to retrieve.
|
||||
:return: The scissor region for the given index.
|
||||
:rtype: ~renderdoc.Scissor
|
||||
)");
|
||||
Scissor GetScissor(int index);
|
||||
|
||||
DOCUMENT(R"(Retrieves the current bindpoint mapping for a shader stage.
|
||||
|
||||
This returns an empty bindpoint mapping if no shader is bound.
|
||||
@@ -454,10 +443,10 @@ Typically this is ``glsl`` or ``hlsl``.
|
||||
|
||||
DOCUMENT(R"(Retrieves the current index buffer binding.
|
||||
|
||||
:return: A :class:`BoundBuffer` with the index buffer details. The stride is always 0.
|
||||
:rtype: ``BoundBuffer``
|
||||
:return: A :class:`BoundVBuffer` with the index buffer details. The stride is always 0.
|
||||
:rtype: ``BoundVBuffer``
|
||||
)");
|
||||
BoundBuffer GetIBuffer();
|
||||
BoundVBuffer GetIBuffer();
|
||||
|
||||
DOCUMENT(R"(Determines whether or not primitive restart is enabled.
|
||||
|
||||
@@ -477,9 +466,9 @@ Typically this is ``glsl`` or ``hlsl``.
|
||||
DOCUMENT(R"(Retrieves the currently bound vertex buffers.
|
||||
|
||||
:return: The list of bound vertex buffers.
|
||||
:rtype: ``list`` of :class:`BoundBuffer`.
|
||||
:rtype: ``list`` of :class:`BoundVBuffer`.
|
||||
)");
|
||||
rdcarray<BoundBuffer> GetVBuffers();
|
||||
rdcarray<BoundVBuffer> GetVBuffers();
|
||||
|
||||
DOCUMENT(R"(Retrieves the currently specified vertex attributes.
|
||||
|
||||
@@ -522,7 +511,7 @@ Typically this is ``glsl`` or ``hlsl``.
|
||||
)");
|
||||
BoundResource GetDepthTarget();
|
||||
|
||||
DOCUMENT(R"(Retrieves the resources bound to the colour outputs.
|
||||
DOCUMENT(R"(Retrieves the resources bound to the color outputs.
|
||||
|
||||
:return: The currently bound output targets.
|
||||
:rtype: ``list`` of :class:`BoundResource`.
|
||||
|
||||
@@ -184,10 +184,10 @@ void PersistantConfig::AddAndroidHosts()
|
||||
QMap<rdcstr, RemoteHost *> oldHosts;
|
||||
for(int i = RemoteHosts.count() - 1; i >= 0; i--)
|
||||
{
|
||||
if(RemoteHosts[i]->IsHostADB())
|
||||
if(RemoteHosts[i]->IsADB())
|
||||
{
|
||||
RemoteHost *host = RemoteHosts.takeAt(i);
|
||||
oldHosts[host->Hostname] = host;
|
||||
oldHosts[host->hostname] = host;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,12 +216,12 @@ void PersistantConfig::AddAndroidHosts()
|
||||
else
|
||||
host = new RemoteHost();
|
||||
|
||||
host->Hostname = hostName;
|
||||
host->hostname = hostName;
|
||||
rdcstr friendly;
|
||||
RENDERDOC_GetAndroidFriendlyName(hostName.toUtf8().data(), friendly);
|
||||
host->FriendlyName = friendly;
|
||||
host->friendlyName = friendly;
|
||||
// Just a command to display in the GUI and allow Launch() to be called.
|
||||
host->RunCommand = lit("org.renderdoc.renderdoccmd");
|
||||
host->runCommand = lit("org.renderdoc.renderdoccmd");
|
||||
RemoteHosts.push_back(host);
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ bool PersistantConfig::Load(const rdcstr &filename)
|
||||
if(!foundLocalhost)
|
||||
{
|
||||
RemoteHost *host = new RemoteHost();
|
||||
host->Hostname = "localhost";
|
||||
host->hostname = "localhost";
|
||||
RemoteHosts.insert(0, host);
|
||||
}
|
||||
|
||||
@@ -389,24 +389,24 @@ SPIRVDisassembler::operator QVariant() const
|
||||
BugReport::BugReport(const QVariant &var)
|
||||
{
|
||||
QVariantMap map = var.toMap();
|
||||
if(map.contains(lit("ID")))
|
||||
ID = map[lit("ID")].toString();
|
||||
if(map.contains(lit("SubmitDate")))
|
||||
SubmitDate = map[lit("SubmitDate")].toDateTime();
|
||||
if(map.contains(lit("CheckDate")))
|
||||
CheckDate = map[lit("CheckDate")].toDateTime();
|
||||
if(map.contains(lit("UnreadUpdates")))
|
||||
UnreadUpdates = map[lit("UnreadUpdates")].toBool();
|
||||
if(map.contains(lit("reportId")))
|
||||
reportId = map[lit("reportId")].toString();
|
||||
if(map.contains(lit("submitDate")))
|
||||
submitDate = map[lit("submitDate")].toDateTime();
|
||||
if(map.contains(lit("checkDate")))
|
||||
checkDate = map[lit("checkDate")].toDateTime();
|
||||
if(map.contains(lit("unreadUpdates")))
|
||||
unreadUpdates = map[lit("unreadUpdates")].toBool();
|
||||
}
|
||||
|
||||
BugReport::operator QVariant() const
|
||||
{
|
||||
QVariantMap map;
|
||||
|
||||
map[lit("ID")] = ID;
|
||||
map[lit("SubmitDate")] = SubmitDate;
|
||||
map[lit("CheckDate")] = CheckDate;
|
||||
map[lit("UnreadUpdates")] = UnreadUpdates;
|
||||
map[lit("reportId")] = reportId;
|
||||
map[lit("submitDate")] = submitDate;
|
||||
map[lit("checkDate")] = checkDate;
|
||||
map[lit("unreadUpdates")] = unreadUpdates;
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -65,40 +65,40 @@ DOCUMENT("Describes a submitted bug report.");
|
||||
struct BugReport
|
||||
{
|
||||
DOCUMENT("");
|
||||
BugReport() { UnreadUpdates = false; }
|
||||
BugReport() { unreadUpdates = false; }
|
||||
VARIANT_CAST(BugReport);
|
||||
bool operator==(const BugReport &o) const
|
||||
{
|
||||
return ID == o.ID && SubmitDate == o.SubmitDate && CheckDate == o.CheckDate &&
|
||||
UnreadUpdates == o.UnreadUpdates;
|
||||
return reportId == o.reportId && submitDate == o.submitDate && checkDate == o.checkDate &&
|
||||
unreadUpdates == o.unreadUpdates;
|
||||
}
|
||||
bool operator<(const BugReport &o) const
|
||||
{
|
||||
if(ID != o.ID)
|
||||
return ID < o.ID;
|
||||
if(SubmitDate != o.SubmitDate)
|
||||
return SubmitDate < o.SubmitDate;
|
||||
if(CheckDate != o.CheckDate)
|
||||
return CheckDate < o.CheckDate;
|
||||
if(UnreadUpdates != o.UnreadUpdates)
|
||||
return UnreadUpdates < o.UnreadUpdates;
|
||||
if(reportId != o.reportId)
|
||||
return reportId < o.reportId;
|
||||
if(submitDate != o.submitDate)
|
||||
return submitDate < o.submitDate;
|
||||
if(checkDate != o.checkDate)
|
||||
return checkDate < o.checkDate;
|
||||
if(unreadUpdates != o.unreadUpdates)
|
||||
return unreadUpdates < o.unreadUpdates;
|
||||
return false;
|
||||
}
|
||||
DOCUMENT("The private ID of the bug report.");
|
||||
rdcstr ID;
|
||||
rdcstr reportId;
|
||||
DOCUMENT("The original date when this bug was submitted.");
|
||||
QDateTime SubmitDate;
|
||||
QDateTime submitDate;
|
||||
DOCUMENT("The last date that we checked for updates.");
|
||||
QDateTime CheckDate;
|
||||
QDateTime checkDate;
|
||||
DOCUMENT("Unread updates to the bug exist");
|
||||
bool UnreadUpdates = false;
|
||||
bool unreadUpdates = false;
|
||||
|
||||
DOCUMENT(R"(Gets the URL for this report.
|
||||
|
||||
:return: The URL to the report.
|
||||
:rtype: ``str``
|
||||
)");
|
||||
rdcstr URL() const { return lit(BUGREPORT_URL "/report/%1").arg(QString(ID)); }
|
||||
rdcstr URL() const { return lit(BUGREPORT_URL "/report/%1").arg(QString(reportId)); }
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(BugReport);
|
||||
@@ -376,14 +376,14 @@ For more information about some of these settings that are user-facing see
|
||||
|
||||
.. data:: EventBrowser_ApplyColors
|
||||
|
||||
``True`` if the :class:`EventBrowser` should apply any colours specified with API marker regions.
|
||||
``True`` if the :class:`EventBrowser` should apply any colors specified with API marker regions.
|
||||
|
||||
Defaults to ``True``.
|
||||
|
||||
.. data:: EventBrowser_ColorEventRow
|
||||
|
||||
``True`` if when colouring marker regions in the :class:`EventBrowser`, the whole row should be
|
||||
coloured instead of just a side-bar.
|
||||
``True`` if when coloring marker regions in the :class:`EventBrowser`, the whole row should be
|
||||
colored instead of just a side-bar.
|
||||
|
||||
Defaults to ``True``.
|
||||
)",
|
||||
@@ -456,8 +456,8 @@ For more information about some of these settings that are user-facing see
|
||||
|
||||
.. data:: CheckUpdate_AllowChecks
|
||||
|
||||
``True`` if when colouring marker regions in the :class:`EventBrowser`, the whole row should be
|
||||
coloured instead of just a side-bar.
|
||||
``True`` if when coloring marker regions in the :class:`EventBrowser`, the whole row should be
|
||||
colored instead of just a side-bar.
|
||||
|
||||
Defaults to ``True``.
|
||||
|
||||
|
||||
@@ -71,41 +71,41 @@ EnvironmentModification EnvModFromVariant(const QVariant &v)
|
||||
|
||||
CaptureSettings::CaptureSettings()
|
||||
{
|
||||
Inject = false;
|
||||
AutoStart = false;
|
||||
RENDERDOC_GetDefaultCaptureOptions(&Options);
|
||||
inject = false;
|
||||
autoStart = false;
|
||||
RENDERDOC_GetDefaultCaptureOptions(&options);
|
||||
}
|
||||
|
||||
CaptureSettings::operator QVariant() const
|
||||
{
|
||||
QVariantMap ret;
|
||||
|
||||
ret[lit("Inject")] = Inject;
|
||||
ret[lit("AutoStart")] = AutoStart;
|
||||
ret[lit("inject")] = inject;
|
||||
ret[lit("autoStart")] = autoStart;
|
||||
|
||||
ret[lit("Executable")] = Executable;
|
||||
ret[lit("WorkingDir")] = WorkingDir;
|
||||
ret[lit("CmdLine")] = CmdLine;
|
||||
ret[lit("executable")] = executable;
|
||||
ret[lit("workingDir")] = workingDir;
|
||||
ret[lit("commandLine")] = commandLine;
|
||||
|
||||
QVariantList env;
|
||||
for(int i = 0; i < Environment.count(); i++)
|
||||
env.push_back(EnvModToVariant(Environment[i]));
|
||||
ret[lit("Environment")] = env;
|
||||
for(int i = 0; i < environment.count(); i++)
|
||||
env.push_back(EnvModToVariant(environment[i]));
|
||||
ret[lit("environment")] = env;
|
||||
|
||||
QVariantMap opts;
|
||||
opts[lit("AllowVSync")] = Options.AllowVSync;
|
||||
opts[lit("AllowFullscreen")] = Options.AllowFullscreen;
|
||||
opts[lit("APIValidation")] = Options.APIValidation;
|
||||
opts[lit("CaptureCallstacks")] = Options.CaptureCallstacks;
|
||||
opts[lit("CaptureCallstacksOnlyDraws")] = Options.CaptureCallstacksOnlyDraws;
|
||||
opts[lit("DelayForDebugger")] = Options.DelayForDebugger;
|
||||
opts[lit("VerifyMapWrites")] = Options.VerifyMapWrites;
|
||||
opts[lit("HookIntoChildren")] = Options.HookIntoChildren;
|
||||
opts[lit("RefAllResources")] = Options.RefAllResources;
|
||||
opts[lit("SaveAllInitials")] = Options.SaveAllInitials;
|
||||
opts[lit("CaptureAllCmdLists")] = Options.CaptureAllCmdLists;
|
||||
opts[lit("DebugOutputMute")] = Options.DebugOutputMute;
|
||||
ret[lit("Options")] = opts;
|
||||
opts[lit("allowVSync")] = options.allowVSync;
|
||||
opts[lit("allowFullscreen")] = options.allowFullscreen;
|
||||
opts[lit("apiValidation")] = options.apiValidation;
|
||||
opts[lit("captureCallstacks")] = options.captureCallstacks;
|
||||
opts[lit("captureCallstacksOnlyDraws")] = options.captureCallstacksOnlyDraws;
|
||||
opts[lit("delayForDebugger")] = options.delayForDebugger;
|
||||
opts[lit("verifyMapWrites")] = options.verifyMapWrites;
|
||||
opts[lit("hookIntoChildren")] = options.hookIntoChildren;
|
||||
opts[lit("refAllResources")] = options.refAllResources;
|
||||
opts[lit("saveAllInitials")] = options.saveAllInitials;
|
||||
opts[lit("captureAllCmdLists")] = options.captureAllCmdLists;
|
||||
opts[lit("debugOutputMute")] = options.debugOutputMute;
|
||||
ret[lit("options")] = opts;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -114,34 +114,34 @@ CaptureSettings::CaptureSettings(const QVariant &v)
|
||||
{
|
||||
QVariantMap data = v.toMap();
|
||||
|
||||
Inject = data[lit("Inject")].toBool();
|
||||
AutoStart = data[lit("AutoStart")].toBool();
|
||||
inject = data[lit("inject")].toBool();
|
||||
autoStart = data[lit("autoStart")].toBool();
|
||||
|
||||
Executable = data[lit("Executable")].toString();
|
||||
WorkingDir = data[lit("WorkingDir")].toString();
|
||||
CmdLine = data[lit("CmdLine")].toString();
|
||||
executable = data[lit("executable")].toString();
|
||||
workingDir = data[lit("workingDir")].toString();
|
||||
commandLine = data[lit("commandLine")].toString();
|
||||
|
||||
QVariantList env = data[lit("Environment")].toList();
|
||||
QVariantList env = data[lit("environment")].toList();
|
||||
for(int i = 0; i < env.size(); i++)
|
||||
{
|
||||
EnvironmentModification e = EnvModFromVariant(env[i]);
|
||||
Environment.push_back(e);
|
||||
environment.push_back(e);
|
||||
}
|
||||
|
||||
QVariantMap opts = data[lit("Options")].toMap();
|
||||
QVariantMap opts = data[lit("options")].toMap();
|
||||
|
||||
Options.AllowVSync = opts[lit("AllowVSync")].toBool();
|
||||
Options.AllowFullscreen = opts[lit("AllowFullscreen")].toBool();
|
||||
Options.APIValidation = opts[lit("APIValidation")].toBool();
|
||||
Options.CaptureCallstacks = opts[lit("CaptureCallstacks")].toBool();
|
||||
Options.CaptureCallstacksOnlyDraws = opts[lit("CaptureCallstacksOnlyDraws")].toBool();
|
||||
Options.DelayForDebugger = opts[lit("DelayForDebugger")].toUInt();
|
||||
Options.VerifyMapWrites = opts[lit("VerifyMapWrites")].toBool();
|
||||
Options.HookIntoChildren = opts[lit("HookIntoChildren")].toBool();
|
||||
Options.RefAllResources = opts[lit("RefAllResources")].toBool();
|
||||
Options.SaveAllInitials = opts[lit("SaveAllInitials")].toBool();
|
||||
Options.CaptureAllCmdLists = opts[lit("CaptureAllCmdLists")].toBool();
|
||||
Options.DebugOutputMute = opts[lit("DebugOutputMute")].toBool();
|
||||
options.allowVSync = opts[lit("allowVSync")].toBool();
|
||||
options.allowFullscreen = opts[lit("allowFullscreen")].toBool();
|
||||
options.apiValidation = opts[lit("apiValidation")].toBool();
|
||||
options.captureCallstacks = opts[lit("captureCallstacks")].toBool();
|
||||
options.captureCallstacksOnlyDraws = opts[lit("captureCallstacksOnlyDraws")].toBool();
|
||||
options.delayForDebugger = opts[lit("delayForDebugger")].toUInt();
|
||||
options.verifyMapWrites = opts[lit("verifyMapWrites")].toBool();
|
||||
options.hookIntoChildren = opts[lit("hookIntoChildren")].toBool();
|
||||
options.refAllResources = opts[lit("refAllResources")].toBool();
|
||||
options.saveAllInitials = opts[lit("saveAllInitials")].toBool();
|
||||
options.captureAllCmdLists = opts[lit("captureAllCmdLists")].toBool();
|
||||
options.debugOutputMute = opts[lit("debugOutputMute")].toBool();
|
||||
}
|
||||
|
||||
rdcstr configFilePath(const rdcstr &filename)
|
||||
|
||||
@@ -76,23 +76,23 @@ struct CaptureSettings
|
||||
VARIANT_CAST(CaptureSettings);
|
||||
|
||||
DOCUMENT("The :class:`~renderdoc.CaptureOptions` with fine-tuned settings for the capture.");
|
||||
CaptureOptions Options;
|
||||
CaptureOptions options;
|
||||
DOCUMENT(
|
||||
"``True`` if the described capture is an inject-into-process instead of a launched "
|
||||
"executable.");
|
||||
bool Inject;
|
||||
bool inject;
|
||||
DOCUMENT("``True`` if this capture settings object should be immediately executed upon load.");
|
||||
bool AutoStart;
|
||||
bool autoStart;
|
||||
DOCUMENT("The path to the executable to run.");
|
||||
rdcstr Executable;
|
||||
rdcstr executable;
|
||||
DOCUMENT("The path to the working directory to run in, or blank for the executable's directory.");
|
||||
rdcstr WorkingDir;
|
||||
DOCUMENT("The command line to pass when running :data:`Exectuable`.");
|
||||
rdcstr CmdLine;
|
||||
rdcstr workingDir;
|
||||
DOCUMENT("The command line to pass when running :data:`executable`.");
|
||||
rdcstr commandLine;
|
||||
DOCUMENT(
|
||||
"A ``list`` of :class:`~renderdoc.EnvironmentModification` with environment changes to "
|
||||
"apply.");
|
||||
rdcarray<EnvironmentModification> Environment;
|
||||
rdcarray<EnvironmentModification> environment;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(CaptureSettings);
|
||||
@@ -220,10 +220,10 @@ struct ITextureViewer
|
||||
|
||||
DOCUMENT(R"(Open a texture view, optionally raising this window to the foreground.
|
||||
|
||||
:param ~renderdoc.ResourceId ID: The ID of the texture to view.
|
||||
:param ~renderdoc.ResourceId resourceId: The ID of the texture to view.
|
||||
:param bool focus: ``True`` if the :class:`TextureViewer` should be raised.
|
||||
)");
|
||||
virtual void ViewTexture(ResourceId ID, bool focus) = 0;
|
||||
virtual void ViewTexture(ResourceId resourceId, bool focus) = 0;
|
||||
DOCUMENT(R"(Highlights the given pixel location in the current texture.
|
||||
|
||||
:param int x: The X co-ordinate.
|
||||
@@ -612,23 +612,23 @@ effective current event, since for example selecting a marker region will change
|
||||
to be the last event inside that region, to be consistent with selecting an item reflecting the
|
||||
current state after that item.
|
||||
|
||||
The selected event shows the :data:`EID <renderdoc.APIEvent.eventID>` that was actually selected,
|
||||
The selected event shows the :data:`eventId <renderdoc.APIEvent.eventId>` that was actually selected,
|
||||
which will usually but not always be the same as the current effective
|
||||
:data:`EID <renderdoc.APIEvent.eventID>`.
|
||||
:data:`eventId <renderdoc.APIEvent.eventId>`.
|
||||
|
||||
The distinction for this callback is not normally desired, instead use :meth:`OnEventChanged` to
|
||||
be notified whenever the current event changes. The API inspector uses this to display API events up
|
||||
to a marker region.
|
||||
|
||||
:param int eventID: The new :data:`EID <renderdoc.APIEvent.eventID>`.
|
||||
:param int eventId: The new :data:`eventId <renderdoc.APIEvent.eventId>`.
|
||||
)");
|
||||
virtual void OnSelectedEventChanged(uint32_t eventID) = 0;
|
||||
virtual void OnSelectedEventChanged(uint32_t eventId) = 0;
|
||||
|
||||
DOCUMENT(R"(Called whenever the effective current event changes.
|
||||
|
||||
:param int eventID: The new :data:`EID <renderdoc.APIEvent.eventID>`.
|
||||
:param int eventId: The new :data:`eventId <renderdoc.APIEvent.eventId>`.
|
||||
)");
|
||||
virtual void OnEventChanged(uint32_t eventID) = 0;
|
||||
virtual void OnEventChanged(uint32_t eventId) = 0;
|
||||
|
||||
protected:
|
||||
ICaptureViewer() = default;
|
||||
@@ -698,7 +698,7 @@ struct IReplayManager
|
||||
DOCUMENT(R"(Retrieves the capture file handle for the currently open file.
|
||||
|
||||
:return: The file handle active, or ``None`` if no capture is open.
|
||||
:rtype: StackResolver
|
||||
:rtype: ~renderdoc.CaptureAccess
|
||||
)");
|
||||
virtual ICaptureAccess *GetCaptureAccess() = 0;
|
||||
|
||||
@@ -711,7 +711,8 @@ This happens either locally, or on the remote server, depending on whether a con
|
||||
directory containing the executable is used.
|
||||
:param str cmdLine: The command line to use when running the executable, it will be processed in a
|
||||
platform specific way to generate arguments.
|
||||
:param list env: Any :class:`EnvironmentModification` that should be made when running the program.
|
||||
:param list env: Any :class:`~renderdoc.EnvironmentModification` that should be made when running
|
||||
the program.
|
||||
:param str capturefile: The location to save any captures, if running locally.
|
||||
:param CaptureOptions opts: The capture options to use when injecting into the program.
|
||||
:return: The ident where the new application is listening for target control, or 0 if something went
|
||||
@@ -737,7 +738,8 @@ blocking fashion on the current thread.
|
||||
|
||||
:param bool synchronous: If a capture is open, then ``True`` will use :meth:`BlockInvoke` to call
|
||||
the callback. Otherwise if ``False`` then :meth:`AsyncInvoke` will be used.
|
||||
:param DirectoryBrowseMethod method: The function to callback on the replay thread.
|
||||
:param method: The function to callback on the replay thread.
|
||||
:type method: :func:`DirectoryBrowseCallback`
|
||||
)");
|
||||
virtual void GetHomeFolder(bool synchronous, DirectoryBrowseCallback cb) = 0;
|
||||
|
||||
@@ -749,7 +751,7 @@ blocking fashion on the current thread.
|
||||
:param str path: The path to query the contents of.
|
||||
:param bool synchronous: If a capture is open, then ``True`` will use :meth:`BlockInvoke` to call
|
||||
the callback. Otherwise if ``False`` then :meth:`AsyncInvoke` will be used.
|
||||
:param DirectoryBrowseMethod method: The function to callback on the replay thread.
|
||||
:param DirectoryBrowseCallback method: The function to callback on the replay thread.
|
||||
)");
|
||||
virtual void ListFolder(const rdcstr &path, bool synchronous, DirectoryBrowseCallback cb) = 0;
|
||||
|
||||
@@ -946,18 +948,18 @@ BITMASK_OPERATORS(CaptureModifications);
|
||||
DOCUMENT("A description of a bookmark on an event");
|
||||
struct EventBookmark
|
||||
{
|
||||
DOCUMENT("The EID at which this bookmark is placed.");
|
||||
uint32_t EID = 0;
|
||||
DOCUMENT("The :data:`eventId <renderdoc.APIEvent.eventId>` at which this bookmark is placed.");
|
||||
uint32_t eventId = 0;
|
||||
|
||||
DOCUMENT("The text associated with this bookmark - could be empty");
|
||||
rdcstr text;
|
||||
|
||||
DOCUMENT("");
|
||||
EventBookmark() = default;
|
||||
EventBookmark(uint32_t e) : EID(e) {}
|
||||
bool operator==(const EventBookmark &o) { return EID == o.EID; }
|
||||
bool operator!=(const EventBookmark &o) const { return EID != o.EID; }
|
||||
bool operator<(const EventBookmark &o) const { return EID < o.EID; }
|
||||
EventBookmark(uint32_t e) : eventId(e) {}
|
||||
bool operator==(const EventBookmark &o) { return eventId == o.eventId; }
|
||||
bool operator!=(const EventBookmark &o) const { return eventId != o.eventId; }
|
||||
bool operator<(const EventBookmark &o) const { return eventId < o.eventId; }
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(EventBookmark);
|
||||
@@ -990,7 +992,7 @@ data.
|
||||
If the capture was temporary, this save action means it is no longer temporary and will be treated
|
||||
like any other capture.
|
||||
|
||||
Any modifications to the capture (see :meth:`GetCaptureModifcations`) will be applied at the same
|
||||
Any modifications to the capture (see :meth:`GetCaptureModifications`) will be applied at the same
|
||||
time.
|
||||
|
||||
:param str captureFile: The path to save the capture file to.
|
||||
@@ -1009,15 +1011,15 @@ time.
|
||||
|
||||
:param list exclude: A list of :class:`CaptureViewer` to exclude from being notified of this, to stop
|
||||
infinite recursion.
|
||||
:param int selectedEventID: The selected :data:`EID <renderdoc.APIEvent.eventID>`. See
|
||||
:param int selectedEventId: The selected :data:`eventId <renderdoc.APIEvent.eventId>`. See
|
||||
:meth:`CaptureViewer.OnSelectedEventChanged` for more information.
|
||||
:param int eventID: The new current :data:`EID <renderdoc.APIEvent.eventID>`. See
|
||||
:param int eventId: The new current :data:`eventId <renderdoc.APIEvent.eventId>`. See
|
||||
:meth:`CaptureViewer.OnEventChanged` for more information.
|
||||
:param bool force: Optional parameter, if ``True`` then the replay will 'move' even if it is moving
|
||||
to the same :data:`EID <renderdoc.APIEvent.eventID>` as it's currently on.
|
||||
to the same :data:`eventId <renderdoc.APIEvent.eventId>` as it's currently on.
|
||||
)");
|
||||
virtual void SetEventID(const rdcarray<ICaptureViewer *> &exclude, uint32_t selectedEventID,
|
||||
uint32_t eventID, bool force = false) = 0;
|
||||
virtual void SetEventID(const rdcarray<ICaptureViewer *> &exclude, uint32_t selectedEventId,
|
||||
uint32_t eventId, bool force = false) = 0;
|
||||
DOCUMENT(R"(Replay the capture to the current event again, to pick up any changes that might have
|
||||
been made.
|
||||
)");
|
||||
@@ -1105,7 +1107,7 @@ the UI which aren't reflected in the capture file on disk.
|
||||
)");
|
||||
virtual const APIProperties &APIProps() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the currently selected :data:`EID <renderdoc.APIEvent.eventID>`.
|
||||
DOCUMENT(R"(Retrieve the currently selected :data:`eventId <renderdoc.APIEvent.eventId>`.
|
||||
|
||||
In most cases, prefer using :meth:`CurEvent`. See :meth:`CaptureViewer.OnSelectedEventChanged` for more
|
||||
information for how this differs.
|
||||
@@ -1115,7 +1117,7 @@ information for how this differs.
|
||||
)");
|
||||
virtual uint32_t CurSelectedEvent() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current :data:`EID <renderdoc.APIEvent.eventID>`.
|
||||
DOCUMENT(R"(Retrieve the current :data:`eventId <renderdoc.APIEvent.eventId>`.
|
||||
|
||||
:return: The current event.
|
||||
:rtype: ``int``
|
||||
@@ -1269,14 +1271,14 @@ considered out of date
|
||||
virtual const rdcarray<BufferDescription> &GetBuffers() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the information about a drawcall at a given
|
||||
:data:`EID <renderdoc.APIEvent.eventID>`.
|
||||
:data:`eventId <renderdoc.APIEvent.eventId>`.
|
||||
|
||||
:param int id: The :data:`EID <renderdoc.APIEvent.eventID>` to query for.
|
||||
:param int id: The :data:`eventId <renderdoc.APIEvent.eventId>` to query for.
|
||||
:return: The information about the drawcall, or ``None`` if the
|
||||
:data:`EID <renderdoc.APIEvent.eventID>` doesn't correspond to a drawcall.
|
||||
:data:`eventId <renderdoc.APIEvent.eventId>` doesn't correspond to a drawcall.
|
||||
:rtype: ~renderdoc.BufferDescription
|
||||
)");
|
||||
virtual const DrawcallDescription *GetDrawcall(uint32_t eventID) = 0;
|
||||
virtual const DrawcallDescription *GetDrawcall(uint32_t eventId) = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the :class:`~renderdoc.SDFile` for the currently open capture.
|
||||
|
||||
@@ -1293,7 +1295,7 @@ considered out of date
|
||||
virtual WindowingSystem CurWindowingSystem() = 0;
|
||||
|
||||
DOCUMENT(R"(Create an opaque pointer suitable for passing to
|
||||
:meth:`~ReplayController.CreateOutput` or other functions that expect windowing data.
|
||||
:meth:`~renderdoc.ReplayController.CreateOutput` or other functions that expect windowing data.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -1353,32 +1355,32 @@ See :meth:`GetNotes` for a list of possible common field keys.
|
||||
virtual void SetNotes(const rdcstr &key, const rdcstr &contents) = 0;
|
||||
|
||||
DOCUMENT(R"(Get the current list of bookmarks in the capture. Each bookmark is associated with an
|
||||
EID and has some text attached. There will only be at most one bookmark for any given EID.
|
||||
eventId and has some text attached. There will only be at most one bookmark for any given eventId.
|
||||
|
||||
The list of bookmarks is not necessarily sorted by EID. Thus, bookmark 1 is always bookmark 1 until
|
||||
it is removed, the indices do not shift as new bookmarks are added or removed.
|
||||
The list of bookmarks is not necessarily sorted by eventId. Thus, bookmark 1 is always bookmark 1
|
||||
until it is removed, the indices do not shift as new bookmarks are added or removed.
|
||||
|
||||
:return: The currently set bookmarks.
|
||||
:rtype: ``list`` of :class:`BookMark`
|
||||
:rtype: ``list`` of :class:`EventBookmark`
|
||||
)");
|
||||
virtual rdcarray<EventBookmark> GetBookmarks() = 0;
|
||||
|
||||
DOCUMENT(R"(Set or update a bookmark.
|
||||
|
||||
A bookmark will be added at the specified EID, or if one already exists then the attached text will
|
||||
be replaced.
|
||||
A bookmark will be added at the specified eventId, or if one already exists then the attached text
|
||||
will be replaced.
|
||||
|
||||
:param Bookmark mark: The bookmark to add.
|
||||
:param EventBookmark mark: The bookmark to add.
|
||||
)");
|
||||
virtual void SetBookmark(const EventBookmark &mark) = 0;
|
||||
|
||||
DOCUMENT(R"(Remove a bookmark at a given EID.
|
||||
DOCUMENT(R"(Remove a bookmark at a given eventId.
|
||||
|
||||
If no bookmark exists, this function will do nothing.
|
||||
|
||||
:param int EID: The EID of the bookmark to remove.
|
||||
:param int eventId: The eventId of the bookmark to remove.
|
||||
)");
|
||||
virtual void RemoveBookmark(uint32_t EID) = 0;
|
||||
virtual void RemoveBookmark(uint32_t eventId) = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current singleton :class:`MainWindow`.
|
||||
|
||||
@@ -1499,14 +1501,14 @@ If no bookmark exists, this function will do nothing.
|
||||
)");
|
||||
virtual bool HasTextureViewer() = 0;
|
||||
|
||||
DOCUMENT(R"(Check if there is a current :class:`PipelineViewer` open.
|
||||
DOCUMENT(R"(Check if there is a current :class:`PipelineStateViewer` open.
|
||||
|
||||
:return: ``True`` if there is a window open.
|
||||
:rtype: ``bool``
|
||||
)");
|
||||
virtual bool HasPipelineViewer() = 0;
|
||||
|
||||
DOCUMENT(R"(Check if there is a current :class:`MeshPreview` open.
|
||||
DOCUMENT(R"(Check if there is a current mesh previewing :class:`BufferViewer` open.
|
||||
|
||||
:return: ``True`` if there is a window open.
|
||||
:rtype: ``bool``
|
||||
@@ -1575,9 +1577,12 @@ If no bookmark exists, this function will do nothing.
|
||||
virtual void ShowAPIInspector() = 0;
|
||||
DOCUMENT("Raise the current :class:`TextureViewer`, showing it in the default place if needed.");
|
||||
virtual void ShowTextureViewer() = 0;
|
||||
DOCUMENT("Raise the current :class:`MeshPreview`, showing it in the default place if needed.");
|
||||
DOCUMENT(R"(Raise the current mesh previewing :class:`BufferViewer`, showing it in the default
|
||||
place if needed.
|
||||
)");
|
||||
virtual void ShowMeshPreview() = 0;
|
||||
DOCUMENT("Raise the current :class:`PipelineViewer`, showing it in the default place if needed.");
|
||||
DOCUMENT(
|
||||
"Raise the current :class:`PipelineStateViewer`, showing it in the default place if needed.");
|
||||
virtual void ShowPipelineViewer() = 0;
|
||||
DOCUMENT("Raise the current :class:`CaptureDialog`, showing it in the default place if needed.");
|
||||
virtual void ShowCaptureDialog() = 0;
|
||||
@@ -1628,7 +1633,7 @@ through the execution of a given shader.
|
||||
bound to.
|
||||
:param ~renderdoc.ShaderDebugTrace trace: The execution trace of the debugged shader.
|
||||
:param str debugContext: A human-readable context string describing which invocation of this shader
|
||||
was debugged. For example 'Pixel 12,34 at EID 678'.
|
||||
was debugged. For example 'Pixel 12,34 at eventId 678'.
|
||||
:return: The new :class:`ShaderViewer` window opened, but not shown.
|
||||
:rtype: ShaderViewer
|
||||
)");
|
||||
@@ -1738,31 +1743,31 @@ currently docked.
|
||||
virtual void AddDockWindow(QWidget *newWindow, DockReference ref, QWidget *refWindow,
|
||||
float percentage = 0.5f) = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.D3D11_State` pipeline state.
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.D3D11State` pipeline state.
|
||||
|
||||
:return: The current D3D11 pipeline state.
|
||||
:rtype: ~renderdoc.D3D11_State
|
||||
:rtype: ~renderdoc.D3D11State
|
||||
)");
|
||||
virtual const D3D11Pipe::State &CurD3D11PipelineState() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.D3D12_State` pipeline state.
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.D3D12State` pipeline state.
|
||||
|
||||
:return: The current D3D12 pipeline state.
|
||||
:rtype: ~renderdoc.D3D12_State
|
||||
:rtype: ~renderdoc.D3D12State
|
||||
)");
|
||||
virtual const D3D12Pipe::State &CurD3D12PipelineState() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.GL_State` pipeline state.
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.GLState` pipeline state.
|
||||
|
||||
:return: The current OpenGL pipeline state.
|
||||
:rtype: ~renderdoc.GL_State
|
||||
:rtype: ~renderdoc.GLState
|
||||
)");
|
||||
virtual const GLPipe::State &CurGLPipelineState() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.VK_State` pipeline state.
|
||||
DOCUMENT(R"(Retrieve the current :class:`~renderdoc.VKState` pipeline state.
|
||||
|
||||
:return: The current Vulkan pipeline state.
|
||||
:rtype: ~renderdoc.VK_State
|
||||
:rtype: ~renderdoc.VKState
|
||||
)");
|
||||
virtual const VKPipe::State &CurVulkanPipelineState() = 0;
|
||||
|
||||
|
||||
@@ -29,65 +29,65 @@
|
||||
|
||||
RemoteHost::RemoteHost()
|
||||
{
|
||||
ServerRunning = Connected = Busy = VersionMismatch = false;
|
||||
serverRunning = connected = busy = versionMismatch = false;
|
||||
}
|
||||
|
||||
RemoteHost::RemoteHost(const QVariant &var)
|
||||
{
|
||||
QVariantMap map = var.toMap();
|
||||
if(map.contains(lit("Hostname")))
|
||||
Hostname = map[lit("Hostname")].toString();
|
||||
if(map.contains(lit("FriendlyName")))
|
||||
FriendlyName = map[lit("FriendlyName")].toString();
|
||||
if(map.contains(lit("RunCommand")))
|
||||
RunCommand = map[lit("RunCommand")].toString();
|
||||
if(map.contains(lit("hostname")))
|
||||
hostname = map[lit("hostname")].toString();
|
||||
if(map.contains(lit("friendlyName")))
|
||||
friendlyName = map[lit("friendlyName")].toString();
|
||||
if(map.contains(lit("runCommand")))
|
||||
runCommand = map[lit("runCommand")].toString();
|
||||
|
||||
ServerRunning = Connected = Busy = VersionMismatch = false;
|
||||
serverRunning = connected = busy = versionMismatch = false;
|
||||
}
|
||||
|
||||
RemoteHost::operator QVariant() const
|
||||
{
|
||||
QVariantMap map;
|
||||
map[lit("Hostname")] = Hostname;
|
||||
map[lit("FriendlyName")] = FriendlyName;
|
||||
map[lit("RunCommand")] = RunCommand;
|
||||
map[lit("hostname")] = hostname;
|
||||
map[lit("friendlyName")] = friendlyName;
|
||||
map[lit("runCommand")] = runCommand;
|
||||
return map;
|
||||
}
|
||||
|
||||
void RemoteHost::CheckStatus()
|
||||
{
|
||||
// special case - this is the local context
|
||||
if(Hostname == "localhost")
|
||||
if(hostname == "localhost")
|
||||
{
|
||||
ServerRunning = false;
|
||||
VersionMismatch = Busy = false;
|
||||
serverRunning = false;
|
||||
versionMismatch = busy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
IRemoteServer *rend = NULL;
|
||||
ReplayStatus status = RENDERDOC_CreateRemoteServerConnection(Hostname.c_str(), 0, &rend);
|
||||
ReplayStatus status = RENDERDOC_CreateRemoteServerConnection(hostname.c_str(), 0, &rend);
|
||||
|
||||
if(status == ReplayStatus::Succeeded)
|
||||
{
|
||||
ServerRunning = true;
|
||||
VersionMismatch = Busy = false;
|
||||
serverRunning = true;
|
||||
versionMismatch = busy = false;
|
||||
}
|
||||
else if(status == ReplayStatus::NetworkRemoteBusy)
|
||||
{
|
||||
ServerRunning = true;
|
||||
Busy = true;
|
||||
VersionMismatch = false;
|
||||
serverRunning = true;
|
||||
busy = true;
|
||||
versionMismatch = false;
|
||||
}
|
||||
else if(status == ReplayStatus::NetworkVersionMismatch)
|
||||
{
|
||||
ServerRunning = true;
|
||||
Busy = true;
|
||||
VersionMismatch = true;
|
||||
serverRunning = true;
|
||||
busy = true;
|
||||
versionMismatch = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ServerRunning = false;
|
||||
VersionMismatch = Busy = false;
|
||||
serverRunning = false;
|
||||
versionMismatch = busy = false;
|
||||
}
|
||||
|
||||
if(rend)
|
||||
@@ -106,15 +106,15 @@ void RemoteHost::Launch()
|
||||
{
|
||||
int WAIT_TIME = 2000;
|
||||
|
||||
if(IsHostADB())
|
||||
if(IsADB())
|
||||
{
|
||||
RENDERDOC_StartAndroidRemoteServer(Hostname.c_str());
|
||||
RENDERDOC_StartAndroidRemoteServer(hostname.c_str());
|
||||
QThread::msleep(WAIT_TIME);
|
||||
return;
|
||||
}
|
||||
|
||||
RDProcess process;
|
||||
process.start(RunCommand);
|
||||
process.start(runCommand);
|
||||
process.waitForFinished(WAIT_TIME);
|
||||
process.detach();
|
||||
}
|
||||
|
||||
@@ -40,36 +40,36 @@ public:
|
||||
DOCUMENT(
|
||||
"Ping the host to check current status - if the server is running, connection status, etc.");
|
||||
void CheckStatus();
|
||||
DOCUMENT("Runs the command specified in :data:`RunCommand`.");
|
||||
DOCUMENT("Runs the command specified in :data:`runCommand`.");
|
||||
void Launch();
|
||||
|
||||
DOCUMENT("``True`` if a remote server is currently running on this host.");
|
||||
bool ServerRunning : 1;
|
||||
bool serverRunning : 1;
|
||||
DOCUMENT("``True`` if an active connection exists to this remote server.");
|
||||
bool Connected : 1;
|
||||
bool connected : 1;
|
||||
DOCUMENT("``True`` if someone else is currently connected to this server.");
|
||||
bool Busy : 1;
|
||||
bool busy : 1;
|
||||
DOCUMENT("``True`` if there is a code version mismatch with this server.");
|
||||
bool VersionMismatch : 1;
|
||||
bool versionMismatch : 1;
|
||||
|
||||
DOCUMENT("The hostname of this host.");
|
||||
rdcstr Hostname;
|
||||
rdcstr hostname;
|
||||
DOCUMENT("The friendly name for this host, if available (if empty, the Hostname is used).");
|
||||
rdcstr FriendlyName;
|
||||
rdcstr friendlyName;
|
||||
DOCUMENT("The command to run locally to try to launch the server remotely.");
|
||||
rdcstr RunCommand;
|
||||
rdcstr runCommand;
|
||||
|
||||
DOCUMENT(R"(
|
||||
Returns the name to display for this host in the UI, either :data:`FriendlyName` or :data:`Hostname`
|
||||
Returns the name to display for this host in the UI, either :data:`friendlyName` or :data:`hostname`
|
||||
)");
|
||||
const rdcstr &Name() const { return !FriendlyName.isEmpty() ? FriendlyName : Hostname; }
|
||||
const rdcstr &Name() const { return !friendlyName.isEmpty() ? friendlyName : hostname; }
|
||||
DOCUMENT("Returns ``True`` if this host represents a connected ADB (Android) device.");
|
||||
bool IsHostADB() const
|
||||
bool IsADB() const
|
||||
{
|
||||
return Hostname[0] == 'a' && Hostname[1] == 'd' && Hostname[2] == 'b' && Hostname[3] == ':';
|
||||
return hostname[0] == 'a' && hostname[1] == 'd' && hostname[2] == 'b' && hostname[3] == ':';
|
||||
}
|
||||
DOCUMENT("Returns ``True`` if this host represents the special localhost device.");
|
||||
bool IsLocalhost() const { return Hostname == "localhost"; }
|
||||
bool IsLocalhost() const { return hostname == "localhost"; }
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(RemoteHost);
|
||||
Reference in New Issue
Block a user