mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-11 17:20:56 +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:
@@ -66,7 +66,7 @@ void APIInspector::OnCaptureClosed()
|
||||
ui->callstack->clear();
|
||||
}
|
||||
|
||||
void APIInspector::OnSelectedEventChanged(uint32_t eventID)
|
||||
void APIInspector::OnSelectedEventChanged(uint32_t eventId)
|
||||
{
|
||||
ui->apiEvents->clearSelection();
|
||||
|
||||
@@ -138,7 +138,7 @@ void APIInspector::fillAPIView()
|
||||
{
|
||||
for(const APIEvent &ev : draw->events)
|
||||
{
|
||||
RDTreeWidgetItem *root = new RDTreeWidgetItem({QString::number(ev.eventID), QString()});
|
||||
RDTreeWidgetItem *root = new RDTreeWidgetItem({QString::number(ev.eventId), QString()});
|
||||
|
||||
if(ev.chunkIndex < file.chunks.size())
|
||||
{
|
||||
@@ -153,7 +153,7 @@ void APIInspector::fillAPIView()
|
||||
root->setText(1, tr("Invalid chunk index %1").arg(ev.chunkIndex));
|
||||
}
|
||||
|
||||
if(ev.eventID == draw->eventID)
|
||||
if(ev.eventId == draw->eventId)
|
||||
root->setBold(true);
|
||||
|
||||
root->setTag(QVariant::fromValue(ev));
|
||||
|
||||
@@ -48,8 +48,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override;
|
||||
void OnEventChanged(uint32_t eventID) override {}
|
||||
void OnSelectedEventChanged(uint32_t eventId) override;
|
||||
void OnEventChanged(uint32_t eventId) override {}
|
||||
public slots:
|
||||
void on_apiEvents_itemSelectionChanged();
|
||||
|
||||
|
||||
@@ -859,15 +859,15 @@ private:
|
||||
{
|
||||
if(el.format.compType == CompType::Float)
|
||||
{
|
||||
return interpretVariant(QVariant(generics[col].value_f[comp]), el);
|
||||
return interpretVariant(QVariant(generics[col].floatValue[comp]), el);
|
||||
}
|
||||
else if(el.format.compType == CompType::SInt)
|
||||
{
|
||||
return interpretVariant(QVariant(generics[col].value_i[comp]), el);
|
||||
return interpretVariant(QVariant(generics[col].intValue[comp]), el);
|
||||
}
|
||||
else if(el.format.compType == CompType::UInt)
|
||||
{
|
||||
return interpretVariant(QVariant(generics[col].value_u[comp]), el);
|
||||
return interpretVariant(QVariant(generics[col].uintValue[comp]), el);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1379,7 +1379,7 @@ void BufferViewer::OnCaptureClosed()
|
||||
ToolWindowManager::closeToolWindow(this);
|
||||
}
|
||||
|
||||
void BufferViewer::OnEventChanged(uint32_t eventID)
|
||||
void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
int vsinHoriz = ui->vsinData->horizontalScrollBar()->value();
|
||||
int vsoutHoriz = ui->vsoutData->horizontalScrollBar()->value();
|
||||
@@ -1554,13 +1554,13 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
{
|
||||
const DrawcallDescription *draw = m_Ctx.CurDrawcall();
|
||||
|
||||
BoundBuffer ib = m_Ctx.CurPipelineState().GetIBuffer();
|
||||
BoundVBuffer ib = m_Ctx.CurPipelineState().GetIBuffer();
|
||||
|
||||
rdcarray<BoundBuffer> vbs = m_Ctx.CurPipelineState().GetVBuffers();
|
||||
rdcarray<BoundVBuffer> vbs = m_Ctx.CurPipelineState().GetVBuffers();
|
||||
|
||||
bytebuf idata;
|
||||
if(ib.Buffer != ResourceId() && draw && (draw->flags & DrawFlags::UseIBuffer))
|
||||
idata = r->GetBufferData(ib.Buffer, ib.ByteOffset + draw->indexOffset * draw->indexByteWidth,
|
||||
if(ib.resourceId != ResourceId() && draw && (draw->flags & DrawFlags::UseIBuffer))
|
||||
idata = r->GetBufferData(ib.resourceId, ib.byteOffset + draw->indexOffset * draw->indexByteWidth,
|
||||
draw->numIndices * draw->indexByteWidth);
|
||||
|
||||
uint32_t *indices = NULL;
|
||||
@@ -1631,7 +1631,7 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
}
|
||||
|
||||
int vbIdx = 0;
|
||||
for(BoundBuffer vb : vbs)
|
||||
for(BoundVBuffer vb : vbs)
|
||||
{
|
||||
bool used = false;
|
||||
bool pi = false;
|
||||
@@ -1678,13 +1678,13 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
BufferData *buf = new BufferData;
|
||||
if(used)
|
||||
{
|
||||
bytebuf bufdata = r->GetBufferData(vb.Buffer, vb.ByteOffset + offset * vb.ByteStride,
|
||||
(maxIdx + 1) * vb.ByteStride);
|
||||
bytebuf bufdata = r->GetBufferData(vb.resourceId, vb.byteOffset + offset * vb.byteStride,
|
||||
(maxIdx + 1) * vb.byteStride);
|
||||
|
||||
buf->data = new byte[bufdata.size()];
|
||||
memcpy(buf->data, bufdata.data(), bufdata.size());
|
||||
buf->end = buf->data + bufdata.size();
|
||||
buf->stride = vb.ByteStride;
|
||||
buf->stride = vb.byteStride;
|
||||
}
|
||||
// ref passes to model
|
||||
m_ModelVSIn->buffers.push_back(buf);
|
||||
@@ -1692,10 +1692,10 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
|
||||
m_PostVS = r->GetPostVSData(m_Config.curInstance, MeshDataStage::VSOut);
|
||||
|
||||
m_ModelVSOut->numRows = m_PostVS.numVerts;
|
||||
m_ModelVSOut->numRows = m_PostVS.numIndices;
|
||||
|
||||
if(draw && m_PostVS.idxbuf != ResourceId() && (draw->flags & DrawFlags::UseIBuffer))
|
||||
idata = r->GetBufferData(m_PostVS.idxbuf, 0, draw->numIndices * draw->indexByteWidth);
|
||||
if(draw && m_PostVS.indexResourceId != ResourceId() && (draw->flags & DrawFlags::UseIBuffer))
|
||||
idata = r->GetBufferData(m_PostVS.indexResourceId, 0, draw->numIndices * draw->indexByteWidth);
|
||||
|
||||
indices = NULL;
|
||||
if(m_ModelVSOut->indices)
|
||||
@@ -1734,15 +1734,15 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
}
|
||||
}
|
||||
|
||||
if(m_PostVS.buf != ResourceId())
|
||||
if(m_PostVS.vertexResourceId != ResourceId())
|
||||
{
|
||||
BufferData *postvs = new BufferData;
|
||||
bytebuf bufdata = r->GetBufferData(m_PostVS.buf, m_PostVS.offset, 0);
|
||||
bytebuf bufdata = r->GetBufferData(m_PostVS.vertexResourceId, m_PostVS.vertexByteOffset, 0);
|
||||
|
||||
postvs->data = new byte[bufdata.size()];
|
||||
memcpy(postvs->data, bufdata.data(), bufdata.size());
|
||||
postvs->end = postvs->data + bufdata.size();
|
||||
postvs->stride = m_PostVS.stride;
|
||||
postvs->stride = m_PostVS.vertexByteStride;
|
||||
|
||||
// ref passes to model
|
||||
m_ModelVSOut->buffers.push_back(postvs);
|
||||
@@ -1750,20 +1750,20 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
|
||||
m_PostGS = r->GetPostVSData(m_Config.curInstance, MeshDataStage::GSOut);
|
||||
|
||||
m_ModelGSOut->numRows = m_PostGS.numVerts;
|
||||
m_ModelGSOut->numRows = m_PostGS.numIndices;
|
||||
|
||||
indices = NULL;
|
||||
m_ModelGSOut->indices = NULL;
|
||||
|
||||
if(m_PostGS.buf != ResourceId())
|
||||
if(m_PostGS.vertexResourceId != ResourceId())
|
||||
{
|
||||
BufferData *postgs = new BufferData;
|
||||
bytebuf bufdata = r->GetBufferData(m_PostGS.buf, m_PostGS.offset, 0);
|
||||
bytebuf bufdata = r->GetBufferData(m_PostGS.vertexResourceId, m_PostGS.vertexByteOffset, 0);
|
||||
|
||||
postgs->data = new byte[bufdata.size()];
|
||||
memcpy(postgs->data, bufdata.data(), bufdata.size());
|
||||
postgs->end = postgs->data + bufdata.size();
|
||||
postgs->stride = m_PostGS.stride;
|
||||
postgs->stride = m_PostGS.vertexByteStride;
|
||||
|
||||
// ref passes to model
|
||||
m_ModelGSOut->buffers.push_back(postgs);
|
||||
@@ -1772,12 +1772,12 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
if(!draw)
|
||||
return;
|
||||
|
||||
uint32_t eventID = draw->eventID;
|
||||
uint32_t eventId = draw->eventId;
|
||||
bool calcNeeded = false;
|
||||
|
||||
{
|
||||
QMutexLocker autolock(&m_BBoxLock);
|
||||
calcNeeded = !m_BBoxes.contains(eventID);
|
||||
calcNeeded = !m_BBoxes.contains(eventId);
|
||||
}
|
||||
|
||||
if(!calcNeeded)
|
||||
@@ -1788,7 +1788,7 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
|
||||
{
|
||||
QMutexLocker autolock(&m_BBoxLock);
|
||||
m_BBoxes.insert(eventID, BBoxData());
|
||||
m_BBoxes.insert(eventId, BBoxData());
|
||||
}
|
||||
|
||||
CalcBoundingBoxData *bbox = new CalcBoundingBoxData;
|
||||
@@ -1797,7 +1797,7 @@ void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
|
||||
bbox->inst = m_ModelVSIn->curInstance;
|
||||
bbox->baseVertex = draw->baseVertex;
|
||||
bbox->eventID = eventID;
|
||||
bbox->eventId = eventId;
|
||||
|
||||
for(size_t i = 0; i < ARRAY_COUNT(bbox->input); i++)
|
||||
{
|
||||
@@ -1919,10 +1919,10 @@ void BufferViewer::updateBoundingBox(const CalcBoundingBoxData &bbox)
|
||||
{
|
||||
{
|
||||
QMutexLocker autolock(&m_BBoxLock);
|
||||
m_BBoxes[bbox.eventID] = bbox.output;
|
||||
m_BBoxes[bbox.eventId] = bbox.output;
|
||||
}
|
||||
|
||||
if(m_Ctx.CurEvent() == bbox.eventID)
|
||||
if(m_Ctx.CurEvent() == bbox.eventId)
|
||||
UpdateMeshConfig();
|
||||
|
||||
resetArcball();
|
||||
@@ -2094,7 +2094,7 @@ void BufferViewer::updatePreviewColumns()
|
||||
if(!m_MeshView)
|
||||
return;
|
||||
|
||||
rdcarray<BoundBuffer> vbs = m_Ctx.CurPipelineState().GetVBuffers();
|
||||
rdcarray<BoundVBuffer> vbs = m_Ctx.CurPipelineState().GetVBuffers();
|
||||
const DrawcallDescription *draw = m_Ctx.CurDrawcall();
|
||||
|
||||
if(draw)
|
||||
@@ -2108,35 +2108,35 @@ void BufferViewer::updatePreviewColumns()
|
||||
if(elIdx < 0 || elIdx >= m_ModelVSIn->columns.count())
|
||||
elIdx = 0;
|
||||
|
||||
m_VSInPosition.numVerts = draw->numIndices;
|
||||
m_VSInPosition.topo = draw->topology;
|
||||
m_VSInPosition.idxByteWidth = draw->indexByteWidth;
|
||||
m_VSInPosition.numIndices = draw->numIndices;
|
||||
m_VSInPosition.topology = draw->topology;
|
||||
m_VSInPosition.indexByteStride = draw->indexByteWidth;
|
||||
m_VSInPosition.baseVertex = draw->baseVertex;
|
||||
BoundBuffer ib = m_Ctx.CurPipelineState().GetIBuffer();
|
||||
m_VSInPosition.idxbuf = ib.Buffer;
|
||||
m_VSInPosition.idxoffs = ib.ByteOffset + draw->indexOffset * draw->indexByteWidth;
|
||||
BoundVBuffer ib = m_Ctx.CurPipelineState().GetIBuffer();
|
||||
m_VSInPosition.indexResourceId = ib.resourceId;
|
||||
m_VSInPosition.indexByteOffset = ib.byteOffset + draw->indexOffset * draw->indexByteWidth;
|
||||
|
||||
if((draw->flags & DrawFlags::UseIBuffer) && m_VSInPosition.idxByteWidth == 0)
|
||||
m_VSInPosition.idxByteWidth = 4U;
|
||||
if((draw->flags & DrawFlags::UseIBuffer) && m_VSInPosition.indexByteStride == 0)
|
||||
m_VSInPosition.indexByteStride = 4U;
|
||||
|
||||
{
|
||||
const FormatElement &el = m_ModelVSIn->columns[elIdx];
|
||||
|
||||
if(el.buffer < vbs.count())
|
||||
{
|
||||
m_VSInPosition.buf = vbs[el.buffer].Buffer;
|
||||
m_VSInPosition.stride = vbs[el.buffer].ByteStride;
|
||||
m_VSInPosition.offset =
|
||||
vbs[el.buffer].ByteOffset + el.offset + draw->vertexOffset * m_VSInPosition.stride;
|
||||
m_VSInPosition.vertexResourceId = vbs[el.buffer].resourceId;
|
||||
m_VSInPosition.vertexByteStride = vbs[el.buffer].byteStride;
|
||||
m_VSInPosition.vertexByteOffset = vbs[el.buffer].byteOffset + el.offset +
|
||||
draw->vertexOffset * m_VSInPosition.vertexByteStride;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_VSInPosition.buf = ResourceId();
|
||||
m_VSInPosition.stride = 0;
|
||||
m_VSInPosition.offset = 0;
|
||||
m_VSInPosition.vertexResourceId = ResourceId();
|
||||
m_VSInPosition.vertexByteStride = 0;
|
||||
m_VSInPosition.vertexByteOffset = 0;
|
||||
}
|
||||
|
||||
m_VSInPosition.fmt = el.format;
|
||||
m_VSInPosition.format = el.format;
|
||||
}
|
||||
|
||||
elIdx = m_ModelVSIn->secondaryColumn();
|
||||
@@ -2147,19 +2147,19 @@ void BufferViewer::updatePreviewColumns()
|
||||
|
||||
if(el.buffer < vbs.count())
|
||||
{
|
||||
m_VSInSecondary.buf = vbs[el.buffer].Buffer;
|
||||
m_VSInSecondary.stride = vbs[el.buffer].ByteStride;
|
||||
m_VSInSecondary.offset =
|
||||
vbs[el.buffer].ByteOffset + el.offset + draw->vertexOffset * m_VSInSecondary.stride;
|
||||
m_VSInSecondary.vertexResourceId = vbs[el.buffer].resourceId;
|
||||
m_VSInSecondary.vertexByteStride = vbs[el.buffer].byteStride;
|
||||
m_VSInSecondary.vertexByteOffset = vbs[el.buffer].byteOffset + el.offset +
|
||||
draw->vertexOffset * m_VSInSecondary.vertexByteStride;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_VSInSecondary.buf = ResourceId();
|
||||
m_VSInSecondary.stride = 0;
|
||||
m_VSInSecondary.offset = 0;
|
||||
m_VSInSecondary.vertexResourceId = ResourceId();
|
||||
m_VSInSecondary.vertexByteStride = 0;
|
||||
m_VSInSecondary.vertexByteOffset = 0;
|
||||
}
|
||||
|
||||
m_VSInSecondary.fmt = el.format;
|
||||
m_VSInSecondary.format = el.format;
|
||||
m_VSInSecondary.showAlpha = m_ModelVSIn->secondaryAlpha();
|
||||
}
|
||||
}
|
||||
@@ -2174,14 +2174,14 @@ void BufferViewer::updatePreviewColumns()
|
||||
elIdx = 0;
|
||||
|
||||
m_PostVSPosition = m_PostVS;
|
||||
m_PostVSPosition.offset += m_ModelVSOut->columns[elIdx].offset;
|
||||
m_PostVSPosition.vertexByteOffset += m_ModelVSOut->columns[elIdx].offset;
|
||||
|
||||
elIdx = m_ModelVSOut->secondaryColumn();
|
||||
|
||||
if(elIdx >= 0 && elIdx < m_ModelVSOut->columns.count())
|
||||
{
|
||||
m_PostVSSecondary = m_PostVS;
|
||||
m_PostVSSecondary.offset += m_ModelVSOut->columns[elIdx].offset;
|
||||
m_PostVSSecondary.vertexByteOffset += m_ModelVSOut->columns[elIdx].offset;
|
||||
m_PostVSSecondary.showAlpha = m_ModelVSOut->secondaryAlpha();
|
||||
}
|
||||
}
|
||||
@@ -2196,22 +2196,22 @@ void BufferViewer::updatePreviewColumns()
|
||||
elIdx = 0;
|
||||
|
||||
m_PostGSPosition = m_PostGS;
|
||||
m_PostGSPosition.offset += m_ModelGSOut->columns[elIdx].offset;
|
||||
m_PostGSPosition.vertexByteOffset += m_ModelGSOut->columns[elIdx].offset;
|
||||
|
||||
elIdx = m_ModelGSOut->secondaryColumn();
|
||||
|
||||
if(elIdx >= 0 && elIdx < m_ModelGSOut->columns.count())
|
||||
{
|
||||
m_PostGSSecondary = m_PostGS;
|
||||
m_PostGSSecondary.offset += m_ModelGSOut->columns[elIdx].offset;
|
||||
m_PostGSSecondary.vertexByteOffset += m_ModelGSOut->columns[elIdx].offset;
|
||||
m_PostGSSecondary.showAlpha = m_ModelGSOut->secondaryAlpha();
|
||||
}
|
||||
}
|
||||
|
||||
m_PostGSPosition.idxByteWidth = 0;
|
||||
m_PostGSPosition.indexByteStride = 0;
|
||||
|
||||
if(!(draw->flags & DrawFlags::UseIBuffer))
|
||||
m_PostVSPosition.idxByteWidth = m_VSInPosition.idxByteWidth = 0;
|
||||
m_PostVSPosition.indexByteStride = m_VSInPosition.indexByteStride = 0;
|
||||
|
||||
m_PostGSPosition.unproject = true;
|
||||
m_PostVSPosition.unproject = !m_Ctx.CurPipelineState().IsTessellationEnabled();
|
||||
@@ -2243,20 +2243,20 @@ void BufferViewer::configureMeshColumns()
|
||||
|
||||
for(const VertexInputAttribute &a : vinputs)
|
||||
{
|
||||
if(!a.Used)
|
||||
if(!a.used)
|
||||
continue;
|
||||
|
||||
FormatElement f(a.Name, a.VertexBuffer, a.RelativeByteOffset, a.PerInstance, a.InstanceRate,
|
||||
FormatElement f(a.name, a.vertexBuffer, a.byteOffset, a.perInstance, a.instanceRate,
|
||||
false, // row major matrix
|
||||
1, // matrix dimension
|
||||
a.Format, false, false);
|
||||
a.format, false, false);
|
||||
|
||||
m_ModelVSIn->genericsEnabled[m_ModelVSIn->columns.size()] = false;
|
||||
|
||||
if(a.GenericEnabled)
|
||||
if(a.genericEnabled)
|
||||
{
|
||||
m_ModelVSIn->genericsEnabled[m_ModelVSIn->columns.size()] = true;
|
||||
m_ModelVSIn->generics[m_ModelVSIn->columns.size()] = a.GenericValue;
|
||||
m_ModelVSIn->generics[m_ModelVSIn->columns.size()] = a.genericValue;
|
||||
}
|
||||
|
||||
m_ModelVSIn->columns.push_back(f);
|
||||
@@ -2270,7 +2270,7 @@ void BufferViewer::configureMeshColumns()
|
||||
Viewport vp = m_Ctx.CurPipelineState().GetViewport(0);
|
||||
|
||||
m_Config.fov = ui->fovGuess->value();
|
||||
m_Config.aspect = vp.width / vp.height;
|
||||
m_Config.aspect = (vp.width > 0.0f && vp.height > 0.0f) ? (vp.width / vp.height) : 1.0f;
|
||||
m_Config.highlightVert = 0;
|
||||
|
||||
if(ui->aspectGuess->value() > 0.0)
|
||||
@@ -2288,10 +2288,10 @@ void BufferViewer::configureMeshColumns()
|
||||
|
||||
if(draw && vs)
|
||||
{
|
||||
m_ModelVSOut->columns.reserve(vs->OutputSig.count());
|
||||
m_ModelVSOut->columns.reserve(vs->outputSignature.count());
|
||||
|
||||
int i = 0, posidx = -1;
|
||||
for(const SigParameter &sig : vs->OutputSig)
|
||||
for(const SigParameter &sig : vs->outputSignature)
|
||||
{
|
||||
FormatElement f;
|
||||
|
||||
@@ -2355,10 +2355,10 @@ void BufferViewer::configureMeshColumns()
|
||||
|
||||
if(last)
|
||||
{
|
||||
m_ModelGSOut->columns.reserve(last->OutputSig.count());
|
||||
m_ModelGSOut->columns.reserve(last->outputSignature.count());
|
||||
|
||||
int i = 0, posidx = -1;
|
||||
for(const SigParameter &sig : last->OutputSig)
|
||||
for(const SigParameter &sig : last->outputSignature)
|
||||
{
|
||||
FormatElement f;
|
||||
|
||||
@@ -2474,12 +2474,12 @@ void BufferViewer::UpdateMeshConfig()
|
||||
{
|
||||
BBoxData bbox;
|
||||
|
||||
uint32_t eventID = m_Ctx.CurEvent();
|
||||
uint32_t eventId = m_Ctx.CurEvent();
|
||||
|
||||
{
|
||||
QMutexLocker autolocker(&m_BBoxLock);
|
||||
if(m_BBoxes.contains(eventID))
|
||||
bbox = m_BBoxes[eventID];
|
||||
if(m_BBoxes.contains(eventId))
|
||||
bbox = m_BBoxes[eventId];
|
||||
}
|
||||
|
||||
m_Config.type = m_CurStage;
|
||||
@@ -2940,7 +2940,7 @@ void BufferViewer::camGuess_changed(double value)
|
||||
|
||||
// take a guess for the aspect ratio, for if the user hasn't overridden it
|
||||
Viewport vp = m_Ctx.CurPipelineState().GetViewport(0);
|
||||
m_Config.aspect = vp.width / vp.height;
|
||||
m_Config.aspect = (vp.width > 0.0f && vp.height > 0.0f) ? (vp.width / vp.height) : 1.0f;
|
||||
|
||||
if(ui->aspectGuess->value() > 0.0)
|
||||
m_Config.aspect = ui->aspectGuess->value();
|
||||
|
||||
@@ -84,8 +84,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
QVariant persistData();
|
||||
void setPersistData(const QVariant &persistData);
|
||||
@@ -164,7 +164,7 @@ private:
|
||||
|
||||
struct CalcBoundingBoxData
|
||||
{
|
||||
uint32_t eventID;
|
||||
uint32_t eventId;
|
||||
uint32_t inst;
|
||||
int32_t baseVertex;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ void CommentView::OnCaptureLoaded()
|
||||
m_ignoreModifications = false;
|
||||
}
|
||||
|
||||
void CommentView::OnEventChanged(uint32_t eventID)
|
||||
void CommentView::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
QString oldText = QString::fromUtf8(m_commentsEditor->getText(m_commentsEditor->textLength() + 1));
|
||||
QString newText = m_Ctx.GetNotes("comments");
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
@@ -105,12 +105,12 @@ void ConstantBufferPreviewer::OnCaptureClosed()
|
||||
ToolWindowManager::closeToolWindow(this);
|
||||
}
|
||||
|
||||
void ConstantBufferPreviewer::OnEventChanged(uint32_t eventID)
|
||||
void ConstantBufferPreviewer::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
BoundCBuffer cb = m_Ctx.CurPipelineState().GetConstantBuffer(m_stage, m_slot, m_arrayIdx);
|
||||
m_cbuffer = cb.Buffer;
|
||||
uint64_t offs = cb.ByteOffset;
|
||||
uint64_t size = cb.ByteSize;
|
||||
m_cbuffer = cb.resourceId;
|
||||
uint64_t offs = cb.byteOffset;
|
||||
uint64_t size = cb.byteSize;
|
||||
|
||||
m_shader = m_Ctx.CurPipelineState().GetShader(m_stage);
|
||||
QString entryPoint = m_Ctx.CurPipelineState().GetShaderEntryPoint(m_stage);
|
||||
@@ -118,7 +118,7 @@ void ConstantBufferPreviewer::OnEventChanged(uint32_t eventID)
|
||||
|
||||
updateLabels();
|
||||
|
||||
if(reflection == NULL || m_slot >= reflection->ConstantBlocks.size())
|
||||
if(reflection == NULL || m_slot >= reflection->constantBlocks.size())
|
||||
{
|
||||
setVariables({});
|
||||
return;
|
||||
@@ -344,9 +344,9 @@ void ConstantBufferPreviewer::updateLabels()
|
||||
|
||||
if(reflection != NULL)
|
||||
{
|
||||
if(m_Ctx.IsAutogeneratedName(m_cbuffer) && m_slot < reflection->ConstantBlocks.size() &&
|
||||
!reflection->ConstantBlocks[m_slot].name.isEmpty())
|
||||
bufName = QFormatStr("<%1>").arg(reflection->ConstantBlocks[m_slot].name);
|
||||
if(m_Ctx.IsAutogeneratedName(m_cbuffer) && m_slot < reflection->constantBlocks.size() &&
|
||||
!reflection->constantBlocks[m_slot].name.isEmpty())
|
||||
bufName = QFormatStr("<%1>").arg(reflection->constantBlocks[m_slot].name);
|
||||
}
|
||||
|
||||
ui->nameLabel->setText(bufName);
|
||||
|
||||
@@ -53,8 +53,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
switch(col)
|
||||
{
|
||||
case 0: return msg.eventID;
|
||||
case 0: return msg.eventId;
|
||||
case 1: return ToQStr(msg.source);
|
||||
case 2: return ToQStr(msg.severity);
|
||||
case 3: return ToQStr(msg.category);
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
if(index.isValid() && role == EIDRole && index.row() >= 0 &&
|
||||
index.row() < m_Ctx.DebugMessages().count())
|
||||
return m_Ctx.DebugMessages()[index.row()].eventID;
|
||||
return m_Ctx.DebugMessages()[index.row()].eventId;
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
@@ -187,7 +187,7 @@ protected:
|
||||
const DebugMessage &leftMsg = m_Ctx.DebugMessages()[left.row()];
|
||||
const DebugMessage &rightMsg = m_Ctx.DebugMessages()[right.row()];
|
||||
|
||||
if(leftMsg.eventID < rightMsg.eventID)
|
||||
if(leftMsg.eventId < rightMsg.eventId)
|
||||
return true;
|
||||
|
||||
if(leftMsg.source < rightMsg.source)
|
||||
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override {}
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override {}
|
||||
void RefreshMessageList();
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -425,7 +425,7 @@ void CaptureDialog::CheckAndroidSetup(QString &filename)
|
||||
|
||||
LambdaThread *scan = new LambdaThread([this, filename]() {
|
||||
|
||||
rdcstr host = m_Ctx.Replay().CurrentRemote()->Hostname;
|
||||
rdcstr host = m_Ctx.Replay().CurrentRemote()->hostname;
|
||||
RENDERDOC_CheckAndroidPackage(host.c_str(), filename.toUtf8().data(), &m_AndroidFlags);
|
||||
|
||||
const bool missingLibrary = bool(m_AndroidFlags & AndroidFlags::MissingLibrary);
|
||||
@@ -544,7 +544,7 @@ void CaptureDialog::androidWarn_mouseClick()
|
||||
|
||||
// Call into layer push routine, then continue
|
||||
LambdaThread *push = new LambdaThread([this, exe, &pushSucceeded]() {
|
||||
rdcstr host = m_Ctx.Replay().CurrentRemote()->Hostname;
|
||||
rdcstr host = m_Ctx.Replay().CurrentRemote()->hostname;
|
||||
if(RENDERDOC_PushLayerToInstalledAndroidApp(host.c_str(), exe.toUtf8().data()))
|
||||
{
|
||||
// Sucess!
|
||||
@@ -609,7 +609,7 @@ void CaptureDialog::androidWarn_mouseClick()
|
||||
|
||||
// call into APK pull, patch, install routine, then continue
|
||||
LambdaThread *patch = new LambdaThread([this, exe, &patchSucceeded, &progress]() {
|
||||
rdcstr host = m_Ctx.Replay().CurrentRemote()->Hostname;
|
||||
rdcstr host = m_Ctx.Replay().CurrentRemote()->hostname;
|
||||
if(RENDERDOC_AddLayerToAndroidPackage(host.c_str(), exe.toUtf8().data(), &progress))
|
||||
{
|
||||
// Sucess!
|
||||
@@ -698,7 +698,7 @@ void CaptureDialog::on_exePathBrowse_clicked()
|
||||
{
|
||||
SetExecutableFilename(filename);
|
||||
|
||||
if(m_Ctx.Replay().CurrentRemote() && m_Ctx.Replay().CurrentRemote()->IsHostADB())
|
||||
if(m_Ctx.Replay().CurrentRemote() && m_Ctx.Replay().CurrentRemote()->IsADB())
|
||||
{
|
||||
CheckAndroidSetup(filename);
|
||||
}
|
||||
@@ -831,7 +831,7 @@ void CaptureDialog::on_toggleGlobal_clicked()
|
||||
QString capturefile = m_Ctx.TempCaptureFilename(QFileInfo(exe).baseName());
|
||||
|
||||
bool success = RENDERDOC_StartGlobalHook(exe.toUtf8().data(), capturefile.toUtf8().data(),
|
||||
Settings().Options);
|
||||
Settings().options);
|
||||
|
||||
if(!success)
|
||||
{
|
||||
@@ -907,30 +907,30 @@ void CaptureDialog::on_close_clicked()
|
||||
|
||||
void CaptureDialog::SetSettings(CaptureSettings settings)
|
||||
{
|
||||
SetInjectMode(settings.Inject);
|
||||
SetInjectMode(settings.inject);
|
||||
|
||||
ui->exePath->setText(settings.Executable);
|
||||
ui->workDirPath->setText(settings.WorkingDir);
|
||||
ui->cmdline->setText(settings.CmdLine);
|
||||
ui->exePath->setText(settings.executable);
|
||||
ui->workDirPath->setText(settings.workingDir);
|
||||
ui->cmdline->setText(settings.commandLine);
|
||||
|
||||
SetEnvironmentModifications(settings.Environment);
|
||||
SetEnvironmentModifications(settings.environment);
|
||||
|
||||
ui->AllowFullscreen->setChecked(settings.Options.AllowFullscreen);
|
||||
ui->AllowVSync->setChecked(settings.Options.AllowVSync);
|
||||
ui->HookIntoChildren->setChecked(settings.Options.HookIntoChildren);
|
||||
ui->CaptureCallstacks->setChecked(settings.Options.CaptureCallstacks);
|
||||
ui->CaptureCallstacksOnlyDraws->setChecked(settings.Options.CaptureCallstacksOnlyDraws);
|
||||
ui->APIValidation->setChecked(settings.Options.APIValidation);
|
||||
ui->RefAllResources->setChecked(settings.Options.RefAllResources);
|
||||
ui->SaveAllInitials->setChecked(settings.Options.SaveAllInitials);
|
||||
ui->DelayForDebugger->setValue(settings.Options.DelayForDebugger);
|
||||
ui->VerifyMapWrites->setChecked(settings.Options.VerifyMapWrites);
|
||||
ui->AutoStart->setChecked(settings.AutoStart);
|
||||
ui->AllowFullscreen->setChecked(settings.options.allowFullscreen);
|
||||
ui->AllowVSync->setChecked(settings.options.allowVSync);
|
||||
ui->HookIntoChildren->setChecked(settings.options.hookIntoChildren);
|
||||
ui->CaptureCallstacks->setChecked(settings.options.captureCallstacks);
|
||||
ui->CaptureCallstacksOnlyDraws->setChecked(settings.options.captureCallstacksOnlyDraws);
|
||||
ui->APIValidation->setChecked(settings.options.apiValidation);
|
||||
ui->RefAllResources->setChecked(settings.options.refAllResources);
|
||||
ui->SaveAllInitials->setChecked(settings.options.saveAllInitials);
|
||||
ui->DelayForDebugger->setValue(settings.options.delayForDebugger);
|
||||
ui->VerifyMapWrites->setChecked(settings.options.verifyMapWrites);
|
||||
ui->AutoStart->setChecked(settings.autoStart);
|
||||
|
||||
// force flush this state
|
||||
on_CaptureCallstacks_toggled(ui->CaptureCallstacks->isChecked());
|
||||
|
||||
if(settings.AutoStart)
|
||||
if(settings.autoStart)
|
||||
{
|
||||
TriggerCapture();
|
||||
}
|
||||
@@ -940,27 +940,27 @@ CaptureSettings CaptureDialog::Settings()
|
||||
{
|
||||
CaptureSettings ret;
|
||||
|
||||
ret.Inject = IsInjectMode();
|
||||
ret.inject = IsInjectMode();
|
||||
|
||||
ret.AutoStart = ui->AutoStart->isChecked();
|
||||
ret.autoStart = ui->AutoStart->isChecked();
|
||||
|
||||
ret.Executable = ui->exePath->text();
|
||||
ret.WorkingDir = ui->workDirPath->text();
|
||||
ret.CmdLine = ui->cmdline->text();
|
||||
ret.executable = ui->exePath->text();
|
||||
ret.workingDir = ui->workDirPath->text();
|
||||
ret.commandLine = ui->cmdline->text();
|
||||
|
||||
ret.Environment = m_EnvModifications;
|
||||
ret.environment = m_EnvModifications;
|
||||
|
||||
ret.Options.AllowFullscreen = ui->AllowFullscreen->isChecked();
|
||||
ret.Options.AllowVSync = ui->AllowVSync->isChecked();
|
||||
ret.Options.HookIntoChildren = ui->HookIntoChildren->isChecked();
|
||||
ret.Options.CaptureCallstacks = ui->CaptureCallstacks->isChecked();
|
||||
ret.Options.CaptureCallstacksOnlyDraws = ui->CaptureCallstacksOnlyDraws->isChecked();
|
||||
ret.Options.APIValidation = ui->APIValidation->isChecked();
|
||||
ret.Options.RefAllResources = ui->RefAllResources->isChecked();
|
||||
ret.Options.SaveAllInitials = ui->SaveAllInitials->isChecked();
|
||||
ret.Options.CaptureAllCmdLists = ui->CaptureAllCmdLists->isChecked();
|
||||
ret.Options.DelayForDebugger = (uint32_t)ui->DelayForDebugger->value();
|
||||
ret.Options.VerifyMapWrites = ui->VerifyMapWrites->isChecked();
|
||||
ret.options.allowFullscreen = ui->AllowFullscreen->isChecked();
|
||||
ret.options.allowVSync = ui->AllowVSync->isChecked();
|
||||
ret.options.hookIntoChildren = ui->HookIntoChildren->isChecked();
|
||||
ret.options.captureCallstacks = ui->CaptureCallstacks->isChecked();
|
||||
ret.options.captureCallstacksOnlyDraws = ui->CaptureCallstacksOnlyDraws->isChecked();
|
||||
ret.options.apiValidation = ui->APIValidation->isChecked();
|
||||
ret.options.refAllResources = ui->RefAllResources->isChecked();
|
||||
ret.options.saveAllInitials = ui->SaveAllInitials->isChecked();
|
||||
ret.options.captureAllCmdLists = ui->CaptureAllCmdLists->isChecked();
|
||||
ret.options.delayForDebugger = (uint32_t)ui->DelayForDebugger->value();
|
||||
ret.options.verifyMapWrites = ui->VerifyMapWrites->isChecked();
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1107,7 +1107,7 @@ void CaptureDialog::TriggerCapture()
|
||||
QString name = m_ProcessModel->data(m_ProcessModel->index(item.row(), 0)).toString();
|
||||
uint32_t PID = m_ProcessModel->data(m_ProcessModel->index(item.row(), 1)).toUInt();
|
||||
|
||||
m_InjectCallback(PID, Settings().Environment, name, Settings().Options,
|
||||
m_InjectCallback(PID, Settings().environment, name, Settings().options,
|
||||
[this](LiveCapture *live) {
|
||||
if(ui->queueFrameCap->isChecked())
|
||||
live->QueueCapture((int)ui->queuedFrame->value());
|
||||
@@ -1144,7 +1144,7 @@ void CaptureDialog::TriggerCapture()
|
||||
|
||||
QString cmdLine = ui->cmdline->text();
|
||||
|
||||
m_CaptureCallback(exe, workingDir, cmdLine, Settings().Environment, Settings().Options,
|
||||
m_CaptureCallback(exe, workingDir, cmdLine, Settings().environment, Settings().options,
|
||||
[this](LiveCapture *live) {
|
||||
if(ui->queueFrameCap->isChecked())
|
||||
live->QueueCapture((int)ui->queuedFrame->value());
|
||||
|
||||
@@ -360,7 +360,7 @@ void CrashDialog::sendReport()
|
||||
if(!m_ReportID.isEmpty())
|
||||
{
|
||||
BugReport bug;
|
||||
bug.ID = m_ReportID;
|
||||
bug.reportId = m_ReportID;
|
||||
QString url = bug.URL();
|
||||
|
||||
text +=
|
||||
@@ -409,9 +409,9 @@ void CrashDialog::on_buttonBox_accepted()
|
||||
{
|
||||
// add to list of bug reports to check for updates.
|
||||
BugReport bug;
|
||||
bug.ID = m_ReportID;
|
||||
bug.SubmitDate = QDateTime::currentDateTimeUtc();
|
||||
bug.CheckDate = QDateTime::currentDateTimeUtc();
|
||||
bug.reportId = m_ReportID;
|
||||
bug.submitDate = QDateTime::currentDateTimeUtc();
|
||||
bug.checkDate = QDateTime::currentDateTimeUtc();
|
||||
m_Config.CrashReport_ReportedBugs.push_back(bug);
|
||||
|
||||
if(m_Config.CrashReport_ReportedBugs.count() > 20)
|
||||
|
||||
@@ -618,8 +618,8 @@ bool LiveCapture::checkAllowClose()
|
||||
// to by having an active connection or replay context on that host.
|
||||
if(suppressRemoteWarning == false && (!m_Connection || !m_Connection->Connected()) &&
|
||||
!cap->local && (!m_Ctx.Replay().CurrentRemote() ||
|
||||
QString(m_Ctx.Replay().CurrentRemote()->Hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->Connected))
|
||||
QString(m_Ctx.Replay().CurrentRemote()->hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->connected))
|
||||
{
|
||||
QMessageBox::StandardButton res2 = RDDialog::question(
|
||||
this, tr("No active replay context"),
|
||||
@@ -671,8 +671,8 @@ void LiveCapture::openCapture(Capture *cap)
|
||||
cap->opened = true;
|
||||
|
||||
if(!cap->local && (!m_Ctx.Replay().CurrentRemote() ||
|
||||
QString(m_Ctx.Replay().CurrentRemote()->Hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->Connected))
|
||||
QString(m_Ctx.Replay().CurrentRemote()->hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->connected))
|
||||
{
|
||||
RDDialog::critical(
|
||||
this, tr("No active replay context"),
|
||||
@@ -726,8 +726,8 @@ bool LiveCapture::saveCapture(Capture *cap)
|
||||
else
|
||||
{
|
||||
if(!m_Ctx.Replay().CurrentRemote() ||
|
||||
QString(m_Ctx.Replay().CurrentRemote()->Hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->Connected)
|
||||
QString(m_Ctx.Replay().CurrentRemote()->hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->connected)
|
||||
{
|
||||
RDDialog::critical(this, tr("No active replay context"),
|
||||
tr("This capture is on remote host %1 and there is no active replay "
|
||||
@@ -952,8 +952,8 @@ void LiveCapture::connectionClosed()
|
||||
if(!cap->local)
|
||||
{
|
||||
if(!m_Ctx.Replay().CurrentRemote() ||
|
||||
QString(m_Ctx.Replay().CurrentRemote()->Hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->Connected)
|
||||
QString(m_Ctx.Replay().CurrentRemote()->hostname) != m_Hostname ||
|
||||
!m_Ctx.Replay().CurrentRemote()->connected)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1089,9 +1089,9 @@ void LiveCapture::connectionThreadEntry()
|
||||
|
||||
TargetControlMessage msg = m_Connection->ReceiveMessage();
|
||||
|
||||
if(msg.Type == TargetControlMessageType::RegisterAPI)
|
||||
if(msg.type == TargetControlMessageType::RegisterAPI)
|
||||
{
|
||||
QString api = msg.RegisterAPI.APIName;
|
||||
QString api = msg.apiUse.name;
|
||||
GUIInvoke::call([this, api]() {
|
||||
QString target = QString::fromUtf8(m_Connection->GetTarget());
|
||||
uint32_t pid = m_Connection->GetPID();
|
||||
@@ -1111,16 +1111,16 @@ void LiveCapture::connectionThreadEntry()
|
||||
});
|
||||
}
|
||||
|
||||
if(msg.Type == TargetControlMessageType::NewCapture)
|
||||
if(msg.type == TargetControlMessageType::NewCapture)
|
||||
{
|
||||
uint32_t capID = msg.NewCapture.ID;
|
||||
uint32_t capID = msg.newCapture.captureId;
|
||||
QDateTime timestamp = QDateTime(QDate(1970, 1, 1), QTime(0, 0, 0));
|
||||
timestamp = timestamp.addSecs(msg.NewCapture.timestamp).toLocalTime();
|
||||
bytebuf thumb = msg.NewCapture.thumbnail;
|
||||
int32_t thumbWidth = msg.NewCapture.thumbWidth;
|
||||
int32_t thumbHeight = msg.NewCapture.thumbHeight;
|
||||
QString path = msg.NewCapture.path;
|
||||
bool local = msg.NewCapture.local;
|
||||
timestamp = timestamp.addSecs(msg.newCapture.timestamp).toLocalTime();
|
||||
bytebuf thumb = msg.newCapture.thumbnail;
|
||||
int32_t thumbWidth = msg.newCapture.thumbWidth;
|
||||
int32_t thumbHeight = msg.newCapture.thumbHeight;
|
||||
QString path = msg.newCapture.path;
|
||||
bool local = msg.newCapture.local;
|
||||
|
||||
GUIInvoke::call([this, capID, timestamp, thumb, thumbWidth, thumbHeight, path, local]() {
|
||||
QString target = QString::fromUtf8(m_Connection->GetTarget());
|
||||
@@ -1130,21 +1130,21 @@ void LiveCapture::connectionThreadEntry()
|
||||
});
|
||||
}
|
||||
|
||||
if(msg.Type == TargetControlMessageType::CaptureCopied)
|
||||
if(msg.type == TargetControlMessageType::CaptureCopied)
|
||||
{
|
||||
uint32_t capID = msg.NewCapture.ID;
|
||||
QString path = msg.NewCapture.path;
|
||||
uint32_t capID = msg.newCapture.captureId;
|
||||
QString path = msg.newCapture.path;
|
||||
|
||||
GUIInvoke::call([=]() { captureCopied(capID, path); });
|
||||
}
|
||||
|
||||
if(msg.Type == TargetControlMessageType::NewChild)
|
||||
if(msg.type == TargetControlMessageType::NewChild)
|
||||
{
|
||||
if(msg.NewChild.PID != 0)
|
||||
if(msg.newChild.processId != 0)
|
||||
{
|
||||
ChildProcess c;
|
||||
c.PID = (int)msg.NewChild.PID;
|
||||
c.ident = msg.NewChild.ident;
|
||||
c.PID = (int)msg.newChild.processId;
|
||||
c.ident = msg.newChild.ident;
|
||||
|
||||
{
|
||||
QMutexLocker l(&m_ChildrenLock);
|
||||
|
||||
@@ -273,10 +273,10 @@ void PerformanceCounterSelection::SetCounters(const QVector<CounterDescription>
|
||||
|
||||
for(const CounterDescription &desc : descriptions)
|
||||
{
|
||||
m_CounterToUuid[desc.counterID] = desc.uuid;
|
||||
m_UuidToCounter[desc.uuid] = desc.counterID;
|
||||
m_CounterToUuid[desc.counter] = desc.uuid;
|
||||
m_UuidToCounter[desc.uuid] = desc.counter;
|
||||
|
||||
const CounterFamily family = GetCounterFamily(desc.counterID);
|
||||
const CounterFamily family = GetCounterFamily(desc.counter);
|
||||
if(family != currentFamily)
|
||||
{
|
||||
currentRoot = new RDTreeWidgetItem();
|
||||
@@ -314,12 +314,12 @@ void PerformanceCounterSelection::SetCounters(const QVector<CounterDescription>
|
||||
RDTreeWidgetItem *counterItem = new RDTreeWidgetItem();
|
||||
counterItem->setText(0, desc.name);
|
||||
counterItem->setData(0, CounterDescriptionRole, desc.description);
|
||||
counterItem->setData(0, CounterIdRole, (uint32_t)desc.counterID);
|
||||
counterItem->setData(0, CounterIdRole, (uint32_t)desc.counter);
|
||||
counterItem->setCheckState(0, Qt::Unchecked);
|
||||
counterItem->setData(0, PreviousCheckStateRole, Qt::Unchecked);
|
||||
categoryItem->addChild(counterItem);
|
||||
|
||||
m_CounterToTreeItem[desc.counterID] = counterItem;
|
||||
m_CounterToTreeItem[desc.counter] = counterItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,8 +142,8 @@ void RemoteManager::setRemoteServerLive(RDTreeWidgetItem *node, bool live, bool
|
||||
if(!host)
|
||||
return;
|
||||
|
||||
host->ServerRunning = live;
|
||||
host->Busy = busy;
|
||||
host->serverRunning = live;
|
||||
host->busy = busy;
|
||||
|
||||
if(host->IsLocalhost())
|
||||
{
|
||||
@@ -154,11 +154,11 @@ void RemoteManager::setRemoteServerLive(RDTreeWidgetItem *node, bool live, bool
|
||||
{
|
||||
QString text = live ? tr("Remote server running") : tr("No remote server");
|
||||
|
||||
if(host->Connected)
|
||||
if(host->connected)
|
||||
text += tr(" (Active Context)");
|
||||
else if(host->VersionMismatch)
|
||||
else if(host->versionMismatch)
|
||||
text += tr(" (Version Mismatch)");
|
||||
else if(host->Busy)
|
||||
else if(host->busy)
|
||||
text += tr(" (Busy)");
|
||||
|
||||
node->setText(1, text);
|
||||
@@ -170,7 +170,7 @@ void RemoteManager::setRemoteServerLive(RDTreeWidgetItem *node, bool live, bool
|
||||
bool RemoteManager::isRemoteServerLive(RDTreeWidgetItem *node)
|
||||
{
|
||||
RemoteHost *host = getRemoteHost(node);
|
||||
return host && host->ServerRunning;
|
||||
return host && host->serverRunning;
|
||||
}
|
||||
|
||||
void RemoteManager::addHost(RemoteHost *host)
|
||||
@@ -228,7 +228,7 @@ void RemoteManager::refreshHost(RDTreeWidgetItem *node)
|
||||
host->CheckStatus();
|
||||
|
||||
GUIInvoke::call(
|
||||
[this, node, host]() { setRemoteServerLive(node, host->ServerRunning, host->Busy); });
|
||||
[this, node, host]() { setRemoteServerLive(node, host->serverRunning, host->busy); });
|
||||
|
||||
uint32_t nextIdent = 0;
|
||||
|
||||
@@ -237,13 +237,13 @@ void RemoteManager::refreshHost(RDTreeWidgetItem *node)
|
||||
// just a sanity check to make sure we don't hit some unexpected case and infinite loop
|
||||
uint32_t prevIdent = nextIdent;
|
||||
|
||||
nextIdent = RENDERDOC_EnumerateRemoteTargets(host->Hostname.c_str(), nextIdent);
|
||||
nextIdent = RENDERDOC_EnumerateRemoteTargets(host->hostname.c_str(), nextIdent);
|
||||
|
||||
if(nextIdent == 0 || prevIdent >= nextIdent)
|
||||
break;
|
||||
|
||||
ITargetControl *conn =
|
||||
RENDERDOC_CreateTargetControl(host->Hostname.c_str(), nextIdent, username.data(), false);
|
||||
RENDERDOC_CreateTargetControl(host->hostname.c_str(), nextIdent, username.data(), false);
|
||||
|
||||
if(conn)
|
||||
{
|
||||
@@ -258,7 +258,7 @@ void RemoteManager::refreshHost(RDTreeWidgetItem *node)
|
||||
else
|
||||
running = tr("Running %1").arg(api);
|
||||
|
||||
RemoteConnect tag(host->Hostname, host->Name(), nextIdent);
|
||||
RemoteConnect tag(host->hostname, host->Name(), nextIdent);
|
||||
|
||||
GUIInvoke::call([this, node, target, running, tag]() {
|
||||
RDTreeWidgetItem *child = new RDTreeWidgetItem({target, running});
|
||||
@@ -340,18 +340,18 @@ void RemoteManager::updateConnectButton()
|
||||
ui->connect->setText(tr("Run Server"));
|
||||
ui->connect->setEnabled(false);
|
||||
}
|
||||
else if(host->ServerRunning)
|
||||
else if(host->serverRunning)
|
||||
{
|
||||
ui->connect->setText(tr("Shutdown"));
|
||||
|
||||
if(host->Busy && !host->Connected)
|
||||
if(host->busy && !host->connected)
|
||||
ui->connect->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->connect->setText(tr("Run Server"));
|
||||
|
||||
if(host->RunCommand.isEmpty())
|
||||
if(host->runCommand.isEmpty())
|
||||
ui->connect->setEnabled(false);
|
||||
}
|
||||
}
|
||||
@@ -371,7 +371,7 @@ void RemoteManager::addNewHost()
|
||||
|
||||
for(int i = 0; i < m_Ctx.Config().RemoteHosts.count(); i++)
|
||||
{
|
||||
QString hostname = m_Ctx.Config().RemoteHosts[i]->Hostname;
|
||||
QString hostname = m_Ctx.Config().RemoteHosts[i]->hostname;
|
||||
if(hostname.compare(host, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
found = true;
|
||||
@@ -382,8 +382,8 @@ void RemoteManager::addNewHost()
|
||||
if(!found)
|
||||
{
|
||||
RemoteHost *h = new RemoteHost();
|
||||
h->Hostname = host;
|
||||
h->RunCommand = ui->runCommand->text().trimmed();
|
||||
h->hostname = host;
|
||||
h->runCommand = ui->runCommand->text().trimmed();
|
||||
|
||||
m_Ctx.Config().RemoteHosts.push_back(h);
|
||||
m_Ctx.Config().Save();
|
||||
@@ -406,7 +406,7 @@ void RemoteManager::setRunCommand()
|
||||
|
||||
if(h)
|
||||
{
|
||||
h->RunCommand = ui->runCommand->text().trimmed();
|
||||
h->runCommand = ui->runCommand->text().trimmed();
|
||||
m_Ctx.Config().Save();
|
||||
}
|
||||
}
|
||||
@@ -451,12 +451,12 @@ void RemoteManager::on_hosts_itemSelectionChanged()
|
||||
if(ui->refreshAll->isEnabled())
|
||||
ui->refreshOne->setEnabled(true);
|
||||
|
||||
ui->runCommand->setText(host->RunCommand);
|
||||
ui->runCommand->setText(host->runCommand);
|
||||
ui->hostname->setText(host->Name());
|
||||
|
||||
ui->addUpdateHost->setText(tr("Update"));
|
||||
|
||||
if(host->IsLocalhost() || host->IsHostADB())
|
||||
if(host->IsLocalhost() || host->IsADB())
|
||||
{
|
||||
// localhost and android hosts cannot be updated or have their run command changed
|
||||
ui->addUpdateHost->setEnabled(false);
|
||||
@@ -591,7 +591,7 @@ void RemoteManager::on_connect_clicked()
|
||||
}
|
||||
else if(host)
|
||||
{
|
||||
if(host->ServerRunning)
|
||||
if(host->serverRunning)
|
||||
{
|
||||
QMessageBox::StandardButton res = RDDialog::question(
|
||||
this, tr("Remote server shutdown"),
|
||||
@@ -602,7 +602,7 @@ void RemoteManager::on_connect_clicked()
|
||||
return;
|
||||
|
||||
// shut down
|
||||
if(host->Connected)
|
||||
if(host->connected)
|
||||
{
|
||||
m_Ctx.Replay().ShutdownServer();
|
||||
setRemoteServerLive(node, false, false);
|
||||
@@ -611,7 +611,7 @@ void RemoteManager::on_connect_clicked()
|
||||
{
|
||||
IRemoteServer *server = NULL;
|
||||
ReplayStatus status =
|
||||
RENDERDOC_CreateRemoteServerConnection(host->Hostname.c_str(), 0, &server);
|
||||
RENDERDOC_CreateRemoteServerConnection(host->hostname.c_str(), 0, &server);
|
||||
if(server)
|
||||
server->ShutdownServerAndConnection();
|
||||
setRemoteServerLive(node, false, false);
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
struct EventItemTag
|
||||
{
|
||||
EventItemTag() = default;
|
||||
EventItemTag(uint32_t eventID) : EID(eventID), lastEID(eventID) {}
|
||||
EventItemTag(uint32_t eventID, uint32_t lastEventID) : EID(eventID), lastEID(lastEventID) {}
|
||||
EventItemTag(uint32_t eventId) : EID(eventId), lastEID(eventId) {}
|
||||
EventItemTag(uint32_t eventId, uint32_t lastEventID) : EID(eventId), lastEID(lastEventID) {}
|
||||
uint32_t EID = 0;
|
||||
uint32_t lastEID = 0;
|
||||
double duration = -1.0;
|
||||
@@ -237,9 +237,9 @@ void EventBrowser::OnCaptureClosed()
|
||||
ui->stepNext->setEnabled(false);
|
||||
}
|
||||
|
||||
void EventBrowser::OnEventChanged(uint32_t eventID)
|
||||
void EventBrowser::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
SelectEvent(eventID);
|
||||
SelectEvent(eventId);
|
||||
repopulateBookmarks();
|
||||
highlightBookmarks();
|
||||
}
|
||||
@@ -254,28 +254,28 @@ QPair<uint32_t, uint32_t> EventBrowser::AddDrawcalls(RDTreeWidgetItem *parent,
|
||||
const DrawcallDescription &d = draws[i];
|
||||
|
||||
RDTreeWidgetItem *child = new RDTreeWidgetItem(
|
||||
{d.name, QString::number(d.eventID), QString::number(d.drawcallID), lit("---")});
|
||||
{d.name, QString::number(d.eventId), QString::number(d.drawcallId), lit("---")});
|
||||
|
||||
QPair<uint32_t, uint32_t> last = AddDrawcalls(child, d.children);
|
||||
lastEID = last.first;
|
||||
lastDraw = last.second;
|
||||
|
||||
if(lastEID > d.eventID)
|
||||
if(lastEID > d.eventId)
|
||||
{
|
||||
child->setText(COL_EID, QFormatStr("%1-%2").arg(d.eventID).arg(lastEID));
|
||||
child->setText(COL_DRAW, QFormatStr("%1-%2").arg(d.drawcallID).arg(lastDraw));
|
||||
child->setText(COL_EID, QFormatStr("%1-%2").arg(d.eventId).arg(lastEID));
|
||||
child->setText(COL_DRAW, QFormatStr("%1-%2").arg(d.drawcallId).arg(lastDraw));
|
||||
}
|
||||
|
||||
if(lastEID == 0)
|
||||
{
|
||||
lastEID = d.eventID;
|
||||
lastDraw = d.drawcallID;
|
||||
lastEID = d.eventId;
|
||||
lastDraw = d.drawcallId;
|
||||
|
||||
if((draws[i].flags & DrawFlags::SetMarker) && i + 1 < draws.count())
|
||||
lastEID = draws[i + 1].eventID;
|
||||
lastEID = draws[i + 1].eventId;
|
||||
}
|
||||
|
||||
child->setTag(QVariant::fromValue(EventItemTag(draws[i].eventID, lastEID)));
|
||||
child->setTag(QVariant::fromValue(EventItemTag(draws[i].eventId, lastEID)));
|
||||
|
||||
if(m_Ctx.Config().EventBrowser_ApplyColors)
|
||||
{
|
||||
@@ -320,7 +320,7 @@ void EventBrowser::SetDrawcallTimes(RDTreeWidgetItem *node, const rdcarray<Count
|
||||
|
||||
for(const CounterResult &r : results)
|
||||
{
|
||||
if(r.eventID == eid)
|
||||
if(r.eventId == eid)
|
||||
duration = r.value.d;
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ void EventBrowser::on_events_currentItemChanged(RDTreeWidgetItem *current, RDTre
|
||||
ui->stepNext->setEnabled(true);
|
||||
|
||||
// special case for the first 'virtual' draw at EID 0
|
||||
if(m_Ctx.GetFirstDrawcall() && tag.lastEID == m_Ctx.GetFirstDrawcall()->eventID)
|
||||
if(m_Ctx.GetFirstDrawcall() && tag.lastEID == m_Ctx.GetFirstDrawcall()->eventId)
|
||||
ui->stepPrev->setEnabled(true);
|
||||
|
||||
highlightBookmarks();
|
||||
@@ -540,7 +540,7 @@ void EventBrowser::on_stepNext_clicked()
|
||||
|
||||
// special case for the first 'virtual' draw at EID 0
|
||||
if(m_Ctx.CurEvent() == 0)
|
||||
SelectEvent(m_Ctx.GetFirstDrawcall()->eventID);
|
||||
SelectEvent(m_Ctx.GetFirstDrawcall()->eventId);
|
||||
}
|
||||
|
||||
void EventBrowser::on_stepPrev_clicked()
|
||||
@@ -554,7 +554,7 @@ void EventBrowser::on_stepPrev_clicked()
|
||||
SelectEvent(draw->previous);
|
||||
|
||||
// special case for the first 'virtual' draw at EID 0
|
||||
if(m_Ctx.CurEvent() == m_Ctx.GetFirstDrawcall()->eventID)
|
||||
if(m_Ctx.CurEvent() == m_Ctx.GetFirstDrawcall()->eventId)
|
||||
SelectEvent(0);
|
||||
}
|
||||
|
||||
@@ -715,7 +715,7 @@ double EventBrowser::GetDrawTime(const DrawcallDescription &drawcall)
|
||||
|
||||
for(const CounterResult &r : m_Times)
|
||||
{
|
||||
if(r.eventID == drawcall.eventID)
|
||||
if(r.eventId == drawcall.eventId)
|
||||
return r.value.d;
|
||||
}
|
||||
|
||||
@@ -741,14 +741,14 @@ void EventBrowser::GetMaxNameLength(int &maxNameLength, int indent, bool firstch
|
||||
void EventBrowser::ExportDrawcall(QTextStream &writer, int maxNameLength, int indent,
|
||||
bool firstchild, const DrawcallDescription &drawcall)
|
||||
{
|
||||
QString eidString = drawcall.children.empty() ? QString::number(drawcall.eventID) : QString();
|
||||
QString eidString = drawcall.children.empty() ? QString::number(drawcall.eventId) : QString();
|
||||
|
||||
QString nameString = GetExportDrawcallString(indent, firstchild, drawcall);
|
||||
|
||||
QString line = QFormatStr("%1 | %2 | %3")
|
||||
.arg(eidString, -5)
|
||||
.arg(nameString, -maxNameLength)
|
||||
.arg(drawcall.drawcallID, -6);
|
||||
.arg(drawcall.drawcallId, -6);
|
||||
|
||||
if(!m_Times.empty())
|
||||
{
|
||||
@@ -929,9 +929,9 @@ void EventBrowser::repopulateBookmarks()
|
||||
// add any bookmark markers that we don't have
|
||||
for(const EventBookmark &mark : bookmarks)
|
||||
{
|
||||
if(!m_BookmarkButtons.contains(mark.EID))
|
||||
if(!m_BookmarkButtons.contains(mark.eventId))
|
||||
{
|
||||
uint32_t EID = mark.EID;
|
||||
uint32_t EID = mark.eventId;
|
||||
|
||||
QToolButton *but = new QToolButton(this);
|
||||
|
||||
@@ -1007,7 +1007,7 @@ void EventBrowser::jumpToBookmark(int idx)
|
||||
return;
|
||||
|
||||
// don't exclude ourselves, so we're updated as normal
|
||||
SelectEvent(bookmarks[idx].EID);
|
||||
SelectEvent(bookmarks[idx].eventId);
|
||||
}
|
||||
|
||||
void EventBrowser::highlightBookmarks()
|
||||
@@ -1046,7 +1046,7 @@ void EventBrowser::RefreshIcon(RDTreeWidgetItem *item, EventItemTag tag)
|
||||
item->setIcon(COL_NAME, QIcon());
|
||||
}
|
||||
|
||||
bool EventBrowser::FindEventNode(RDTreeWidgetItem *&found, RDTreeWidgetItem *parent, uint32_t eventID)
|
||||
bool EventBrowser::FindEventNode(RDTreeWidgetItem *&found, RDTreeWidgetItem *parent, uint32_t eventId)
|
||||
{
|
||||
// do a reverse search to find the last match (in case of 'set' markers that
|
||||
// inherit the event of the next real draw).
|
||||
@@ -1057,15 +1057,15 @@ bool EventBrowser::FindEventNode(RDTreeWidgetItem *&found, RDTreeWidgetItem *par
|
||||
uint nEID = n->tag().value<EventItemTag>().lastEID;
|
||||
uint fEID = found ? found->tag().value<EventItemTag>().lastEID : 0;
|
||||
|
||||
if(nEID >= eventID && (found == NULL || nEID <= fEID))
|
||||
if(nEID >= eventId && (found == NULL || nEID <= fEID))
|
||||
found = n;
|
||||
|
||||
if(nEID == eventID && n->childCount() == 0)
|
||||
if(nEID == eventId && n->childCount() == 0)
|
||||
return true;
|
||||
|
||||
if(n->childCount() > 0)
|
||||
{
|
||||
bool exact = FindEventNode(found, n, eventID);
|
||||
bool exact = FindEventNode(found, n, eventId);
|
||||
if(exact)
|
||||
return true;
|
||||
}
|
||||
@@ -1087,13 +1087,13 @@ void EventBrowser::ExpandNode(RDTreeWidgetItem *node)
|
||||
ui->events->scrollToItem(n);
|
||||
}
|
||||
|
||||
bool EventBrowser::SelectEvent(uint32_t eventID)
|
||||
bool EventBrowser::SelectEvent(uint32_t eventId)
|
||||
{
|
||||
if(!m_Ctx.IsCaptureLoaded())
|
||||
return false;
|
||||
|
||||
RDTreeWidgetItem *found = NULL;
|
||||
FindEventNode(found, ui->events->topLevelItem(0), eventID);
|
||||
FindEventNode(found, ui->events->topLevelItem(0), eventId);
|
||||
if(found != NULL)
|
||||
{
|
||||
ui->events->setCurrentItem(found);
|
||||
|
||||
@@ -58,8 +58,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
QVariant persistData();
|
||||
void setPersistData(const QVariant &persistData);
|
||||
@@ -101,8 +101,8 @@ private:
|
||||
|
||||
void ExpandNode(RDTreeWidgetItem *node);
|
||||
|
||||
bool FindEventNode(RDTreeWidgetItem *&found, RDTreeWidgetItem *parent, uint32_t eventID);
|
||||
bool SelectEvent(uint32_t eventID);
|
||||
bool FindEventNode(RDTreeWidgetItem *&found, RDTreeWidgetItem *parent, uint32_t eventId);
|
||||
bool SelectEvent(uint32_t eventId);
|
||||
|
||||
void ClearFindIcons(RDTreeWidgetItem *parent);
|
||||
void ClearFindIcons();
|
||||
|
||||
@@ -214,16 +214,16 @@ MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::Mai
|
||||
for(const BugReport &b : bugs)
|
||||
{
|
||||
// check bugs every two days
|
||||
qint64 diff = b.CheckDate.secsTo(now);
|
||||
qint64 diff = b.checkDate.secsTo(now);
|
||||
if(diff > 2 * 24 * 60 * 60)
|
||||
{
|
||||
// update the check date on the stored bug
|
||||
GUIInvoke::call([this, b, now]() {
|
||||
for(BugReport &bug : m_Ctx.Config().CrashReport_ReportedBugs)
|
||||
{
|
||||
if(bug.ID == b.ID)
|
||||
if(bug.reportId == b.reportId)
|
||||
{
|
||||
bug.CheckDate = now;
|
||||
bug.checkDate = now;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -248,13 +248,13 @@ MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::Mai
|
||||
QDateTime update = QDateTime::fromString(response, lit("yyyy-MM-dd HH:mm:ss"));
|
||||
|
||||
// if there's been an update since the last check, set unread
|
||||
if(update.isValid() && update > b.CheckDate)
|
||||
if(update.isValid() && update > b.checkDate)
|
||||
{
|
||||
for(BugReport &bug : m_Ctx.Config().CrashReport_ReportedBugs)
|
||||
{
|
||||
if(bug.ID == b.ID)
|
||||
if(bug.reportId == b.reportId)
|
||||
{
|
||||
bug.UnreadUpdates = true;
|
||||
bug.unreadUpdates = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -440,7 +440,7 @@ void MainWindow::OnCaptureTrigger(const QString &exe, const QString &workingDir,
|
||||
}
|
||||
|
||||
LiveCapture *live = new LiveCapture(
|
||||
m_Ctx, m_Ctx.Replay().CurrentRemote() ? m_Ctx.Replay().CurrentRemote()->Hostname : "",
|
||||
m_Ctx, m_Ctx.Replay().CurrentRemote() ? m_Ctx.Replay().CurrentRemote()->hostname : "",
|
||||
m_Ctx.Replay().CurrentRemote() ? m_Ctx.Replay().CurrentRemote()->Name() : "", ret, this,
|
||||
this);
|
||||
ShowLiveCapture(live);
|
||||
@@ -509,7 +509,7 @@ void MainWindow::LoadCapture(const QString &filename, bool temporary, bool local
|
||||
ReplaySupport support = ReplaySupport::Unsupported;
|
||||
|
||||
bool remoteReplay =
|
||||
!local || (m_Ctx.Replay().CurrentRemote() && m_Ctx.Replay().CurrentRemote()->Connected);
|
||||
!local || (m_Ctx.Replay().CurrentRemote() && m_Ctx.Replay().CurrentRemote()->connected);
|
||||
|
||||
if(local)
|
||||
{
|
||||
@@ -571,7 +571,7 @@ void MainWindow::LoadCapture(const QString &filename, bool temporary, bool local
|
||||
}
|
||||
|
||||
remoteReplay =
|
||||
(m_Ctx.Replay().CurrentRemote() && m_Ctx.Replay().CurrentRemote()->Connected);
|
||||
(m_Ctx.Replay().CurrentRemote() && m_Ctx.Replay().CurrentRemote()->connected);
|
||||
|
||||
if(!remoteReplay)
|
||||
{
|
||||
@@ -983,23 +983,23 @@ void MainWindow::PopulateReportedBugs()
|
||||
BugReport &bug = m_Ctx.Config().CrashReport_ReportedBugs[i];
|
||||
QString fmt = tr("&%1: Bug reported at %2");
|
||||
|
||||
if(bug.UnreadUpdates)
|
||||
if(bug.unreadUpdates)
|
||||
fmt = tr("&%1: (Update) Bug reported at %2");
|
||||
|
||||
QAction *action =
|
||||
ui->menu_Reported_Bugs->addAction(fmt.arg(idx).arg(bug.SubmitDate.toString()), [this, i] {
|
||||
ui->menu_Reported_Bugs->addAction(fmt.arg(idx).arg(bug.submitDate.toString()), [this, i] {
|
||||
BugReport &bug = m_Ctx.Config().CrashReport_ReportedBugs[i];
|
||||
|
||||
QDesktopServices::openUrl(QString(bug.URL()));
|
||||
|
||||
bug.UnreadUpdates = false;
|
||||
bug.unreadUpdates = false;
|
||||
m_Ctx.Config().Save();
|
||||
|
||||
PopulateReportedBugs();
|
||||
});
|
||||
idx++;
|
||||
|
||||
if(bug.UnreadUpdates)
|
||||
if(bug.unreadUpdates)
|
||||
{
|
||||
action->setIcon(Icons::bug());
|
||||
unread = true;
|
||||
@@ -1366,7 +1366,7 @@ void MainWindow::remoteProbe()
|
||||
for(RemoteHost *host : m_Ctx.Config().RemoteHosts)
|
||||
{
|
||||
// don't mess with a host we're connected to - this is handled anyway
|
||||
if(host->Connected)
|
||||
if(host->connected)
|
||||
continue;
|
||||
|
||||
host->CheckStatus();
|
||||
@@ -1389,11 +1389,11 @@ void MainWindow::messageCheck()
|
||||
|
||||
if(m_Ctx.Replay().CurrentRemote())
|
||||
{
|
||||
bool prev = m_Ctx.Replay().CurrentRemote()->ServerRunning;
|
||||
bool prev = m_Ctx.Replay().CurrentRemote()->serverRunning;
|
||||
|
||||
m_Ctx.Replay().PingRemote();
|
||||
|
||||
if(prev != m_Ctx.Replay().CurrentRemote()->ServerRunning)
|
||||
if(prev != m_Ctx.Replay().CurrentRemote()->serverRunning)
|
||||
disconnected = true;
|
||||
}
|
||||
|
||||
@@ -1408,7 +1408,7 @@ void MainWindow::messageCheck()
|
||||
"RenderDoc to reconnect and load the capture again"));
|
||||
}
|
||||
|
||||
if(m_Ctx.Replay().CurrentRemote() && !m_Ctx.Replay().CurrentRemote()->ServerRunning)
|
||||
if(m_Ctx.Replay().CurrentRemote() && !m_Ctx.Replay().CurrentRemote()->serverRunning)
|
||||
contextChooser->setIcon(Icons::cross());
|
||||
|
||||
if(!msgs.empty())
|
||||
@@ -1431,7 +1431,7 @@ void MainWindow::messageCheck()
|
||||
m_Ctx.Replay().PingRemote();
|
||||
|
||||
GUIInvoke::call([this]() {
|
||||
if(m_Ctx.Replay().CurrentRemote() && !m_Ctx.Replay().CurrentRemote()->ServerRunning)
|
||||
if(m_Ctx.Replay().CurrentRemote() && !m_Ctx.Replay().CurrentRemote()->serverRunning)
|
||||
{
|
||||
contextChooser->setIcon(Icons::cross());
|
||||
contextChooser->setText(tr("Replay Context: %1").arg(tr("Local")));
|
||||
@@ -1458,14 +1458,14 @@ void MainWindow::FillRemotesMenu(QMenu *menu, bool includeLocalhost)
|
||||
|
||||
QAction *action = new QAction(menu);
|
||||
|
||||
action->setIcon(host->ServerRunning && !host->VersionMismatch ? Icons::tick() : Icons::cross());
|
||||
if(host->Connected)
|
||||
action->setIcon(host->serverRunning && !host->versionMismatch ? Icons::tick() : Icons::cross());
|
||||
if(host->connected)
|
||||
action->setText(tr("%1 (Connected)").arg(host->Name()));
|
||||
else if(host->ServerRunning && host->VersionMismatch)
|
||||
else if(host->serverRunning && host->versionMismatch)
|
||||
action->setText(tr("%1 (Bad Version)").arg(host->Name()));
|
||||
else if(host->ServerRunning && host->Busy)
|
||||
else if(host->serverRunning && host->busy)
|
||||
action->setText(tr("%1 (Busy)").arg(host->Name()));
|
||||
else if(host->ServerRunning)
|
||||
else if(host->serverRunning)
|
||||
action->setText(tr("%1 (Online)").arg(host->Name()));
|
||||
else
|
||||
action->setText(tr("%1 (Offline)").arg(host->Name()));
|
||||
@@ -1473,7 +1473,7 @@ void MainWindow::FillRemotesMenu(QMenu *menu, bool includeLocalhost)
|
||||
action->setData(i);
|
||||
|
||||
// don't allow switching to the connected host
|
||||
if(host->Connected)
|
||||
if(host->connected)
|
||||
action->setEnabled(false);
|
||||
|
||||
menu->addAction(action);
|
||||
@@ -1518,7 +1518,7 @@ void MainWindow::switchContext()
|
||||
// allow live captures to this host to stay open, that way
|
||||
// we can connect to a live capture, then switch into that
|
||||
// context
|
||||
if(host && live->hostname() == host->Hostname)
|
||||
if(host && live->hostname() == host->hostname)
|
||||
continue;
|
||||
|
||||
if(!live->checkAllowClose())
|
||||
@@ -1533,7 +1533,7 @@ void MainWindow::switchContext()
|
||||
// allow live captures to this host to stay open, that way
|
||||
// we can connect to a live capture, then switch into that
|
||||
// context
|
||||
if(host && live->hostname() == host->Hostname)
|
||||
if(host && live->hostname() == host->hostname)
|
||||
continue;
|
||||
|
||||
live->cleanItems();
|
||||
@@ -1556,7 +1556,7 @@ void MainWindow::switchContext()
|
||||
else
|
||||
{
|
||||
contextChooser->setText(tr("Replay Context: %1").arg(host->Name()));
|
||||
contextChooser->setIcon(host->ServerRunning ? Icons::connect() : Icons::disconnect());
|
||||
contextChooser->setIcon(host->serverRunning ? Icons::connect() : Icons::disconnect());
|
||||
|
||||
// disable until checking is done
|
||||
contextChooser->setEnabled(false);
|
||||
@@ -1571,7 +1571,7 @@ void MainWindow::switchContext()
|
||||
// see if the server is up
|
||||
host->CheckStatus();
|
||||
|
||||
if(!host->ServerRunning && !host->RunCommand.isEmpty())
|
||||
if(!host->serverRunning && !host->runCommand.isEmpty())
|
||||
{
|
||||
GUIInvoke::call([this]() { statusText->setText(tr("Running remote server command...")); });
|
||||
|
||||
@@ -1583,13 +1583,13 @@ void MainWindow::switchContext()
|
||||
|
||||
ReplayStatus status = ReplayStatus::Succeeded;
|
||||
|
||||
if(host->ServerRunning && !host->Busy)
|
||||
if(host->serverRunning && !host->busy)
|
||||
{
|
||||
status = m_Ctx.Replay().ConnectToRemoteServer(host);
|
||||
}
|
||||
|
||||
GUIInvoke::call([this, host, status]() {
|
||||
contextChooser->setIcon(host->ServerRunning && !host->Busy ? Icons::connect()
|
||||
contextChooser->setIcon(host->serverRunning && !host->busy ? Icons::connect()
|
||||
: Icons::disconnect());
|
||||
|
||||
if(status != ReplayStatus::Succeeded)
|
||||
@@ -1598,22 +1598,22 @@ void MainWindow::switchContext()
|
||||
contextChooser->setText(tr("Replay Context: %1").arg(tr("Local")));
|
||||
statusText->setText(tr("Connection failed: %1").arg(ToQStr(status)));
|
||||
}
|
||||
else if(host->VersionMismatch)
|
||||
else if(host->versionMismatch)
|
||||
{
|
||||
statusText->setText(
|
||||
tr("Remote server is not running RenderDoc %1").arg(lit(FULL_VERSION_STRING)));
|
||||
}
|
||||
else if(host->Busy)
|
||||
else if(host->busy)
|
||||
{
|
||||
statusText->setText(tr("Remote server in use elsewhere"));
|
||||
}
|
||||
else if(host->ServerRunning)
|
||||
else if(host->serverRunning)
|
||||
{
|
||||
statusText->setText(tr("Remote server ready"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!host->RunCommand.isEmpty())
|
||||
if(!host->runCommand.isEmpty())
|
||||
statusText->setText(tr("Remote server not running or failed to start"));
|
||||
else
|
||||
statusText->setText(tr("Remote server not running - no start command configured"));
|
||||
@@ -1698,7 +1698,7 @@ void MainWindow::OnCaptureClosed()
|
||||
SetTitle();
|
||||
|
||||
// if the remote sever disconnected during capture replay, resort back to a 'disconnected' state
|
||||
if(m_Ctx.Replay().CurrentRemote() && !m_Ctx.Replay().CurrentRemote()->ServerRunning)
|
||||
if(m_Ctx.Replay().CurrentRemote() && !m_Ctx.Replay().CurrentRemote()->serverRunning)
|
||||
{
|
||||
statusText->setText(
|
||||
tr("Remote server disconnected. To attempt to reconnect please select it again."));
|
||||
@@ -1707,7 +1707,7 @@ void MainWindow::OnCaptureClosed()
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::OnEventChanged(uint32_t eventID)
|
||||
void MainWindow::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2056,7 +2056,7 @@ void MainWindow::on_action_Start_Replay_Loop_triggered()
|
||||
|
||||
if(displayTex)
|
||||
{
|
||||
id = displayTex->ID;
|
||||
id = displayTex->resourceId;
|
||||
popup.resize((int)displayTex->width, (int)displayTex->height);
|
||||
popup.setWindowTitle(tr("Looping replay of %1 Displaying %2")
|
||||
.arg(m_Ctx.GetCaptureFilename())
|
||||
|
||||
@@ -61,8 +61,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
ToolWindowManager *mainToolManager();
|
||||
ToolWindowManager::AreaReference mainToolArea();
|
||||
|
||||
@@ -40,10 +40,10 @@ struct SortValue
|
||||
double d;
|
||||
} val;
|
||||
|
||||
SortValue(uint32_t eventID)
|
||||
SortValue(uint32_t eventId)
|
||||
{
|
||||
type = Integer;
|
||||
val.u = eventID;
|
||||
val.u = eventId;
|
||||
}
|
||||
|
||||
SortValue(const CounterResult &result, const CounterDescription &description)
|
||||
@@ -228,9 +228,9 @@ void PerformanceCounterViewer::CaptureCounters()
|
||||
QMap<uint32_t, int> eventIdToRow;
|
||||
for(const CounterResult &result : results)
|
||||
{
|
||||
if(eventIdToRow.contains(result.eventID))
|
||||
if(eventIdToRow.contains(result.eventId))
|
||||
continue;
|
||||
eventIdToRow[result.eventID] = eventIdToRow.size();
|
||||
eventIdToRow[result.eventId] = eventIdToRow.size();
|
||||
}
|
||||
|
||||
ui->counterResults->setColumnCount(headers.size());
|
||||
@@ -239,17 +239,17 @@ void PerformanceCounterViewer::CaptureCounters()
|
||||
|
||||
for(int i = 0; i < (int)results.size(); ++i)
|
||||
{
|
||||
int row = eventIdToRow[results[i].eventID];
|
||||
int row = eventIdToRow[results[i].eventId];
|
||||
|
||||
ui->counterResults->setItem(row, 0,
|
||||
new CustomSortedTableItem(QString::number(results[i].eventID),
|
||||
SortValue(results[i].eventID)));
|
||||
new CustomSortedTableItem(QString::number(results[i].eventId),
|
||||
SortValue(results[i].eventId)));
|
||||
|
||||
ui->counterResults->setItem(
|
||||
row, counterIndex[results[i].counterID] + 1,
|
||||
MakeCounterResultItem(results[i], counterDescriptions[results[i].counterID]));
|
||||
row, counterIndex[results[i].counter] + 1,
|
||||
MakeCounterResultItem(results[i], counterDescriptions[results[i].counter]));
|
||||
|
||||
ui->counterResults->item(row, 0)->setData(Qt::UserRole, results[i].eventID);
|
||||
ui->counterResults->item(row, 0)->setData(Qt::UserRole, results[i].eventId);
|
||||
}
|
||||
|
||||
ui->counterResults->resizeColumnsToContents();
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override {}
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override {}
|
||||
private slots:
|
||||
// automatic slots
|
||||
void on_counterResults_doubleClicked(const QModelIndex &index);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -51,8 +51,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
RDTreeWidget *samp, RDTreeWidget *cbuffer, RDTreeWidget *classes);
|
||||
|
||||
void addResourceRow(const D3D11ViewTag &view, const ShaderResource *shaderInput,
|
||||
const BindpointMap *map, RDTreeWidget *resources);
|
||||
const Bindpoint *map, RDTreeWidget *resources);
|
||||
|
||||
void clearShaderState(RDLabel *shader, RDTreeWidget *tex, RDTreeWidget *samp,
|
||||
RDTreeWidget *cbuffer, RDTreeWidget *classes);
|
||||
@@ -95,11 +95,11 @@ private:
|
||||
|
||||
QVariantList exportViewHTML(const D3D11Pipe::View &view, int i, ShaderReflection *refl,
|
||||
const QString &extraParams);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::IA &ia);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::InputAssembly &ia);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::Shader &sh);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::SO &so);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::StreamOut &so);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::Rasterizer &rs);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::OM &om);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D11Pipe::OutputMerger &om);
|
||||
|
||||
void setInactiveRow(RDTreeWidgetItem *node);
|
||||
void setEmptyRow(RDTreeWidgetItem *node);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,8 +52,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
@@ -109,9 +109,9 @@ private:
|
||||
|
||||
QVariantList exportViewHTML(const D3D12Pipe::View &view, bool rw,
|
||||
const ShaderResource *shaderInput, const QString &extraParams);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D12Pipe::IA &ia);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D12Pipe::InputAssembly &ia);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D12Pipe::Shader &sh);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D12Pipe::Streamout &so);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D12Pipe::StreamOut &so);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D12Pipe::Rasterizer &rs);
|
||||
void exportHTML(QXmlStreamWriter &xml, const D3D12Pipe::OM &om);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -51,8 +51,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
|
||||
@@ -85,13 +85,13 @@ void PipelineStateViewer::OnCaptureClosed()
|
||||
m_Current->OnCaptureClosed();
|
||||
}
|
||||
|
||||
void PipelineStateViewer::OnEventChanged(uint32_t eventID)
|
||||
void PipelineStateViewer::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
if(m_Ctx.CurPipelineState().DefaultType != m_Ctx.APIProps().pipelineType)
|
||||
if(m_Ctx.CurPipelineState().defaultType != m_Ctx.APIProps().pipelineType)
|
||||
OnCaptureLoaded();
|
||||
|
||||
if(m_Current)
|
||||
m_Current->OnEventChanged(eventID);
|
||||
m_Current->OnEventChanged(eventId);
|
||||
}
|
||||
|
||||
QString PipelineStateViewer::GetCurrentAPI()
|
||||
@@ -156,7 +156,7 @@ void PipelineStateViewer::setToD3D11()
|
||||
m_D3D11 = new D3D11PipelineStateViewer(m_Ctx, *this, this);
|
||||
ui->layout->addWidget(m_D3D11);
|
||||
m_Current = m_D3D11;
|
||||
m_Ctx.CurPipelineState().DefaultType = GraphicsAPI::D3D11;
|
||||
m_Ctx.CurPipelineState().defaultType = GraphicsAPI::D3D11;
|
||||
}
|
||||
|
||||
void PipelineStateViewer::setToD3D12()
|
||||
@@ -169,7 +169,7 @@ void PipelineStateViewer::setToD3D12()
|
||||
m_D3D12 = new D3D12PipelineStateViewer(m_Ctx, *this, this);
|
||||
ui->layout->addWidget(m_D3D12);
|
||||
m_Current = m_D3D12;
|
||||
m_Ctx.CurPipelineState().DefaultType = GraphicsAPI::D3D12;
|
||||
m_Ctx.CurPipelineState().defaultType = GraphicsAPI::D3D12;
|
||||
}
|
||||
|
||||
void PipelineStateViewer::setToGL()
|
||||
@@ -182,7 +182,7 @@ void PipelineStateViewer::setToGL()
|
||||
m_GL = new GLPipelineStateViewer(m_Ctx, *this, this);
|
||||
ui->layout->addWidget(m_GL);
|
||||
m_Current = m_GL;
|
||||
m_Ctx.CurPipelineState().DefaultType = GraphicsAPI::OpenGL;
|
||||
m_Ctx.CurPipelineState().defaultType = GraphicsAPI::OpenGL;
|
||||
}
|
||||
|
||||
void PipelineStateViewer::setToVulkan()
|
||||
@@ -195,7 +195,7 @@ void PipelineStateViewer::setToVulkan()
|
||||
m_Vulkan = new VulkanPipelineStateViewer(m_Ctx, *this, this);
|
||||
ui->layout->addWidget(m_Vulkan);
|
||||
m_Current = m_Vulkan;
|
||||
m_Ctx.CurPipelineState().DefaultType = GraphicsAPI::Vulkan;
|
||||
m_Ctx.CurPipelineState().defaultType = GraphicsAPI::Vulkan;
|
||||
}
|
||||
|
||||
QXmlStreamWriter *PipelineStateViewer::beginHTMLExport()
|
||||
@@ -542,15 +542,15 @@ void PipelineStateViewer::setMeshViewPixmap(RDLabel *meshView)
|
||||
bool PipelineStateViewer::PrepareShaderEditing(const ShaderReflection *shaderDetails,
|
||||
QString &entryFunc, rdcstrpairs &files)
|
||||
{
|
||||
if(!shaderDetails->DebugInfo.files.empty())
|
||||
if(!shaderDetails->debugInfo.files.empty())
|
||||
{
|
||||
entryFunc = shaderDetails->EntryPoint;
|
||||
entryFunc = shaderDetails->entryPoint;
|
||||
|
||||
QStringList uniqueFiles;
|
||||
|
||||
for(const ShaderSourceFile &s : shaderDetails->DebugInfo.files)
|
||||
for(const ShaderSourceFile &s : shaderDetails->debugInfo.files)
|
||||
{
|
||||
QString filename = s.Filename;
|
||||
QString filename = s.filename;
|
||||
if(uniqueFiles.contains(filename.toLower()))
|
||||
{
|
||||
qWarning() << lit("Duplicate full filename") << filename;
|
||||
@@ -558,7 +558,7 @@ bool PipelineStateViewer::PrepareShaderEditing(const ShaderReflection *shaderDet
|
||||
}
|
||||
uniqueFiles.push_back(filename.toLower());
|
||||
|
||||
files.push_back(make_rdcpair(s.Filename, s.Contents));
|
||||
files.push_back(make_rdcpair(s.filename, s.contents));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -610,13 +610,13 @@ QString PipelineStateViewer::GenerateHLSLStub(const ShaderReflection *shaderDeta
|
||||
{
|
||||
QString hlsl = lit("// No HLSL available - function stub generated\n\n");
|
||||
|
||||
const QString textureDim[ENUM_ARRAY_SIZE(TextureDim)] = {
|
||||
const QString textureDim[ENUM_ARRAY_SIZE(TextureType)] = {
|
||||
lit("Unknown"), lit("Buffer"), lit("Texture1D"), lit("Texture1DArray"),
|
||||
lit("Texture2D"), lit("TextureRect"), lit("Texture2DArray"), lit("Texture2DMS"),
|
||||
lit("Texture2DMSArray"), lit("Texture3D"), lit("TextureCube"), lit("TextureCubeArray"),
|
||||
};
|
||||
|
||||
for(const ShaderSampler &samp : shaderDetails->Samplers)
|
||||
for(const ShaderSampler &samp : shaderDetails->samplers)
|
||||
{
|
||||
hlsl += lit("//SamplerComparisonState %1 : register(s%2); // can't disambiguate\n"
|
||||
"SamplerState %1 : register(s%2); // can't disambiguate\n")
|
||||
@@ -627,7 +627,7 @@ QString PipelineStateViewer::GenerateHLSLStub(const ShaderReflection *shaderDeta
|
||||
for(int i = 0; i < 2; i++)
|
||||
{
|
||||
const rdcarray<ShaderResource> &resources =
|
||||
(i == 0 ? shaderDetails->ReadOnlyResources : shaderDetails->ReadWriteResources);
|
||||
(i == 0 ? shaderDetails->readOnlyResources : shaderDetails->readWriteResources);
|
||||
for(const ShaderResource &res : resources)
|
||||
{
|
||||
char regChar = 't';
|
||||
@@ -638,7 +638,7 @@ QString PipelineStateViewer::GenerateHLSLStub(const ShaderReflection *shaderDeta
|
||||
regChar = 'u';
|
||||
}
|
||||
|
||||
if(res.IsTexture)
|
||||
if(res.isTexture)
|
||||
{
|
||||
hlsl += lit("%1<%2> %3 : register(%4%5);\n")
|
||||
.arg(textureDim[(size_t)res.resType])
|
||||
@@ -666,7 +666,7 @@ QString PipelineStateViewer::GenerateHLSLStub(const ShaderReflection *shaderDeta
|
||||
QString cbuffers;
|
||||
|
||||
int cbufIdx = 0;
|
||||
for(const ConstantBlock &cbuf : shaderDetails->ConstantBlocks)
|
||||
for(const ConstantBlock &cbuf : shaderDetails->constantBlocks)
|
||||
{
|
||||
if(!cbuf.name.isEmpty() && !cbuf.variables.isEmpty())
|
||||
{
|
||||
@@ -685,7 +685,7 @@ QString PipelineStateViewer::GenerateHLSLStub(const ShaderReflection *shaderDeta
|
||||
hlsl += lit("\n\n");
|
||||
|
||||
hlsl += lit("struct InputStruct {\n");
|
||||
for(const SigParameter &sig : shaderDetails->InputSig)
|
||||
for(const SigParameter &sig : shaderDetails->inputSignature)
|
||||
hlsl += lit("\t%1 %2 : %3;\n")
|
||||
.arg(TypeString(sig))
|
||||
.arg(!sig.varName.isEmpty() ? QString(sig.varName) : lit("param%1").arg(sig.regIndex))
|
||||
@@ -693,7 +693,7 @@ QString PipelineStateViewer::GenerateHLSLStub(const ShaderReflection *shaderDeta
|
||||
hlsl += lit("};\n\n");
|
||||
|
||||
hlsl += lit("struct OutputStruct {\n");
|
||||
for(const SigParameter &sig : shaderDetails->OutputSig)
|
||||
for(const SigParameter &sig : shaderDetails->outputSignature)
|
||||
hlsl += lit("\t%1 %2 : %3;\n")
|
||||
.arg(TypeString(sig))
|
||||
.arg(!sig.varName.isEmpty() ? QString(sig.varName) : lit("param%1").arg(sig.regIndex))
|
||||
@@ -833,7 +833,7 @@ void PipelineStateViewer::EditShader(ShaderStage shaderType, ResourceId id,
|
||||
viewer](IReplayController *r) {
|
||||
rdcstr errs;
|
||||
|
||||
const ShaderCompileFlags &flags = shaderDetails->DebugInfo.compileFlags;
|
||||
const ShaderCompileFlags &flags = shaderDetails->debugInfo.compileFlags;
|
||||
|
||||
ResourceId from = id;
|
||||
ResourceId to;
|
||||
@@ -900,7 +900,7 @@ bool PipelineStateViewer::SaveShaderFile(const ShaderReflection *shader)
|
||||
QFile f(filename);
|
||||
if(f.open(QIODevice::WriteOnly | QIODevice::Truncate))
|
||||
{
|
||||
f.write((const char *)shader->RawBytes.data(), (qint64)shader->RawBytes.size());
|
||||
f.write((const char *)shader->rawBytes.data(), (qint64)shader->rawBytes.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
QVariant persistData();
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -57,8 +57,8 @@ public:
|
||||
|
||||
void OnCaptureLoaded();
|
||||
void OnCaptureClosed();
|
||||
void OnSelectedEventChanged(uint32_t eventID) {}
|
||||
void OnEventChanged(uint32_t eventID);
|
||||
void OnSelectedEventChanged(uint32_t eventId) {}
|
||||
void OnEventChanged(uint32_t eventId);
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
@@ -120,8 +120,8 @@ private:
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::VertexInput &vi);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::InputAssembly &ia);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::Shader &sh);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::Raster &rs);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::ColorBlend &cb);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::Rasterizer &rs);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::ColorBlendState &cb);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::DepthStencil &ds);
|
||||
void exportHTML(QXmlStreamWriter &xml, const VKPipe::CurrentPass &pass);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
struct EventTag
|
||||
{
|
||||
uint32_t eventID = 0;
|
||||
uint32_t eventId = 0;
|
||||
uint32_t primitive = ~0U;
|
||||
};
|
||||
|
||||
@@ -93,10 +93,10 @@ public:
|
||||
m_History.reserve(m_ModList.count());
|
||||
for(const PixelModification &h : m_ModList)
|
||||
{
|
||||
if(!show && !h.passed())
|
||||
if(!show && !h.Passed())
|
||||
continue;
|
||||
|
||||
if(m_History.isEmpty() || m_History.back().back().eventID != h.eventID)
|
||||
if(m_History.isEmpty() || m_History.back().back().eventId != h.eventId)
|
||||
m_History.push_back({h});
|
||||
else
|
||||
m_History.back().push_back(h);
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
if(isEvent(parent))
|
||||
{
|
||||
const QList<PixelModification> &mods = getMods(parent);
|
||||
const DrawcallDescription *draw = m_Ctx.GetDrawcall(mods.front().eventID);
|
||||
const DrawcallDescription *draw = m_Ctx.GetDrawcall(mods.front().eventId);
|
||||
|
||||
if(draw && draw->flags & DrawFlags::Clear)
|
||||
return 0;
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
if(isEvent(index))
|
||||
{
|
||||
const QList<PixelModification> &mods = getMods(index);
|
||||
const DrawcallDescription *drawcall = m_Ctx.GetDrawcall(mods.front().eventID);
|
||||
const DrawcallDescription *drawcall = m_Ctx.GetDrawcall(mods.front().eventId);
|
||||
if(!drawcall)
|
||||
return QVariant();
|
||||
|
||||
@@ -229,10 +229,10 @@ public:
|
||||
if(mods.front().directShaderWrite)
|
||||
{
|
||||
ret += tr("EID %1\n%2\nBound as UAV or copy - potential modification")
|
||||
.arg(mods.front().eventID)
|
||||
.arg(mods.front().eventId)
|
||||
.arg(drawcall->name);
|
||||
|
||||
if(memcmp(mods[0].preMod.col.value_u, mods[0].postMod.col.value_u,
|
||||
if(memcmp(mods[0].preMod.col.uintValue, mods[0].postMod.col.uintValue,
|
||||
sizeof(uint32_t) * 4) == 0)
|
||||
{
|
||||
ret += tr("\nNo change in tex value");
|
||||
@@ -243,12 +243,12 @@ public:
|
||||
{
|
||||
passed = false;
|
||||
for(const PixelModification &m : mods)
|
||||
passed |= m.passed();
|
||||
passed |= m.Passed();
|
||||
|
||||
QString failure = passed ? QString() : failureString(mods[0]);
|
||||
|
||||
ret += tr("EID %1\n%2%3\n%4 Fragments touching pixel\n")
|
||||
.arg(mods.front().eventID)
|
||||
.arg(mods.front().eventId)
|
||||
.arg(drawcall->name)
|
||||
.arg(failure)
|
||||
.arg(mods.count());
|
||||
@@ -264,10 +264,10 @@ public:
|
||||
{
|
||||
QString ret = tr("Potential UAV/Copy write");
|
||||
|
||||
if(mod.preMod.col.value_u[0] == mod.postMod.col.value_u[0] &&
|
||||
mod.preMod.col.value_u[1] == mod.postMod.col.value_u[1] &&
|
||||
mod.preMod.col.value_u[2] == mod.postMod.col.value_u[2] &&
|
||||
mod.preMod.col.value_u[3] == mod.postMod.col.value_u[3])
|
||||
if(mod.preMod.col.uintValue[0] == mod.postMod.col.uintValue[0] &&
|
||||
mod.preMod.col.uintValue[1] == mod.postMod.col.uintValue[1] &&
|
||||
mod.preMod.col.uintValue[2] == mod.postMod.col.uintValue[2] &&
|
||||
mod.preMod.col.uintValue[3] == mod.postMod.col.uintValue[3])
|
||||
{
|
||||
ret += tr("\nNo change in tex value");
|
||||
}
|
||||
@@ -343,11 +343,11 @@ public:
|
||||
|
||||
bool passed = false;
|
||||
for(const PixelModification &m : mods)
|
||||
passed |= m.passed();
|
||||
passed |= m.Passed();
|
||||
|
||||
if(mods[0].directShaderWrite &&
|
||||
memcmp(mods[0].preMod.col.value_u, mods[0].postMod.col.value_u, sizeof(uint32_t) * 4) ==
|
||||
0)
|
||||
memcmp(mods[0].preMod.col.uintValue, mods[0].postMod.col.uintValue,
|
||||
sizeof(uint32_t) * 4) == 0)
|
||||
return QBrush(QColor::fromRgb(235, 235, 235));
|
||||
|
||||
return passed ? QBrush(QColor::fromRgb(235, 255, 235))
|
||||
@@ -366,13 +366,13 @@ public:
|
||||
|
||||
if(isEvent(index))
|
||||
{
|
||||
tag.eventID = getMods(index).first().eventID;
|
||||
tag.eventId = getMods(index).first().eventId;
|
||||
}
|
||||
else
|
||||
{
|
||||
const PixelModification &mod = getMod(index);
|
||||
|
||||
tag.eventID = mod.eventID;
|
||||
tag.eventId = mod.eventId;
|
||||
if(!mod.directShaderWrite)
|
||||
tag.primitive = mod.primitiveID;
|
||||
}
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
}
|
||||
|
||||
const QVector<PixelModification> &modifications() { return m_ModList; }
|
||||
ResourceId texID() { return m_Tex->ID; }
|
||||
ResourceId texID() { return m_Tex->resourceId; }
|
||||
private:
|
||||
ICaptureContext &m_Ctx;
|
||||
|
||||
@@ -447,34 +447,34 @@ private:
|
||||
|
||||
QBrush backgroundBrush(const ModificationValue &val) const
|
||||
{
|
||||
float rangesize = (m_Display.rangemax - m_Display.rangemin);
|
||||
float rangesize = (m_Display.rangeMax - m_Display.rangeMin);
|
||||
|
||||
float r = val.col.value_f[0];
|
||||
float g = val.col.value_f[1];
|
||||
float b = val.col.value_f[2];
|
||||
float r = val.col.floatValue[0];
|
||||
float g = val.col.floatValue[1];
|
||||
float b = val.col.floatValue[2];
|
||||
|
||||
if(!m_Display.Red)
|
||||
if(!m_Display.red)
|
||||
r = 0.0f;
|
||||
if(!m_Display.Green)
|
||||
if(!m_Display.green)
|
||||
g = 0.0f;
|
||||
if(!m_Display.Blue)
|
||||
if(!m_Display.blue)
|
||||
b = 0.0f;
|
||||
|
||||
if(m_Display.Red && !m_Display.Green && !m_Display.Blue && !m_Display.Alpha)
|
||||
if(m_Display.red && !m_Display.green && !m_Display.blue && !m_Display.alpha)
|
||||
g = b = r;
|
||||
if(!m_Display.Red && m_Display.Green && !m_Display.Blue && !m_Display.Alpha)
|
||||
if(!m_Display.red && m_Display.green && !m_Display.blue && !m_Display.alpha)
|
||||
r = b = g;
|
||||
if(!m_Display.Red && !m_Display.Green && m_Display.Blue && !m_Display.Alpha)
|
||||
if(!m_Display.red && !m_Display.green && m_Display.blue && !m_Display.alpha)
|
||||
g = r = b;
|
||||
if(!m_Display.Red && !m_Display.Green && !m_Display.Blue && m_Display.Alpha)
|
||||
g = b = r = val.col.value_f[3];
|
||||
if(!m_Display.red && !m_Display.green && !m_Display.blue && m_Display.alpha)
|
||||
g = b = r = val.col.floatValue[3];
|
||||
|
||||
r = qBound(0.0f, (r - m_Display.rangemin) / rangesize, 1.0f);
|
||||
g = qBound(0.0f, (g - m_Display.rangemin) / rangesize, 1.0f);
|
||||
b = qBound(0.0f, (b - m_Display.rangemin) / rangesize, 1.0f);
|
||||
r = qBound(0.0f, (r - m_Display.rangeMin) / rangesize, 1.0f);
|
||||
g = qBound(0.0f, (g - m_Display.rangeMin) / rangesize, 1.0f);
|
||||
b = qBound(0.0f, (b - m_Display.rangeMin) / rangesize, 1.0f);
|
||||
|
||||
if(m_IsDepth)
|
||||
r = g = b = qBound(0.0f, (val.depth - m_Display.rangemin) / rangesize, 1.0f);
|
||||
r = g = b = qBound(0.0f, (val.depth - m_Display.rangeMin) / rangesize, 1.0f);
|
||||
|
||||
{
|
||||
r = (float)powf(r, 1.0f / 2.2f);
|
||||
@@ -498,17 +498,17 @@ private:
|
||||
if(m_IsUint)
|
||||
{
|
||||
for(int i = 0; i < numComps; i++)
|
||||
s += colourLetterPrefix[i] + Formatter::Format(val.col.value_u[i]) + lit("\n");
|
||||
s += colourLetterPrefix[i] + Formatter::Format(val.col.uintValue[i]) + lit("\n");
|
||||
}
|
||||
else if(m_IsSint)
|
||||
{
|
||||
for(int i = 0; i < numComps; i++)
|
||||
s += colourLetterPrefix[i] + Formatter::Format(val.col.value_i[i]) + lit("\n");
|
||||
s += colourLetterPrefix[i] + Formatter::Format(val.col.intValue[i]) + lit("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int i = 0; i < numComps; i++)
|
||||
s += colourLetterPrefix[i] + Formatter::Format(val.col.value_f[i]) + lit("\n");
|
||||
s += colourLetterPrefix[i] + Formatter::Format(val.col.floatValue[i]) + lit("\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -569,11 +569,11 @@ PixelHistoryView::PixelHistoryView(ICaptureContext &ctx, ResourceId id, QPoint p
|
||||
updateWindowTitle();
|
||||
|
||||
QString channelStr;
|
||||
if(display.Red)
|
||||
if(display.red)
|
||||
channelStr += lit("R");
|
||||
if(display.Green)
|
||||
if(display.green)
|
||||
channelStr += lit("G");
|
||||
if(display.Blue)
|
||||
if(display.blue)
|
||||
channelStr += lit("B");
|
||||
|
||||
if(channelStr.length() > 1)
|
||||
@@ -581,13 +581,13 @@ PixelHistoryView::PixelHistoryView(ICaptureContext &ctx, ResourceId id, QPoint p
|
||||
else
|
||||
channelStr += tr(" channel");
|
||||
|
||||
if(!display.Red && !display.Green && !display.Blue && display.Alpha)
|
||||
if(!display.red && !display.green && !display.blue && display.alpha)
|
||||
channelStr = lit("Alpha");
|
||||
|
||||
QString text;
|
||||
text = tr("Preview colours displayed in visible range %1 - %2 with %3 visible.\n\n")
|
||||
.arg(Formatter::Format(display.rangemin))
|
||||
.arg(Formatter::Format(display.rangemax))
|
||||
.arg(Formatter::Format(display.rangeMin))
|
||||
.arg(Formatter::Format(display.rangeMax))
|
||||
.arg(channelStr);
|
||||
text +=
|
||||
tr("Double click to jump to an event.\n"
|
||||
@@ -665,7 +665,7 @@ void PixelHistoryView::OnCaptureClosed()
|
||||
ToolWindowManager::closeToolWindow(this);
|
||||
}
|
||||
|
||||
void PixelHistoryView::OnEventChanged(uint32_t eventID)
|
||||
void PixelHistoryView::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
updateWindowTitle();
|
||||
}
|
||||
@@ -679,7 +679,7 @@ void PixelHistoryView::SetHistory(const rdcarray<PixelModification> &history)
|
||||
|
||||
void PixelHistoryView::startDebug(EventTag tag)
|
||||
{
|
||||
m_Ctx.SetEventID({this}, tag.eventID, tag.eventID);
|
||||
m_Ctx.SetEventID({this}, tag.eventId, tag.eventId);
|
||||
|
||||
ShaderDebugTrace *trace = NULL;
|
||||
|
||||
@@ -712,7 +712,7 @@ void PixelHistoryView::startDebug(EventTag tag)
|
||||
|
||||
void PixelHistoryView::jumpToPrimitive(EventTag tag)
|
||||
{
|
||||
m_Ctx.SetEventID({this}, tag.eventID, tag.eventID);
|
||||
m_Ctx.SetEventID({this}, tag.eventId, tag.eventId);
|
||||
m_Ctx.ShowMeshPreview();
|
||||
|
||||
IBufferViewer *viewer = m_Ctx.GetMeshPreview();
|
||||
@@ -752,27 +752,27 @@ void PixelHistoryView::on_events_customContextMenuRequested(const QPoint &pos)
|
||||
}
|
||||
|
||||
EventTag tag = m_Model->data(index, Qt::UserRole).value<EventTag>();
|
||||
if(tag.eventID == 0)
|
||||
if(tag.eventId == 0)
|
||||
{
|
||||
RDDialog::show(&contextMenu, ui->events->viewport()->mapToGlobal(pos));
|
||||
return;
|
||||
}
|
||||
|
||||
QAction jumpAction(tr("&Go to primitive %1 at Event %2").arg(tag.primitive).arg(tag.eventID), this);
|
||||
QAction jumpAction(tr("&Go to primitive %1 at Event %2").arg(tag.primitive).arg(tag.eventId), this);
|
||||
|
||||
QString debugText;
|
||||
|
||||
if(tag.primitive == ~0U)
|
||||
{
|
||||
debugText =
|
||||
tr("&Debug Pixel (%1, %2) at Event %3").arg(m_Pixel.x()).arg(m_Pixel.y()).arg(tag.eventID);
|
||||
tr("&Debug Pixel (%1, %2) at Event %3").arg(m_Pixel.x()).arg(m_Pixel.y()).arg(tag.eventId);
|
||||
}
|
||||
else
|
||||
{
|
||||
debugText = tr("&Debug Pixel (%1, %2) primitive %3 at Event %4")
|
||||
.arg(m_Pixel.x())
|
||||
.arg(m_Pixel.y())
|
||||
.arg(tag.eventID)
|
||||
.arg(tag.eventId)
|
||||
.arg(tag.primitive);
|
||||
|
||||
contextMenu.addAction(&jumpAction);
|
||||
@@ -791,6 +791,6 @@ void PixelHistoryView::on_events_customContextMenuRequested(const QPoint &pos)
|
||||
void PixelHistoryView::on_events_doubleClicked(const QModelIndex &index)
|
||||
{
|
||||
EventTag tag = m_Model->data(index, Qt::UserRole).value<EventTag>();
|
||||
if(tag.eventID > 0)
|
||||
m_Ctx.SetEventID({this}, tag.eventID, tag.eventID);
|
||||
if(tag.eventId > 0)
|
||||
m_Ctx.SetEventID({this}, tag.eventId, tag.eventId);
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
private slots:
|
||||
// automatic slots
|
||||
void on_events_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
@@ -94,9 +94,9 @@ struct CaptureContextInvoker : ICaptureContext
|
||||
virtual const rdcarray<TextureDescription> &GetTextures() override { return m_Ctx.GetTextures(); }
|
||||
virtual BufferDescription *GetBuffer(ResourceId id) override { return m_Ctx.GetBuffer(id); }
|
||||
virtual const rdcarray<BufferDescription> &GetBuffers() override { return m_Ctx.GetBuffers(); }
|
||||
virtual const DrawcallDescription *GetDrawcall(uint32_t eventID) override
|
||||
virtual const DrawcallDescription *GetDrawcall(uint32_t eventId) override
|
||||
{
|
||||
return m_Ctx.GetDrawcall(eventID);
|
||||
return m_Ctx.GetDrawcall(eventId);
|
||||
}
|
||||
virtual const SDFile &GetStructuredFile() override { return m_Ctx.GetStructuredFile(); }
|
||||
virtual WindowingSystem CurWindowingSystem() override { return m_Ctx.CurWindowingSystem(); }
|
||||
@@ -171,9 +171,9 @@ struct CaptureContextInvoker : ICaptureContext
|
||||
}
|
||||
virtual void CloseCapture() override { InvokeVoidFunction(&ICaptureContext::CloseCapture); }
|
||||
virtual void SetEventID(const rdcarray<ICaptureViewer *> &exclude, uint32_t selectedEventID,
|
||||
uint32_t eventID, bool force = false) override
|
||||
uint32_t eventId, bool force = false) override
|
||||
{
|
||||
InvokeVoidFunction(&ICaptureContext::SetEventID, exclude, selectedEventID, eventID, force);
|
||||
InvokeVoidFunction(&ICaptureContext::SetEventID, exclude, selectedEventID, eventId, force);
|
||||
}
|
||||
virtual void RefreshStatus() override { InvokeVoidFunction(&ICaptureContext::RefreshStatus); }
|
||||
virtual void AddCaptureViewer(ICaptureViewer *viewer) override
|
||||
|
||||
@@ -77,13 +77,13 @@ public:
|
||||
const ResourceDescription &desc = resources[index.row()];
|
||||
|
||||
if(role == Qt::DisplayRole)
|
||||
return m_Ctx.GetResourceName(desc.ID);
|
||||
return m_Ctx.GetResourceName(desc.resourceId);
|
||||
|
||||
if(role == ResourceIdRole)
|
||||
return QVariant::fromValue(desc.ID);
|
||||
return QVariant::fromValue(desc.resourceId);
|
||||
|
||||
if(role == FilterRole)
|
||||
return ToQStr(desc.type) + lit(" ") + m_Ctx.GetResourceName(desc.ID);
|
||||
return ToQStr(desc.type) + lit(" ") + m_Ctx.GetResourceName(desc.resourceId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ void ResourceInspector::OnCaptureClosed()
|
||||
m_Resource = ResourceId();
|
||||
}
|
||||
|
||||
void ResourceInspector::OnEventChanged(uint32_t eventID)
|
||||
void ResourceInspector::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
Inspect(m_Resource);
|
||||
|
||||
@@ -385,9 +385,9 @@ void ResourceInspector::on_viewContents_clicked()
|
||||
|
||||
if(tex)
|
||||
{
|
||||
if(tex->resType == TextureDim::Buffer)
|
||||
if(tex->type == TextureType::Buffer)
|
||||
{
|
||||
IBufferViewer *viewer = m_Ctx.ViewTextureAsBuffer(0, 0, tex->ID);
|
||||
IBufferViewer *viewer = m_Ctx.ViewTextureAsBuffer(0, 0, tex->resourceId);
|
||||
|
||||
m_Ctx.AddDockWindow(viewer->Widget(), DockReference::AddTo, this);
|
||||
}
|
||||
@@ -396,12 +396,12 @@ void ResourceInspector::on_viewContents_clicked()
|
||||
if(!m_Ctx.HasTextureViewer())
|
||||
m_Ctx.ShowTextureViewer();
|
||||
ITextureViewer *viewer = m_Ctx.GetTextureViewer();
|
||||
viewer->ViewTexture(tex->ID, true);
|
||||
viewer->ViewTexture(tex->resourceId, true);
|
||||
}
|
||||
}
|
||||
else if(buf)
|
||||
{
|
||||
IBufferViewer *viewer = m_Ctx.ViewBuffer(0, buf->length, buf->ID);
|
||||
IBufferViewer *viewer = m_Ctx.ViewBuffer(0, buf->length, buf->resourceId);
|
||||
|
||||
m_Ctx.AddDockWindow(viewer->Widget(), DockReference::AddTo, this);
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
public slots:
|
||||
// automatic slots
|
||||
void on_renameResource_clicked();
|
||||
|
||||
@@ -301,7 +301,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
|
||||
if(shader)
|
||||
{
|
||||
m_Stage = shader->Stage;
|
||||
m_Stage = shader->stage;
|
||||
|
||||
m_Ctx.Replay().AsyncInvoke([this](IReplayController *r) {
|
||||
rdcarray<rdcstr> targets = r->GetDisassemblyTargets();
|
||||
@@ -364,20 +364,20 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
&ShaderViewer::disasm_tooltipHide);
|
||||
}
|
||||
|
||||
if(shader && !shader->DebugInfo.files.isEmpty())
|
||||
if(shader && !shader->debugInfo.files.isEmpty())
|
||||
{
|
||||
if(trace)
|
||||
setWindowTitle(QFormatStr("Debug %1() - %2").arg(shader->EntryPoint).arg(debugContext));
|
||||
setWindowTitle(QFormatStr("Debug %1() - %2").arg(shader->entryPoint).arg(debugContext));
|
||||
else
|
||||
setWindowTitle(shader->EntryPoint);
|
||||
setWindowTitle(shader->entryPoint);
|
||||
|
||||
int fileIdx = 0;
|
||||
|
||||
QWidget *sel = NULL;
|
||||
for(const ShaderSourceFile &f : shader->DebugInfo.files)
|
||||
for(const ShaderSourceFile &f : shader->debugInfo.files)
|
||||
{
|
||||
QString name = QFileInfo(f.Filename).fileName();
|
||||
QString text = f.Contents;
|
||||
QString name = QFileInfo(f.filename).fileName();
|
||||
QString text = f.contents;
|
||||
|
||||
ScintillaEdit *scintilla = AddFileScintilla(name, text);
|
||||
|
||||
@@ -390,7 +390,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
if(trace || sel == NULL)
|
||||
sel = m_DisassemblyView;
|
||||
|
||||
if(shader->DebugInfo.files.size() > 2)
|
||||
if(shader->debugInfo.files.size() > 2)
|
||||
addFileList();
|
||||
|
||||
ToolWindowManager::raiseToolWindow(sel);
|
||||
@@ -516,7 +516,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
|
||||
if(shader)
|
||||
{
|
||||
for(const SigParameter &s : shader->InputSig)
|
||||
for(const SigParameter &s : shader->inputSignature)
|
||||
{
|
||||
QString name = s.varName.isEmpty()
|
||||
? QString(s.semanticName)
|
||||
@@ -535,7 +535,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
}
|
||||
|
||||
bool multipleStreams = false;
|
||||
for(const SigParameter &s : shader->OutputSig)
|
||||
for(const SigParameter &s : shader->outputSignature)
|
||||
{
|
||||
if(s.stream > 0)
|
||||
{
|
||||
@@ -544,7 +544,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
}
|
||||
}
|
||||
|
||||
for(const SigParameter &s : shader->OutputSig)
|
||||
for(const SigParameter &s : shader->outputSignature)
|
||||
{
|
||||
QString name = s.varName.isEmpty()
|
||||
? QString(s.semanticName)
|
||||
@@ -621,7 +621,7 @@ void ShaderViewer::OnCaptureClosed()
|
||||
ToolWindowManager::closeToolWindow(this);
|
||||
}
|
||||
|
||||
void ShaderViewer::OnEventChanged(uint32_t eventID)
|
||||
void ShaderViewer::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
updateDebugging();
|
||||
updateWindowTitle();
|
||||
@@ -1050,18 +1050,18 @@ QString ShaderViewer::stringRep(const ShaderVariable &var, bool useType)
|
||||
return RowString(var, 0, VarType::Float);
|
||||
}
|
||||
|
||||
RDTreeWidgetItem *ShaderViewer::makeResourceRegister(const BindpointMap &bind, uint32_t idx,
|
||||
RDTreeWidgetItem *ShaderViewer::makeResourceRegister(const Bindpoint &bind, uint32_t idx,
|
||||
const BoundResource &bound,
|
||||
const ShaderResource &res)
|
||||
{
|
||||
QString name = QFormatStr(" (%1)").arg(res.name);
|
||||
|
||||
const TextureDescription *tex = m_Ctx.GetTexture(bound.Id);
|
||||
const BufferDescription *buf = m_Ctx.GetBuffer(bound.Id);
|
||||
const TextureDescription *tex = m_Ctx.GetTexture(bound.resourceId);
|
||||
const BufferDescription *buf = m_Ctx.GetBuffer(bound.resourceId);
|
||||
|
||||
QChar regChar(QLatin1Char('u'));
|
||||
|
||||
if(res.IsReadOnly)
|
||||
if(res.isReadOnly)
|
||||
regChar = QLatin1Char('t');
|
||||
|
||||
QString regname;
|
||||
@@ -1086,19 +1086,21 @@ RDTreeWidgetItem *ShaderViewer::makeResourceRegister(const BindpointMap &bind, u
|
||||
.arg(tex->depth > 1 ? tex->depth : tex->arraysize)
|
||||
.arg(tex->mips)
|
||||
.arg(tex->format.Name())
|
||||
.arg(m_Ctx.GetResourceName(bound.Id));
|
||||
.arg(m_Ctx.GetResourceName(bound.resourceId));
|
||||
|
||||
return new RDTreeWidgetItem({regname + name, lit("Texture"), type});
|
||||
}
|
||||
else if(buf)
|
||||
{
|
||||
QString type = QFormatStr("%1 - %2").arg(buf->length).arg(m_Ctx.GetResourceName(bound.Id));
|
||||
QString type =
|
||||
QFormatStr("%1 - %2").arg(buf->length).arg(m_Ctx.GetResourceName(bound.resourceId));
|
||||
|
||||
return new RDTreeWidgetItem({regname + name, lit("Buffer"), type});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new RDTreeWidgetItem({regname + name, lit("Resource"), m_Ctx.GetResourceName(bound.Id)});
|
||||
return new RDTreeWidgetItem(
|
||||
{regname + name, lit("Resource"), m_Ctx.GetResourceName(bound.resourceId)});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1161,15 +1163,16 @@ void ShaderViewer::updateDebugging()
|
||||
|
||||
if(ui->constants->topLevelItemCount() == 0)
|
||||
{
|
||||
for(int i = 0; i < m_Trace->cbuffers.count(); i++)
|
||||
for(int i = 0; i < m_Trace->constantBlocks.count(); i++)
|
||||
{
|
||||
for(int j = 0; j < m_Trace->cbuffers[i].members.count(); j++)
|
||||
for(int j = 0; j < m_Trace->constantBlocks[i].members.count(); j++)
|
||||
{
|
||||
if(m_Trace->cbuffers[i].members[j].rows > 0 || m_Trace->cbuffers[i].members[j].columns > 0)
|
||||
if(m_Trace->constantBlocks[i].members[j].rows > 0 ||
|
||||
m_Trace->constantBlocks[i].members[j].columns > 0)
|
||||
{
|
||||
RDTreeWidgetItem *node =
|
||||
new RDTreeWidgetItem({m_Trace->cbuffers[i].members[j].name, lit("cbuffer"),
|
||||
stringRep(m_Trace->cbuffers[i].members[j], false)});
|
||||
new RDTreeWidgetItem({m_Trace->constantBlocks[i].members[j].name, lit("cbuffer"),
|
||||
stringRep(m_Trace->constantBlocks[i].members[j], false)});
|
||||
node->setTag(QVariant::fromValue(VariableTag(VariableCategory::Constants, j, i)));
|
||||
|
||||
ui->constants->addTopLevelItem(node);
|
||||
@@ -1197,35 +1200,35 @@ void ShaderViewer::updateDebugging()
|
||||
bool tree = false;
|
||||
|
||||
for(int i = 0;
|
||||
i < m_Mapping->ReadWriteResources.count() && i < m_ShaderDetails->ReadWriteResources.count();
|
||||
i < m_Mapping->readWriteResources.count() && i < m_ShaderDetails->readWriteResources.count();
|
||||
i++)
|
||||
{
|
||||
BindpointMap bind = m_Mapping->ReadWriteResources[i];
|
||||
Bindpoint bind = m_Mapping->readWriteResources[i];
|
||||
|
||||
if(!bind.used)
|
||||
continue;
|
||||
|
||||
int idx = rw.indexOf(bind);
|
||||
|
||||
if(idx < 0 || rw[idx].Resources.isEmpty())
|
||||
if(idx < 0 || rw[idx].resources.isEmpty())
|
||||
continue;
|
||||
|
||||
if(bind.arraySize == 1)
|
||||
{
|
||||
RDTreeWidgetItem *node = makeResourceRegister(bind, 0, rw[idx].Resources[0],
|
||||
m_ShaderDetails->ReadWriteResources[i]);
|
||||
RDTreeWidgetItem *node = makeResourceRegister(bind, 0, rw[idx].resources[0],
|
||||
m_ShaderDetails->readWriteResources[i]);
|
||||
if(node)
|
||||
ui->constants->addTopLevelItem(node);
|
||||
}
|
||||
else
|
||||
{
|
||||
RDTreeWidgetItem *node =
|
||||
new RDTreeWidgetItem({m_ShaderDetails->ReadWriteResources[i].name,
|
||||
new RDTreeWidgetItem({m_ShaderDetails->readWriteResources[i].name,
|
||||
QFormatStr("[%1]").arg(bind.arraySize), QString()});
|
||||
|
||||
for(uint32_t a = 0; a < bind.arraySize; a++)
|
||||
node->addChild(makeResourceRegister(bind, a, rw[idx].Resources[a],
|
||||
m_ShaderDetails->ReadWriteResources[i]));
|
||||
node->addChild(makeResourceRegister(bind, a, rw[idx].resources[a],
|
||||
m_ShaderDetails->readWriteResources[i]));
|
||||
|
||||
tree = true;
|
||||
|
||||
@@ -1234,35 +1237,35 @@ void ShaderViewer::updateDebugging()
|
||||
}
|
||||
|
||||
for(int i = 0;
|
||||
i < m_Mapping->ReadOnlyResources.count() && i < m_ShaderDetails->ReadOnlyResources.count();
|
||||
i < m_Mapping->readOnlyResources.count() && i < m_ShaderDetails->readOnlyResources.count();
|
||||
i++)
|
||||
{
|
||||
BindpointMap bind = m_Mapping->ReadOnlyResources[i];
|
||||
Bindpoint bind = m_Mapping->readOnlyResources[i];
|
||||
|
||||
if(!bind.used)
|
||||
continue;
|
||||
|
||||
int idx = ro.indexOf(bind);
|
||||
|
||||
if(idx < 0 || ro[idx].Resources.isEmpty())
|
||||
if(idx < 0 || ro[idx].resources.isEmpty())
|
||||
continue;
|
||||
|
||||
if(bind.arraySize == 1)
|
||||
{
|
||||
RDTreeWidgetItem *node = makeResourceRegister(bind, 0, ro[idx].Resources[0],
|
||||
m_ShaderDetails->ReadOnlyResources[i]);
|
||||
RDTreeWidgetItem *node = makeResourceRegister(bind, 0, ro[idx].resources[0],
|
||||
m_ShaderDetails->readOnlyResources[i]);
|
||||
if(node)
|
||||
ui->constants->addTopLevelItem(node);
|
||||
}
|
||||
else
|
||||
{
|
||||
RDTreeWidgetItem *node =
|
||||
new RDTreeWidgetItem({m_ShaderDetails->ReadOnlyResources[i].name,
|
||||
new RDTreeWidgetItem({m_ShaderDetails->readOnlyResources[i].name,
|
||||
QFormatStr("[%1]").arg(bind.arraySize), QString()});
|
||||
|
||||
for(uint32_t a = 0; a < bind.arraySize; a++)
|
||||
node->addChild(makeResourceRegister(bind, a, ro[idx].Resources[a],
|
||||
m_ShaderDetails->ReadOnlyResources[i]));
|
||||
node->addChild(makeResourceRegister(bind, a, ro[idx].resources[a],
|
||||
m_ShaderDetails->readOnlyResources[i]));
|
||||
|
||||
tree = true;
|
||||
|
||||
@@ -1968,7 +1971,8 @@ const rdcarray<ShaderVariable> *ShaderViewer::GetVariableList(VariableCategory v
|
||||
break;
|
||||
case VariableCategory::Inputs: vars = &m_Trace->inputs; break;
|
||||
case VariableCategory::Constants:
|
||||
vars = arrayIdx < m_Trace->cbuffers.count() ? &m_Trace->cbuffers[arrayIdx].members : NULL;
|
||||
vars = arrayIdx < m_Trace->constantBlocks.count() ? &m_Trace->constantBlocks[arrayIdx].members
|
||||
: NULL;
|
||||
break;
|
||||
case VariableCategory::Outputs: vars = &state.outputs; break;
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
@@ -236,6 +236,6 @@ private:
|
||||
void runTo(int runToInstruction, bool forward, ShaderEvents condition = ShaderEvents::NoEvent);
|
||||
|
||||
QString stringRep(const ShaderVariable &var, bool useType);
|
||||
RDTreeWidgetItem *makeResourceRegister(const BindpointMap &bind, uint32_t idx,
|
||||
RDTreeWidgetItem *makeResourceRegister(const Bindpoint &bind, uint32_t idx,
|
||||
const BoundResource &ro, const ShaderResource &resources);
|
||||
};
|
||||
|
||||
@@ -460,7 +460,7 @@ void StatisticsViewer::AppendResourceBindStatistics()
|
||||
{
|
||||
uint32_t count = totalResourcesForAllStages.types[s];
|
||||
int slice = SliceForString(Stars, count, maxCount);
|
||||
TextureDim type = (TextureDim)s;
|
||||
TextureType type = (TextureType)s;
|
||||
m_Report.append(
|
||||
QFormatStr("%1: %2 %3\n").arg(ToQStr(type), 20).arg(Stars.left(slice)).arg(CountOrEmpty(count)));
|
||||
}
|
||||
@@ -518,7 +518,7 @@ void StatisticsViewer::AppendUpdateStatistics()
|
||||
{
|
||||
uint32_t count = totalUpdates.types[s];
|
||||
int slice = SliceForString(Stars, count, maxCount);
|
||||
TextureDim type = (TextureDim)s;
|
||||
TextureType type = (TextureType)s;
|
||||
m_Report.append(
|
||||
QFormatStr("%1: %2 %3\n").arg(ToQStr(type), 20).arg(Stars.left(slice)).arg(CountOrEmpty(count)));
|
||||
}
|
||||
@@ -694,7 +694,7 @@ void StatisticsViewer::GenerateReport()
|
||||
CountContributingEvents(d, drawCount, dispatchCount, diagnosticCount);
|
||||
|
||||
uint32_t numAPIcalls =
|
||||
m_Ctx.GetLastDrawcall()->eventID - (drawCount + dispatchCount + diagnosticCount);
|
||||
m_Ctx.GetLastDrawcall()->eventId - (drawCount + dispatchCount + diagnosticCount);
|
||||
|
||||
int numTextures = m_Ctx.GetTextures().count();
|
||||
int numBuffers = m_Ctx.GetBuffers().count();
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override {}
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override {}
|
||||
private:
|
||||
Ui::StatisticsViewer *ui;
|
||||
ICaptureContext &m_Ctx;
|
||||
|
||||
@@ -95,12 +95,12 @@ void Following::GetDrawContext(ICaptureContext &ctx, bool ©, bool &clear, bo
|
||||
|
||||
int Following::GetHighestMip(ICaptureContext &ctx)
|
||||
{
|
||||
return GetBoundResource(ctx, arrayEl).HighestMip;
|
||||
return GetBoundResource(ctx, arrayEl).firstMip;
|
||||
}
|
||||
|
||||
int Following::GetFirstArraySlice(ICaptureContext &ctx)
|
||||
{
|
||||
return GetBoundResource(ctx, arrayEl).FirstSlice;
|
||||
return GetBoundResource(ctx, arrayEl).firstSlice;
|
||||
}
|
||||
|
||||
CompType Following::GetTypeHint(ICaptureContext &ctx)
|
||||
@@ -110,7 +110,7 @@ CompType Following::GetTypeHint(ICaptureContext &ctx)
|
||||
|
||||
ResourceId Following::GetResourceId(ICaptureContext &ctx)
|
||||
{
|
||||
return GetBoundResource(ctx, arrayEl).Id;
|
||||
return GetBoundResource(ctx, arrayEl).resourceId;
|
||||
}
|
||||
|
||||
BoundResource Following::GetBoundResource(ICaptureContext &ctx, int arrayIdx)
|
||||
@@ -134,13 +134,13 @@ BoundResource Following::GetBoundResource(ICaptureContext &ctx, int arrayIdx)
|
||||
|
||||
ShaderBindpointMapping mapping = GetMapping(ctx);
|
||||
|
||||
if(index < mapping.ReadWriteResources.count())
|
||||
if(index < mapping.readWriteResources.count())
|
||||
{
|
||||
BindpointMap &key = mapping.ReadWriteResources[index];
|
||||
Bindpoint &key = mapping.readWriteResources[index];
|
||||
|
||||
int residx = rw.indexOf(key);
|
||||
if(residx >= 0)
|
||||
ret = rw[residx].Resources[arrayIdx];
|
||||
ret = rw[residx].resources[arrayIdx];
|
||||
}
|
||||
}
|
||||
else if(Type == FollowType::ReadOnly)
|
||||
@@ -149,13 +149,13 @@ BoundResource Following::GetBoundResource(ICaptureContext &ctx, int arrayIdx)
|
||||
|
||||
ShaderBindpointMapping mapping = GetMapping(ctx);
|
||||
|
||||
if(index < mapping.ReadOnlyResources.count())
|
||||
if(index < mapping.readOnlyResources.count())
|
||||
{
|
||||
BindpointMap &key = mapping.ReadOnlyResources[index];
|
||||
Bindpoint &key = mapping.readOnlyResources[index];
|
||||
|
||||
int residx = ro.indexOf(key);
|
||||
if(residx >= 0)
|
||||
ret = ro[residx].Resources[arrayIdx];
|
||||
ret = ro[residx].resources[arrayIdx];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ rdcarray<BoundResource> Following::GetOutputTargets(ICaptureContext &ctx)
|
||||
for(const TextureDescription &tex : ctx.GetTextures())
|
||||
{
|
||||
if(tex.creationFlags & TextureCategory::SwapBuffer)
|
||||
return {BoundResource(tex.ID)};
|
||||
return {BoundResource(tex.resourceId)};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ rdcarray<BoundResourceArray> Following::GetReadOnlyResources(ICaptureContext &ct
|
||||
|
||||
// only return copy source for one stage
|
||||
if(copy && stage == ShaderStage::Pixel)
|
||||
ret.push_back(BoundResourceArray(BindpointMap(0, 0), {BoundResource(curDraw->copySource)}));
|
||||
ret.push_back(BoundResourceArray(Bindpoint(0, 0), {BoundResource(curDraw->copySource)}));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -299,9 +299,9 @@ const ShaderBindpointMapping &Following::GetMapping(ICaptureContext &ctx, Shader
|
||||
|
||||
// for PS only add a single mapping to get the copy source
|
||||
if(copy && stage == ShaderStage::Pixel)
|
||||
mapping.ReadOnlyResources = {BindpointMap(0, 0)};
|
||||
mapping.readOnlyResources = {Bindpoint(0, 0)};
|
||||
else
|
||||
mapping.ReadOnlyResources.clear();
|
||||
mapping.readOnlyResources.clear();
|
||||
|
||||
return mapping;
|
||||
}
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
{
|
||||
if(filter.isEmpty())
|
||||
texs.push_back(t);
|
||||
else if(QString(m_Ctx.GetResourceName(t.ID)).contains(filter, Qt::CaseInsensitive))
|
||||
else if(QString(m_Ctx.GetResourceName(t.resourceId)).contains(filter, Qt::CaseInsensitive))
|
||||
texs.push_back(t);
|
||||
}
|
||||
}
|
||||
@@ -397,12 +397,12 @@ public:
|
||||
if(role == Qt::DisplayRole)
|
||||
{
|
||||
if(index.row() >= 0 && index.row() < texs.count())
|
||||
return m_Ctx.GetResourceName(texs[index.row()].ID);
|
||||
return m_Ctx.GetResourceName(texs[index.row()].resourceId);
|
||||
}
|
||||
|
||||
if(role == Qt::UserRole)
|
||||
{
|
||||
return QVariant::fromValue(texs[index.row()].ID);
|
||||
return QVariant::fromValue(texs[index.row()].resourceId);
|
||||
}
|
||||
|
||||
if(role == Qt::DecorationRole)
|
||||
@@ -474,7 +474,7 @@ void TextureViewer::UI_UpdateCachedTexture()
|
||||
id = m_Following.GetResourceId(m_Ctx);
|
||||
|
||||
if(id == ResourceId())
|
||||
id = m_TexDisplay.texid;
|
||||
id = m_TexDisplay.resourceId;
|
||||
|
||||
m_CachedTexture = m_Ctx.GetTexture(id);
|
||||
}
|
||||
@@ -669,14 +669,14 @@ void TextureViewer::RT_FetchCurrentPixel(uint32_t x, uint32_t y, PixelValue &pic
|
||||
if(texptr == NULL)
|
||||
return;
|
||||
|
||||
if(m_TexDisplay.FlipY)
|
||||
if(m_TexDisplay.flipY)
|
||||
y = (texptr->height - 1) - y;
|
||||
|
||||
pickValue = m_Output->PickPixel(m_TexDisplay.texid, true, x, y, m_TexDisplay.sliceFace,
|
||||
pickValue = m_Output->PickPixel(m_TexDisplay.resourceId, true, x, y, m_TexDisplay.sliceFace,
|
||||
m_TexDisplay.mip, m_TexDisplay.sampleIdx);
|
||||
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
realValue = m_Output->PickPixel(m_TexDisplay.texid, false, x, y, m_TexDisplay.sliceFace,
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
realValue = m_Output->PickPixel(m_TexDisplay.resourceId, false, x, y, m_TexDisplay.sliceFace,
|
||||
m_TexDisplay.mip, m_TexDisplay.sampleIdx);
|
||||
}
|
||||
|
||||
@@ -733,12 +733,12 @@ void TextureViewer::RT_UpdateVisualRange(IReplayController *)
|
||||
|
||||
ResourceFormat fmt = texptr->format;
|
||||
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
fmt.compCount = 4;
|
||||
|
||||
bool channels[] = {
|
||||
m_TexDisplay.Red ? true : false, m_TexDisplay.Green && fmt.compCount > 1,
|
||||
m_TexDisplay.Blue && fmt.compCount > 2, m_TexDisplay.Alpha && fmt.compCount > 3,
|
||||
m_TexDisplay.red ? true : false, m_TexDisplay.green && fmt.compCount > 1,
|
||||
m_TexDisplay.blue && fmt.compCount > 2, m_TexDisplay.alpha && fmt.compCount > 3,
|
||||
};
|
||||
|
||||
rdcarray<uint32_t> histogram = m_Output->GetHistogram(ui->rangeHistogram->rangeMin(),
|
||||
@@ -787,9 +787,9 @@ void TextureViewer::UI_UpdateStatusText()
|
||||
}
|
||||
else
|
||||
{
|
||||
float r = qBound(0.0f, m_CurHoverValue.value_f[0], 1.0f);
|
||||
float g = qBound(0.0f, m_CurHoverValue.value_f[1], 1.0f);
|
||||
float b = qBound(0.0f, m_CurHoverValue.value_f[2], 1.0f);
|
||||
float r = qBound(0.0f, m_CurHoverValue.floatValue[0], 1.0f);
|
||||
float g = qBound(0.0f, m_CurHoverValue.floatValue[1], 1.0f);
|
||||
float b = qBound(0.0f, m_CurHoverValue.floatValue[2], 1.0f);
|
||||
|
||||
if(tex.format.srgbCorrected || (tex.creationFlags & TextureCategory::SwapBuffer))
|
||||
{
|
||||
@@ -817,7 +817,7 @@ void TextureViewer::UI_UpdateStatusText()
|
||||
|
||||
if(m_Ctx.APIProps().pipelineType == GraphicsAPI::OpenGL)
|
||||
y = (int)(mipHeight - 1) - y;
|
||||
if(m_TexDisplay.FlipY)
|
||||
if(m_TexDisplay.flipY)
|
||||
y = (int)(mipHeight - 1) - y;
|
||||
|
||||
y = qMax(0, y);
|
||||
@@ -846,7 +846,7 @@ void TextureViewer::UI_UpdateStatusText()
|
||||
y = m_PickedPoint.y() >> (int)m_TexDisplay.mip;
|
||||
if(m_Ctx.APIProps().pipelineType == GraphicsAPI::OpenGL)
|
||||
y = (int)(mipHeight - 1) - y;
|
||||
if(m_TexDisplay.FlipY)
|
||||
if(m_TexDisplay.flipY)
|
||||
y = (int)(mipHeight - 1) - y;
|
||||
|
||||
y = qMax(0, y);
|
||||
@@ -855,13 +855,13 @@ void TextureViewer::UI_UpdateStatusText()
|
||||
|
||||
PixelValue val = m_CurPixelValue;
|
||||
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
{
|
||||
statusText += QFormatStr("%1, %2, %3, %4")
|
||||
.arg(Formatter::Format(val.value_f[0]))
|
||||
.arg(Formatter::Format(val.value_f[1]))
|
||||
.arg(Formatter::Format(val.value_f[2]))
|
||||
.arg(Formatter::Format(val.value_f[3]));
|
||||
.arg(Formatter::Format(val.floatValue[0]))
|
||||
.arg(Formatter::Format(val.floatValue[1]))
|
||||
.arg(Formatter::Format(val.floatValue[2]))
|
||||
.arg(Formatter::Format(val.floatValue[3]));
|
||||
|
||||
val = m_CurRealValue;
|
||||
|
||||
@@ -873,17 +873,14 @@ void TextureViewer::UI_UpdateStatusText()
|
||||
statusText += tr("Depth ");
|
||||
if(uintTex)
|
||||
{
|
||||
if(tex.format.compByteWidth == 2)
|
||||
statusText += Formatter::Format(val.value_u16[0]);
|
||||
else
|
||||
statusText += Formatter::Format(val.value_u[0]);
|
||||
statusText += Formatter::Format(val.uintValue[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
statusText += Formatter::Format(val.value_f[0]);
|
||||
statusText += Formatter::Format(val.floatValue[0]);
|
||||
}
|
||||
|
||||
int stencil = (int)(255.0f * val.value_f[1]);
|
||||
int stencil = (int)(255.0f * val.floatValue[1]);
|
||||
|
||||
statusText +=
|
||||
tr(", Stencil %1 / 0x%2").arg(stencil).arg(Formatter::Format(uint8_t(stencil & 0xff), true));
|
||||
@@ -893,30 +890,30 @@ void TextureViewer::UI_UpdateStatusText()
|
||||
if(uintTex)
|
||||
{
|
||||
statusText += QFormatStr("%1, %2, %3, %4")
|
||||
.arg(Formatter::Format(val.value_u[0]))
|
||||
.arg(Formatter::Format(val.value_u[1]))
|
||||
.arg(Formatter::Format(val.value_u[2]))
|
||||
.arg(Formatter::Format(val.value_u[3]));
|
||||
.arg(Formatter::Format(val.uintValue[0]))
|
||||
.arg(Formatter::Format(val.uintValue[1]))
|
||||
.arg(Formatter::Format(val.uintValue[2]))
|
||||
.arg(Formatter::Format(val.uintValue[3]));
|
||||
}
|
||||
else if(sintTex)
|
||||
{
|
||||
statusText += QFormatStr("%1, %2, %3, %4")
|
||||
.arg(Formatter::Format(val.value_i[0]))
|
||||
.arg(Formatter::Format(val.value_i[1]))
|
||||
.arg(Formatter::Format(val.value_i[2]))
|
||||
.arg(Formatter::Format(val.value_i[3]));
|
||||
.arg(Formatter::Format(val.intValue[0]))
|
||||
.arg(Formatter::Format(val.intValue[1]))
|
||||
.arg(Formatter::Format(val.intValue[2]))
|
||||
.arg(Formatter::Format(val.intValue[3]));
|
||||
}
|
||||
else
|
||||
{
|
||||
statusText += QFormatStr("%1, %2, %3, %4")
|
||||
.arg(Formatter::Format(val.value_f[0]))
|
||||
.arg(Formatter::Format(val.value_f[1]))
|
||||
.arg(Formatter::Format(val.value_f[2]))
|
||||
.arg(Formatter::Format(val.value_f[3]));
|
||||
.arg(Formatter::Format(val.floatValue[0]))
|
||||
.arg(Formatter::Format(val.floatValue[1]))
|
||||
.arg(Formatter::Format(val.floatValue[2]))
|
||||
.arg(Formatter::Format(val.floatValue[3]));
|
||||
}
|
||||
}
|
||||
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
statusText += lit(")");
|
||||
|
||||
// PixelPicked = true;
|
||||
@@ -1050,32 +1047,32 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
|
||||
TextureDescription &tex = *texptr;
|
||||
|
||||
bool newtex = (m_TexDisplay.texid != tex.ID);
|
||||
bool newtex = (m_TexDisplay.resourceId != tex.resourceId);
|
||||
|
||||
// save settings for this current texture
|
||||
if(m_Ctx.Config().TextureViewer_PerTexSettings)
|
||||
{
|
||||
m_TextureSettings[m_TexDisplay.texid].r = ui->channelRed->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.texid].g = ui->channelGreen->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.texid].b = ui->channelBlue->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.texid].a = ui->channelAlpha->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].r = ui->channelRed->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].g = ui->channelGreen->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].b = ui->channelBlue->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].a = ui->channelAlpha->isChecked();
|
||||
|
||||
m_TextureSettings[m_TexDisplay.texid].displayType = qMax(0, ui->channels->currentIndex());
|
||||
m_TextureSettings[m_TexDisplay.texid].customShader = ui->customShader->currentText();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].displayType = qMax(0, ui->channels->currentIndex());
|
||||
m_TextureSettings[m_TexDisplay.resourceId].customShader = ui->customShader->currentText();
|
||||
|
||||
m_TextureSettings[m_TexDisplay.texid].depth = ui->depthDisplay->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.texid].stencil = ui->stencilDisplay->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].depth = ui->depthDisplay->isChecked();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].stencil = ui->stencilDisplay->isChecked();
|
||||
|
||||
m_TextureSettings[m_TexDisplay.texid].mip = qMax(0, ui->mipLevel->currentIndex());
|
||||
m_TextureSettings[m_TexDisplay.texid].slice = qMax(0, ui->sliceFace->currentIndex());
|
||||
m_TextureSettings[m_TexDisplay.resourceId].mip = qMax(0, ui->mipLevel->currentIndex());
|
||||
m_TextureSettings[m_TexDisplay.resourceId].slice = qMax(0, ui->sliceFace->currentIndex());
|
||||
|
||||
m_TextureSettings[m_TexDisplay.texid].minrange = ui->rangeHistogram->blackPoint();
|
||||
m_TextureSettings[m_TexDisplay.texid].maxrange = ui->rangeHistogram->whitePoint();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].minrange = ui->rangeHistogram->blackPoint();
|
||||
m_TextureSettings[m_TexDisplay.resourceId].maxrange = ui->rangeHistogram->whitePoint();
|
||||
|
||||
m_TextureSettings[m_TexDisplay.texid].typeHint = m_Following.GetTypeHint(m_Ctx);
|
||||
m_TextureSettings[m_TexDisplay.resourceId].typeHint = m_Following.GetTypeHint(m_Ctx);
|
||||
}
|
||||
|
||||
m_TexDisplay.texid = tex.ID;
|
||||
m_TexDisplay.resourceId = tex.resourceId;
|
||||
|
||||
// interpret the texture according to the currently following type.
|
||||
if(!currentTextureIsLocked())
|
||||
@@ -1084,8 +1081,9 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
m_TexDisplay.typeHint = CompType::Typeless;
|
||||
|
||||
// if there is no such type or it isn't being followed, use the last seen interpretation
|
||||
if(m_TexDisplay.typeHint == CompType::Typeless && m_TextureSettings.contains(m_TexDisplay.texid))
|
||||
m_TexDisplay.typeHint = m_TextureSettings[m_TexDisplay.texid].typeHint;
|
||||
if(m_TexDisplay.typeHint == CompType::Typeless &&
|
||||
m_TextureSettings.contains(m_TexDisplay.resourceId))
|
||||
m_TexDisplay.typeHint = m_TextureSettings[m_TexDisplay.resourceId].typeHint;
|
||||
|
||||
// try to maintain the pan in the new texture. If the new texture
|
||||
// is approx an integer multiple of the old texture, just changing
|
||||
@@ -1099,8 +1097,8 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
|
||||
if(prevArea > 0.0f)
|
||||
{
|
||||
float prevX = m_TexDisplay.offx;
|
||||
float prevY = m_TexDisplay.offy;
|
||||
float prevX = m_TexDisplay.xOffset;
|
||||
float prevY = m_TexDisplay.yOffset;
|
||||
|
||||
// allow slight difference in aspect ratio for rounding errors
|
||||
// in downscales (e.g. 1680x1050 -> 840x525 -> 420x262 in the
|
||||
@@ -1117,8 +1115,8 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
// similar ish
|
||||
float scaleFactor = (float)(sqrt(curArea) / sqrt(prevArea));
|
||||
|
||||
m_TexDisplay.offx = prevX * scaleFactor;
|
||||
m_TexDisplay.offy = prevY * scaleFactor;
|
||||
m_TexDisplay.xOffset = prevX * scaleFactor;
|
||||
m_TexDisplay.yOffset = prevY * scaleFactor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1253,36 +1251,36 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
// even if we don't switch to a new texture.
|
||||
// Note that if the slice or mip was changed because that slice or mip is the selected one
|
||||
// at the API level, we leave this alone.
|
||||
if(m_Ctx.Config().TextureViewer_PerTexSettings && m_TextureSettings.contains(tex.ID))
|
||||
if(m_Ctx.Config().TextureViewer_PerTexSettings && m_TextureSettings.contains(tex.resourceId))
|
||||
{
|
||||
if(usemipsettings)
|
||||
ui->mipLevel->setCurrentIndex(m_TextureSettings[tex.ID].mip);
|
||||
ui->mipLevel->setCurrentIndex(m_TextureSettings[tex.resourceId].mip);
|
||||
|
||||
if(useslicesettings)
|
||||
ui->sliceFace->setCurrentIndex(m_TextureSettings[tex.ID].slice);
|
||||
ui->sliceFace->setCurrentIndex(m_TextureSettings[tex.resourceId].slice);
|
||||
}
|
||||
|
||||
// handling for if we've switched to a new texture
|
||||
if(newtex)
|
||||
{
|
||||
// if we save certain settings per-texture, restore them (if we have any)
|
||||
if(m_Ctx.Config().TextureViewer_PerTexSettings && m_TextureSettings.contains(tex.ID))
|
||||
if(m_Ctx.Config().TextureViewer_PerTexSettings && m_TextureSettings.contains(tex.resourceId))
|
||||
{
|
||||
ui->channels->setCurrentIndex(m_TextureSettings[tex.ID].displayType);
|
||||
ui->channels->setCurrentIndex(m_TextureSettings[tex.resourceId].displayType);
|
||||
|
||||
ui->customShader->setCurrentText(m_TextureSettings[tex.ID].customShader);
|
||||
ui->customShader->setCurrentText(m_TextureSettings[tex.resourceId].customShader);
|
||||
|
||||
ui->channelRed->setChecked(m_TextureSettings[tex.ID].r);
|
||||
ui->channelGreen->setChecked(m_TextureSettings[tex.ID].g);
|
||||
ui->channelBlue->setChecked(m_TextureSettings[tex.ID].b);
|
||||
ui->channelAlpha->setChecked(m_TextureSettings[tex.ID].a);
|
||||
ui->channelRed->setChecked(m_TextureSettings[tex.resourceId].r);
|
||||
ui->channelGreen->setChecked(m_TextureSettings[tex.resourceId].g);
|
||||
ui->channelBlue->setChecked(m_TextureSettings[tex.resourceId].b);
|
||||
ui->channelAlpha->setChecked(m_TextureSettings[tex.resourceId].a);
|
||||
|
||||
ui->depthDisplay->setChecked(m_TextureSettings[tex.ID].depth);
|
||||
ui->stencilDisplay->setChecked(m_TextureSettings[tex.ID].stencil);
|
||||
ui->depthDisplay->setChecked(m_TextureSettings[tex.resourceId].depth);
|
||||
ui->stencilDisplay->setChecked(m_TextureSettings[tex.resourceId].stencil);
|
||||
|
||||
m_NoRangePaint = true;
|
||||
ui->rangeHistogram->setRange(m_TextureSettings[m_TexDisplay.texid].minrange,
|
||||
m_TextureSettings[m_TexDisplay.texid].maxrange);
|
||||
ui->rangeHistogram->setRange(m_TextureSettings[m_TexDisplay.resourceId].minrange,
|
||||
m_TextureSettings[m_TexDisplay.resourceId].maxrange);
|
||||
m_NoRangePaint = false;
|
||||
}
|
||||
else if(m_Ctx.Config().TextureViewer_PerTexSettings)
|
||||
@@ -1329,7 +1327,7 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
});
|
||||
|
||||
if(m_Ctx.HasTimelineBar())
|
||||
m_Ctx.GetTimelineBar()->HighlightResourceUsage(texptr->ID);
|
||||
m_Ctx.GetTimelineBar()->HighlightResourceUsage(texptr->resourceId);
|
||||
}
|
||||
|
||||
void TextureViewer::UI_SetHistogramRange(const TextureDescription *tex, CompType typeHint)
|
||||
@@ -1396,25 +1394,25 @@ void TextureViewer::UI_UpdateChannels()
|
||||
SHOW(ui->depthDisplay);
|
||||
SHOW(ui->stencilDisplay);
|
||||
|
||||
m_TexDisplay.Red = ui->depthDisplay->isChecked();
|
||||
m_TexDisplay.Green = ui->stencilDisplay->isChecked();
|
||||
m_TexDisplay.Blue = false;
|
||||
m_TexDisplay.Alpha = false;
|
||||
m_TexDisplay.red = ui->depthDisplay->isChecked();
|
||||
m_TexDisplay.green = ui->stencilDisplay->isChecked();
|
||||
m_TexDisplay.blue = false;
|
||||
m_TexDisplay.alpha = false;
|
||||
|
||||
if(m_TexDisplay.Red == m_TexDisplay.Green && !m_TexDisplay.Red)
|
||||
if(m_TexDisplay.red == m_TexDisplay.green && !m_TexDisplay.red)
|
||||
{
|
||||
m_TexDisplay.Red = true;
|
||||
m_TexDisplay.red = true;
|
||||
ui->depthDisplay->setChecked(true);
|
||||
}
|
||||
|
||||
m_TexDisplay.HDRMul = -1.0f;
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
m_TexDisplay.hdrMultiplier = -1.0f;
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
{
|
||||
memset(m_CurPixelValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurPixelValue.floatValue, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.floatValue, 0, sizeof(float) * 4);
|
||||
UI_UpdateStatusText();
|
||||
}
|
||||
m_TexDisplay.CustomShader = ResourceId();
|
||||
m_TexDisplay.customShaderId = ResourceId();
|
||||
}
|
||||
else if(ui->channels->currentIndex() == 0 || !m_Ctx.IsCaptureLoaded())
|
||||
{
|
||||
@@ -1433,19 +1431,19 @@ void TextureViewer::UI_UpdateChannels()
|
||||
HIDE(ui->depthDisplay);
|
||||
HIDE(ui->stencilDisplay);
|
||||
|
||||
m_TexDisplay.Red = ui->channelRed->isChecked();
|
||||
m_TexDisplay.Green = ui->channelGreen->isChecked();
|
||||
m_TexDisplay.Blue = ui->channelBlue->isChecked();
|
||||
m_TexDisplay.Alpha = ui->channelAlpha->isChecked();
|
||||
m_TexDisplay.red = ui->channelRed->isChecked();
|
||||
m_TexDisplay.green = ui->channelGreen->isChecked();
|
||||
m_TexDisplay.blue = ui->channelBlue->isChecked();
|
||||
m_TexDisplay.alpha = ui->channelAlpha->isChecked();
|
||||
|
||||
m_TexDisplay.HDRMul = -1.0f;
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
m_TexDisplay.hdrMultiplier = -1.0f;
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
{
|
||||
memset(m_CurPixelValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurPixelValue.floatValue, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.floatValue, 0, sizeof(float) * 4);
|
||||
UI_UpdateStatusText();
|
||||
}
|
||||
m_TexDisplay.CustomShader = ResourceId();
|
||||
m_TexDisplay.customShaderId = ResourceId();
|
||||
}
|
||||
else if(ui->channels->currentIndex() == 1)
|
||||
{
|
||||
@@ -1464,10 +1462,10 @@ void TextureViewer::UI_UpdateChannels()
|
||||
HIDE(ui->depthDisplay);
|
||||
HIDE(ui->stencilDisplay);
|
||||
|
||||
m_TexDisplay.Red = ui->channelRed->isChecked();
|
||||
m_TexDisplay.Green = ui->channelGreen->isChecked();
|
||||
m_TexDisplay.Blue = ui->channelBlue->isChecked();
|
||||
m_TexDisplay.Alpha = false;
|
||||
m_TexDisplay.red = ui->channelRed->isChecked();
|
||||
m_TexDisplay.green = ui->channelGreen->isChecked();
|
||||
m_TexDisplay.blue = ui->channelBlue->isChecked();
|
||||
m_TexDisplay.alpha = false;
|
||||
|
||||
bool ok = false;
|
||||
float mul = ui->hdrMul->currentText().toFloat(&ok);
|
||||
@@ -1478,14 +1476,14 @@ void TextureViewer::UI_UpdateChannels()
|
||||
ui->hdrMul->setCurrentText(lit("32"));
|
||||
}
|
||||
|
||||
m_TexDisplay.HDRMul = mul;
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
m_TexDisplay.hdrMultiplier = mul;
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
{
|
||||
memset(m_CurPixelValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurPixelValue.floatValue, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.floatValue, 0, sizeof(float) * 4);
|
||||
UI_UpdateStatusText();
|
||||
}
|
||||
m_TexDisplay.CustomShader = ResourceId();
|
||||
m_TexDisplay.customShaderId = ResourceId();
|
||||
}
|
||||
else if(ui->channels->currentIndex() == 2)
|
||||
{
|
||||
@@ -1504,26 +1502,26 @@ void TextureViewer::UI_UpdateChannels()
|
||||
HIDE(ui->depthDisplay);
|
||||
HIDE(ui->stencilDisplay);
|
||||
|
||||
m_TexDisplay.Red = ui->channelRed->isChecked();
|
||||
m_TexDisplay.Green = ui->channelGreen->isChecked();
|
||||
m_TexDisplay.Blue = ui->channelBlue->isChecked();
|
||||
m_TexDisplay.Alpha = ui->channelAlpha->isChecked();
|
||||
m_TexDisplay.red = ui->channelRed->isChecked();
|
||||
m_TexDisplay.green = ui->channelGreen->isChecked();
|
||||
m_TexDisplay.blue = ui->channelBlue->isChecked();
|
||||
m_TexDisplay.alpha = ui->channelAlpha->isChecked();
|
||||
|
||||
m_TexDisplay.HDRMul = -1.0f;
|
||||
m_TexDisplay.hdrMultiplier = -1.0f;
|
||||
|
||||
m_TexDisplay.CustomShader = ResourceId();
|
||||
m_TexDisplay.customShaderId = ResourceId();
|
||||
|
||||
QString shaderName = ui->customShader->currentText().toUpper();
|
||||
|
||||
if(m_CustomShaders.contains(shaderName))
|
||||
{
|
||||
if(m_TexDisplay.CustomShader == ResourceId())
|
||||
if(m_TexDisplay.customShaderId == ResourceId())
|
||||
{
|
||||
memset(m_CurPixelValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.value_f, 0, sizeof(float) * 4);
|
||||
memset(m_CurPixelValue.floatValue, 0, sizeof(float) * 4);
|
||||
memset(m_CurRealValue.floatValue, 0, sizeof(float) * 4);
|
||||
UI_UpdateStatusText();
|
||||
}
|
||||
m_TexDisplay.CustomShader = m_CustomShaders[shaderName];
|
||||
m_TexDisplay.customShaderId = m_CustomShaders[shaderName];
|
||||
ui->customDelete->setEnabled(true);
|
||||
ui->customEdit->setEnabled(true);
|
||||
}
|
||||
@@ -1539,7 +1537,7 @@ void TextureViewer::UI_UpdateChannels()
|
||||
#undef ENABLE
|
||||
#undef DISABLE
|
||||
|
||||
m_TexDisplay.FlipY = ui->flip_y->isChecked();
|
||||
m_TexDisplay.flipY = ui->flip_y->isChecked();
|
||||
|
||||
INVOKE_MEMFN(RT_UpdateAndDisplay);
|
||||
INVOKE_MEMFN(RT_UpdateVisualRange);
|
||||
@@ -1667,7 +1665,7 @@ void TextureViewer::GotoLocation(int x, int y)
|
||||
uint32_t mipHeight = qMax(1U, tex->height >> (int)m_TexDisplay.mip);
|
||||
if(m_Ctx.APIProps().pipelineType == GraphicsAPI::OpenGL)
|
||||
m_PickedPoint.setY((int)(mipHeight - 1) - m_PickedPoint.y());
|
||||
if(m_TexDisplay.FlipY)
|
||||
if(m_TexDisplay.flipY)
|
||||
m_PickedPoint.setY((int)(mipHeight - 1) - m_PickedPoint.x());
|
||||
|
||||
if(m_Output != NULL)
|
||||
@@ -1916,26 +1914,26 @@ void TextureViewer::InitResourcePreview(ResourcePreview *prev, ResourceId id, Co
|
||||
|
||||
void TextureViewer::InitStageResourcePreviews(ShaderStage stage,
|
||||
const rdcarray<ShaderResource> &resourceDetails,
|
||||
const rdcarray<BindpointMap> &mapping,
|
||||
const rdcarray<Bindpoint> &mapping,
|
||||
rdcarray<BoundResourceArray> &ResList,
|
||||
ThumbnailStrip *prevs, int &prevIndex, bool copy,
|
||||
bool rw)
|
||||
{
|
||||
for(int idx = 0; idx < mapping.count(); idx++)
|
||||
{
|
||||
const BindpointMap &key = mapping[idx];
|
||||
const Bindpoint &key = mapping[idx];
|
||||
|
||||
const rdcarray<BoundResource> *resArray = NULL;
|
||||
|
||||
int residx = ResList.indexOf(key);
|
||||
if(residx >= 0)
|
||||
resArray = &ResList[residx].Resources;
|
||||
resArray = &ResList[residx].resources;
|
||||
|
||||
int arrayLen = resArray != NULL ? resArray->count() : 1;
|
||||
|
||||
for(int arrayIdx = 0; arrayIdx < arrayLen; arrayIdx++)
|
||||
{
|
||||
ResourceId id = resArray != NULL ? resArray->at(arrayIdx).Id : ResourceId();
|
||||
ResourceId id = resArray != NULL ? resArray->at(arrayIdx).resourceId : ResourceId();
|
||||
CompType typeHint = resArray != NULL ? resArray->at(arrayIdx).typeHint : CompType::Typeless;
|
||||
|
||||
bool used = key.used;
|
||||
@@ -2055,7 +2053,7 @@ void TextureViewer::thumb_clicked(QMouseEvent *e)
|
||||
ResourceId id = follow.GetResourceId(m_Ctx);
|
||||
|
||||
if(id == ResourceId() && follow == m_Following)
|
||||
id = m_TexDisplay.texid;
|
||||
id = m_TexDisplay.resourceId;
|
||||
|
||||
rdcarray<EventUsage> empty;
|
||||
|
||||
@@ -2093,12 +2091,12 @@ void TextureViewer::render_mouseMove(QMouseEvent *e)
|
||||
if(m_Output == NULL)
|
||||
return;
|
||||
|
||||
m_CurHoverPixel.setX(int((float(e->x() * ui->render->devicePixelRatio()) - m_TexDisplay.offx) /
|
||||
m_CurHoverPixel.setX(int((float(e->x() * ui->render->devicePixelRatio()) - m_TexDisplay.xOffset) /
|
||||
m_TexDisplay.scale));
|
||||
m_CurHoverPixel.setY(int((float(e->y() * ui->render->devicePixelRatio()) - m_TexDisplay.offy) /
|
||||
m_CurHoverPixel.setY(int((float(e->y() * ui->render->devicePixelRatio()) - m_TexDisplay.yOffset) /
|
||||
m_TexDisplay.scale));
|
||||
|
||||
if(m_TexDisplay.texid != ResourceId())
|
||||
if(m_TexDisplay.resourceId != ResourceId())
|
||||
{
|
||||
TextureDescription *texptr = GetCurrentTexture();
|
||||
|
||||
@@ -2257,26 +2255,26 @@ float TextureViewer::CurMaxScrollY()
|
||||
|
||||
QPoint TextureViewer::getScrollPosition()
|
||||
{
|
||||
return QPoint((int)m_TexDisplay.offx, m_TexDisplay.offy);
|
||||
return QPoint((int)m_TexDisplay.xOffset, m_TexDisplay.yOffset);
|
||||
}
|
||||
|
||||
void TextureViewer::setScrollPosition(const QPoint &pos)
|
||||
{
|
||||
m_TexDisplay.offx = qMax(CurMaxScrollX(), (float)pos.x());
|
||||
m_TexDisplay.offy = qMax(CurMaxScrollY(), (float)pos.y());
|
||||
m_TexDisplay.xOffset = qMax(CurMaxScrollX(), (float)pos.x());
|
||||
m_TexDisplay.yOffset = qMax(CurMaxScrollY(), (float)pos.y());
|
||||
|
||||
m_TexDisplay.offx = qMin(0.0f, m_TexDisplay.offx);
|
||||
m_TexDisplay.offy = qMin(0.0f, m_TexDisplay.offy);
|
||||
m_TexDisplay.xOffset = qMin(0.0f, m_TexDisplay.xOffset);
|
||||
m_TexDisplay.yOffset = qMin(0.0f, m_TexDisplay.yOffset);
|
||||
|
||||
if(ScrollUpdateScrollbars)
|
||||
{
|
||||
ScrollUpdateScrollbars = false;
|
||||
|
||||
if(ui->renderHScroll->isEnabled())
|
||||
ui->renderHScroll->setValue(qBound(0, -int(m_TexDisplay.offx), ui->renderHScroll->maximum()));
|
||||
ui->renderHScroll->setValue(qBound(0, -int(m_TexDisplay.xOffset), ui->renderHScroll->maximum()));
|
||||
|
||||
if(ui->renderVScroll->isEnabled())
|
||||
ui->renderVScroll->setValue(qBound(0, -int(m_TexDisplay.offy), ui->renderVScroll->maximum()));
|
||||
ui->renderVScroll->setValue(qBound(0, -int(m_TexDisplay.yOffset), ui->renderVScroll->maximum()));
|
||||
|
||||
ScrollUpdateScrollbars = true;
|
||||
}
|
||||
@@ -2548,14 +2546,14 @@ void TextureViewer::OnCaptureClosed()
|
||||
ui->viewTexBuffer->setEnabled(false);
|
||||
}
|
||||
|
||||
void TextureViewer::OnEventChanged(uint32_t eventID)
|
||||
void TextureViewer::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
UI_UpdateCachedTexture();
|
||||
|
||||
TextureDescription *CurrentTexture = GetCurrentTexture();
|
||||
|
||||
if(!currentTextureIsLocked() ||
|
||||
(CurrentTexture != NULL && m_TexDisplay.texid != CurrentTexture->ID))
|
||||
(CurrentTexture != NULL && m_TexDisplay.resourceId != CurrentTexture->resourceId))
|
||||
UI_OnTextureSelectionChanged(true);
|
||||
|
||||
if(m_Output == NULL)
|
||||
@@ -2599,7 +2597,8 @@ void TextureViewer::OnEventChanged(uint32_t eventID)
|
||||
? tr("DST")
|
||||
: (m_Ctx.CurPipelineState().OutputAbbrev() + QString::number(rt));
|
||||
|
||||
InitResourcePreview(prev, RTs[rt].Id, RTs[rt].typeHint, false, follow, bindName, slotName);
|
||||
InitResourcePreview(prev, RTs[rt].resourceId, RTs[rt].typeHint, false, follow, bindName,
|
||||
slotName);
|
||||
}
|
||||
|
||||
// depth
|
||||
@@ -2615,7 +2614,7 @@ void TextureViewer::OnEventChanged(uint32_t eventID)
|
||||
|
||||
Following follow(FollowType::OutputDepth, ShaderStage::Pixel, 0, 0);
|
||||
|
||||
InitResourcePreview(prev, Depth.Id, Depth.typeHint, false, follow, QString(), tr("DS"));
|
||||
InitResourcePreview(prev, Depth.resourceId, Depth.typeHint, false, follow, QString(), tr("DS"));
|
||||
}
|
||||
|
||||
ShaderStage stages[] = {ShaderStage::Vertex, ShaderStage::Hull, ShaderStage::Domain,
|
||||
@@ -2642,12 +2641,12 @@ void TextureViewer::OnEventChanged(uint32_t eventID)
|
||||
const ShaderReflection *details = Following::GetReflection(m_Ctx, stage);
|
||||
const ShaderBindpointMapping &mapping = Following::GetMapping(m_Ctx, stage);
|
||||
|
||||
InitStageResourcePreviews(stage, details != NULL ? details->ReadWriteResources : empty,
|
||||
mapping.ReadWriteResources, RWs, ui->outputThumbs, outIndex, copy,
|
||||
InitStageResourcePreviews(stage, details != NULL ? details->readWriteResources : empty,
|
||||
mapping.readWriteResources, RWs, ui->outputThumbs, outIndex, copy,
|
||||
true);
|
||||
|
||||
InitStageResourcePreviews(stage, details != NULL ? details->ReadOnlyResources : empty,
|
||||
mapping.ReadOnlyResources, ROs, ui->inputThumbs, inIndex, copy, false);
|
||||
InitStageResourcePreviews(stage, details != NULL ? details->readOnlyResources : empty,
|
||||
mapping.readOnlyResources, ROs, ui->inputThumbs, inIndex, copy, false);
|
||||
}
|
||||
|
||||
// hide others
|
||||
@@ -2903,11 +2902,11 @@ void TextureViewer::channelsWidget_mouseClicked(QMouseEvent *event)
|
||||
|
||||
void TextureViewer::range_rangeUpdated()
|
||||
{
|
||||
m_TexDisplay.rangemin = ui->rangeHistogram->blackPoint();
|
||||
m_TexDisplay.rangemax = ui->rangeHistogram->whitePoint();
|
||||
m_TexDisplay.rangeMin = ui->rangeHistogram->blackPoint();
|
||||
m_TexDisplay.rangeMax = ui->rangeHistogram->whitePoint();
|
||||
|
||||
ui->rangeBlack->setText(Formatter::Format(m_TexDisplay.rangemin));
|
||||
ui->rangeWhite->setText(Formatter::Format(m_TexDisplay.rangemax));
|
||||
ui->rangeBlack->setText(Formatter::Format(m_TexDisplay.rangeMin));
|
||||
ui->rangeWhite->setText(Formatter::Format(m_TexDisplay.rangeMax));
|
||||
|
||||
if(m_NoRangePaint)
|
||||
return;
|
||||
@@ -3033,7 +3032,7 @@ void TextureViewer::AutoFitRange()
|
||||
|
||||
ResourceFormat fmt = GetCurrentTexture()->format;
|
||||
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
{
|
||||
fmt.compType = CompType::Float;
|
||||
}
|
||||
@@ -3042,38 +3041,38 @@ void TextureViewer::AutoFitRange()
|
||||
{
|
||||
if(fmt.compType == CompType::UInt)
|
||||
{
|
||||
min.value_f[i] = min.value_u[i];
|
||||
max.value_f[i] = max.value_u[i];
|
||||
min.floatValue[i] = min.uintValue[i];
|
||||
max.floatValue[i] = max.uintValue[i];
|
||||
}
|
||||
else if(fmt.compType == CompType::SInt)
|
||||
{
|
||||
min.value_f[i] = min.value_i[i];
|
||||
max.value_f[i] = max.value_i[i];
|
||||
min.floatValue[i] = min.intValue[i];
|
||||
max.floatValue[i] = max.intValue[i];
|
||||
}
|
||||
}
|
||||
|
||||
if(m_TexDisplay.Red)
|
||||
if(m_TexDisplay.red)
|
||||
{
|
||||
minval = qMin(minval, min.value_f[0]);
|
||||
maxval = qMax(maxval, max.value_f[0]);
|
||||
minval = qMin(minval, min.floatValue[0]);
|
||||
maxval = qMax(maxval, max.floatValue[0]);
|
||||
changeRange = true;
|
||||
}
|
||||
if(m_TexDisplay.Green && fmt.compCount > 1)
|
||||
if(m_TexDisplay.green && fmt.compCount > 1)
|
||||
{
|
||||
minval = qMin(minval, min.value_f[1]);
|
||||
maxval = qMax(maxval, max.value_f[1]);
|
||||
minval = qMin(minval, min.floatValue[1]);
|
||||
maxval = qMax(maxval, max.floatValue[1]);
|
||||
changeRange = true;
|
||||
}
|
||||
if(m_TexDisplay.Blue && fmt.compCount > 2)
|
||||
if(m_TexDisplay.blue && fmt.compCount > 2)
|
||||
{
|
||||
minval = qMin(minval, min.value_f[2]);
|
||||
maxval = qMax(maxval, max.value_f[2]);
|
||||
minval = qMin(minval, min.floatValue[2]);
|
||||
maxval = qMax(maxval, max.floatValue[2]);
|
||||
changeRange = true;
|
||||
}
|
||||
if(m_TexDisplay.Alpha && fmt.compCount > 3)
|
||||
if(m_TexDisplay.alpha && fmt.compCount > 3)
|
||||
{
|
||||
minval = qMin(minval, min.value_f[3]);
|
||||
maxval = qMax(maxval, max.value_f[3]);
|
||||
minval = qMin(minval, min.floatValue[3]);
|
||||
maxval = qMax(maxval, max.floatValue[3]);
|
||||
changeRange = true;
|
||||
}
|
||||
|
||||
@@ -3224,7 +3223,7 @@ void TextureViewer::ShowGotoPopup()
|
||||
|
||||
if(m_Ctx.APIProps().pipelineType == GraphicsAPI::OpenGL)
|
||||
p.setY((int)(mipHeight - 1) - p.y());
|
||||
if(m_TexDisplay.FlipY)
|
||||
if(m_TexDisplay.flipY)
|
||||
p.setY((int)(mipHeight - 1) - p.y());
|
||||
|
||||
m_Goto->show(ui->render, p);
|
||||
@@ -3309,8 +3308,8 @@ void TextureViewer::on_viewTexBuffer_clicked()
|
||||
|
||||
QString format = QFormatStr("%1 %2[%3];").arg(baseType).arg(varName).arg(w);
|
||||
|
||||
IBufferViewer *viewer =
|
||||
m_Ctx.ViewTextureAsBuffer(m_TexDisplay.sliceFace, m_TexDisplay.mip, texptr->ID, format);
|
||||
IBufferViewer *viewer = m_Ctx.ViewTextureAsBuffer(m_TexDisplay.sliceFace, m_TexDisplay.mip,
|
||||
texptr->resourceId, format);
|
||||
|
||||
m_Ctx.AddDockWindow(viewer->Widget(), DockReference::AddTo, this);
|
||||
}
|
||||
@@ -3325,7 +3324,7 @@ void TextureViewer::on_resourceDetails_clicked()
|
||||
if(!m_Ctx.HasResourceInspector())
|
||||
m_Ctx.ShowResourceInspector();
|
||||
|
||||
m_Ctx.GetResourceInspector()->Inspect(texptr->ID);
|
||||
m_Ctx.GetResourceInspector()->Inspect(texptr->resourceId);
|
||||
|
||||
ToolWindowManager::raiseToolWindow(m_Ctx.GetResourceInspector()->Widget());
|
||||
}
|
||||
@@ -3342,7 +3341,7 @@ void TextureViewer::on_saveTex_clicked()
|
||||
memset(&config, 0, sizeof(config));
|
||||
config.jpegQuality = 90;
|
||||
|
||||
config.id = m_TexDisplay.texid;
|
||||
config.id = m_TexDisplay.resourceId;
|
||||
config.typeHint = m_TexDisplay.typeHint;
|
||||
config.slice.sliceIndex = (int)m_TexDisplay.sliceFace;
|
||||
config.mip = (int)m_TexDisplay.mip;
|
||||
@@ -3351,23 +3350,23 @@ void TextureViewer::on_saveTex_clicked()
|
||||
config.slice.sliceIndex = (int)m_TexDisplay.sliceFace >> (int)m_TexDisplay.mip;
|
||||
|
||||
config.channelExtract = -1;
|
||||
if(m_TexDisplay.Red && !m_TexDisplay.Green && !m_TexDisplay.Blue && !m_TexDisplay.Alpha)
|
||||
if(m_TexDisplay.red && !m_TexDisplay.green && !m_TexDisplay.blue && !m_TexDisplay.alpha)
|
||||
config.channelExtract = 0;
|
||||
if(!m_TexDisplay.Red && m_TexDisplay.Green && !m_TexDisplay.Blue && !m_TexDisplay.Alpha)
|
||||
if(!m_TexDisplay.red && m_TexDisplay.green && !m_TexDisplay.blue && !m_TexDisplay.alpha)
|
||||
config.channelExtract = 1;
|
||||
if(!m_TexDisplay.Red && !m_TexDisplay.Green && m_TexDisplay.Blue && !m_TexDisplay.Alpha)
|
||||
if(!m_TexDisplay.red && !m_TexDisplay.green && m_TexDisplay.blue && !m_TexDisplay.alpha)
|
||||
config.channelExtract = 2;
|
||||
if(!m_TexDisplay.Red && !m_TexDisplay.Green && !m_TexDisplay.Blue && m_TexDisplay.Alpha)
|
||||
if(!m_TexDisplay.red && !m_TexDisplay.green && !m_TexDisplay.blue && m_TexDisplay.alpha)
|
||||
config.channelExtract = 3;
|
||||
|
||||
config.comp.blackPoint = m_TexDisplay.rangemin;
|
||||
config.comp.whitePoint = m_TexDisplay.rangemax;
|
||||
config.comp.blackPoint = m_TexDisplay.rangeMin;
|
||||
config.comp.whitePoint = m_TexDisplay.rangeMax;
|
||||
config.alphaCol = m_TexDisplay.backgroundColor;
|
||||
config.alpha = m_TexDisplay.Alpha ? AlphaMapping::BlendToCheckerboard : AlphaMapping::Discard;
|
||||
if(m_TexDisplay.Alpha && !ui->checkerBack->isChecked())
|
||||
config.alpha = m_TexDisplay.alpha ? AlphaMapping::BlendToCheckerboard : AlphaMapping::Discard;
|
||||
if(m_TexDisplay.alpha && !ui->checkerBack->isChecked())
|
||||
config.alpha = AlphaMapping::BlendToColor;
|
||||
|
||||
if(m_TexDisplay.CustomShader != ResourceId())
|
||||
if(m_TexDisplay.customShaderId != ResourceId())
|
||||
{
|
||||
ResourceId id;
|
||||
m_Ctx.Replay().BlockInvoke(
|
||||
@@ -3460,7 +3459,7 @@ void TextureViewer::on_pixelHistory_clicked()
|
||||
int x = m_PickedPoint.x() >> (int)m_TexDisplay.mip;
|
||||
int y = m_PickedPoint.y() >> (int)m_TexDisplay.mip;
|
||||
|
||||
IPixelHistoryView *hist = m_Ctx.ViewPixelHistory(texptr->ID, x, y, m_TexDisplay);
|
||||
IPixelHistoryView *hist = m_Ctx.ViewPixelHistory(texptr->resourceId, x, y, m_TexDisplay);
|
||||
|
||||
m_Ctx.AddDockWindow(hist->Widget(), DockReference::RightOf, this, 0.3f);
|
||||
|
||||
@@ -3474,7 +3473,7 @@ void TextureViewer::on_pixelHistory_clicked()
|
||||
QThread::msleep(150);
|
||||
m_Ctx.Replay().AsyncInvoke([this, texptr, x, y, hist, histWidget](IReplayController *r) {
|
||||
rdcarray<PixelModification> history =
|
||||
r->PixelHistory(texptr->ID, (uint32_t)x, (int32_t)y, m_TexDisplay.sliceFace,
|
||||
r->PixelHistory(texptr->resourceId, (uint32_t)x, (int32_t)y, m_TexDisplay.sliceFace,
|
||||
m_TexDisplay.mip, m_TexDisplay.sampleIdx, m_TexDisplay.typeHint);
|
||||
|
||||
GUIInvoke::call([hist, histWidget, history] {
|
||||
|
||||
@@ -134,8 +134,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
QVariant persistData();
|
||||
void setPersistData(const QVariant &persistData);
|
||||
@@ -234,7 +234,7 @@ private:
|
||||
Following &follow, const QString &bindName, const QString &slotName);
|
||||
|
||||
void InitStageResourcePreviews(ShaderStage stage, const rdcarray<ShaderResource> &resourceDetails,
|
||||
const rdcarray<BindpointMap> &mapping,
|
||||
const rdcarray<Bindpoint> &mapping,
|
||||
rdcarray<BoundResourceArray> &ResList, ThumbnailStrip *prevs,
|
||||
int &prevIndex, bool copy, bool rw);
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ void TimelineBar::OnCaptureLoaded()
|
||||
layout();
|
||||
}
|
||||
|
||||
void TimelineBar::OnEventChanged(uint32_t eventID)
|
||||
void TimelineBar::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
if(!m_HistoryTarget.isEmpty())
|
||||
m_HistoryTarget = m_Ctx.GetResourceName(m_ID);
|
||||
@@ -258,7 +258,7 @@ void TimelineBar::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
auto it = std::find_if(m_HistoryEvents.begin(), m_HistoryEvents.end(),
|
||||
[this, eid](const PixelModification &mod) {
|
||||
if(mod.eventID == eid)
|
||||
if(mod.eventId == eid)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -274,7 +274,7 @@ void TimelineBar::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
auto it = std::find_if(m_UsageEvents.begin(), m_UsageEvents.end(),
|
||||
[this, eid](const EventUsage &use) {
|
||||
if(use.eventID == eid)
|
||||
if(use.eventId == eid)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -697,12 +697,12 @@ void TimelineBar::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
QPointF pos;
|
||||
|
||||
pos.setX(offsetOf(mod.eventID) + m_eidWidth / 2 - triRadius);
|
||||
pos.setX(offsetOf(mod.eventId) + m_eidWidth / 2 - triRadius);
|
||||
pos.setY(pipsRect.y());
|
||||
|
||||
QPainterPath path = triangle.translated(aliasAlign(pos));
|
||||
|
||||
if(mod.passed())
|
||||
if(mod.Passed())
|
||||
paths[HistoryPassed] = paths[HistoryPassed].united(path);
|
||||
else
|
||||
paths[HistoryFailed] = paths[HistoryFailed].united(path);
|
||||
@@ -714,7 +714,7 @@ void TimelineBar::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
QPointF pos;
|
||||
|
||||
pos.setX(offsetOf(use.eventID) + m_eidWidth / 2 - triRadius);
|
||||
pos.setX(offsetOf(use.eventId) + m_eidWidth / 2 - triRadius);
|
||||
pos.setY(pipsRect.y());
|
||||
|
||||
QPainterPath path = triangle.translated(aliasAlign(pos));
|
||||
@@ -935,7 +935,7 @@ uint32_t TimelineBar::processDraws(QVector<Marker> &markers, QVector<uint32_t> &
|
||||
Marker &m = markers.back();
|
||||
|
||||
m.name = d.name;
|
||||
m.eidStart = d.eventID;
|
||||
m.eidStart = d.eventId;
|
||||
m.eidEnd = processDraws(m.children, m.draws, d.children);
|
||||
|
||||
maxEID = qMax(maxEID, m.eidEnd);
|
||||
@@ -954,12 +954,12 @@ uint32_t TimelineBar::processDraws(QVector<Marker> &markers, QVector<uint32_t> &
|
||||
{
|
||||
if((d.flags & (DrawFlags::SetMarker | DrawFlags::APICalls)) != DrawFlags::SetMarker)
|
||||
{
|
||||
m_Draws.push_back(d.eventID);
|
||||
draws.push_back(d.eventID);
|
||||
m_Draws.push_back(d.eventId);
|
||||
draws.push_back(d.eventId);
|
||||
}
|
||||
}
|
||||
|
||||
maxEID = qMax(maxEID, d.eventID);
|
||||
maxEID = qMax(maxEID, d.eventId);
|
||||
}
|
||||
|
||||
return maxEID;
|
||||
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
void OnCaptureClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
void OnSelectedEventChanged(uint32_t eventId) override {}
|
||||
void OnEventChanged(uint32_t eventId) override;
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
|
||||
Reference in New Issue
Block a user