diff --git a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp index b886fd799..3048762a9 100644 --- a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp @@ -1295,20 +1295,9 @@ void GLPipelineStateViewer::setState() QString format = QString(a.format.Name()); if(!a.enabled) - { format = tr("Generic=") + MakeGenericValueString(compCount, compType, a); - } - else - { - if(a.floatCast && a.normalizedCast) - { - format += tr(" Normalised and cast to float"); - } - else if(a.floatCast) - { - format += tr(" Cast to float"); - } - } + else if(a.floatCast) + format += tr(" Cast to float"); RDTreeWidgetItem *node = new RDTreeWidgetItem({i, a.enabled ? tr("Enabled") : tr("Disabled"), name, format, diff --git a/renderdoc/api/replay/gl_pipestate.h b/renderdoc/api/replay/gl_pipestate.h index 864e4c0cc..b2a52c423 100644 --- a/renderdoc/api/replay/gl_pipestate.h +++ b/renderdoc/api/replay/gl_pipestate.h @@ -43,8 +43,8 @@ struct VertexAttribute bool operator==(const VertexAttribute &o) const { - return enabled == o.enabled && floatCast == o.floatCast && normalizedCast == o.normalizedCast && - format == o.format && !memcmp(&genericValue, &o.genericValue, sizeof(genericValue)) && + return enabled == o.enabled && floatCast == o.floatCast && format == o.format && + !memcmp(&genericValue, &o.genericValue, sizeof(genericValue)) && vertexBufferSlot == o.vertexBufferSlot && byteOffset == o.byteOffset; } bool operator<(const VertexAttribute &o) const @@ -53,8 +53,6 @@ struct VertexAttribute return enabled < o.enabled; if(!(floatCast == o.floatCast)) return floatCast < o.floatCast; - if(!(normalizedCast == o.normalizedCast)) - return normalizedCast < o.normalizedCast; if(!(format == o.format)) return format < o.format; if(memcmp(&genericValue, &o.genericValue, sizeof(genericValue)) < 0) @@ -71,16 +69,10 @@ struct VertexAttribute DOCUMENT(R"(Only valid for integer formatted attributes, ``True`` if they are cast to float. This is because they were specified with an integer format but glVertexAttribFormat (not -glVertexAttribIFormat) so they will be cast. See also :data:`normalisedCast` to see if the integer -data is normalised to [0,1] or [-1,1] while being cast. +glVertexAttribIFormat) so they will be cast. )"); bool floatCast = false; - DOCUMENT(R"(Only valid for integer formatted attributes, ``True`` if the data is normalised while -cast to float. See :data:`floatCast` for more information. -)"); - bool normalizedCast = false; - DOCUMENT("The :class:`ResourceFormat` of the vertex attribute."); ResourceFormat format; diff --git a/renderdoc/driver/gl/gl_replay.cpp b/renderdoc/driver/gl/gl_replay.cpp index b65442891..6da92038d 100644 --- a/renderdoc/driver/gl/gl_replay.cpp +++ b/renderdoc/driver/gl/gl_replay.cpp @@ -957,25 +957,25 @@ void GLReplay::SavePipelineState(uint32_t eventId) } } - pipe.vertexInput.attributes[i].format = fmt; - // normalized/floatCast flags are irrelevant for float formats if(fmt.compType == CompType::SInt || fmt.compType == CompType::UInt) { // if it wasn't an integer, it's cast to float pipe.vertexInput.attributes[i].floatCast = !integer; - // if we're casting, also store whether or not it's normalised + // if we're casting, change the component type as appropriate if(!integer) - pipe.vertexInput.attributes[i].normalizedCast = normalized != 0; - else - pipe.vertexInput.attributes[i].normalizedCast = false; + { + if(normalized != 0) + fmt.compType = (fmt.compType == CompType::SInt) ? CompType::SNorm : CompType::UNorm; + } } else { - pipe.vertexInput.attributes[i].floatCast = pipe.vertexInput.attributes[i].normalizedCast = - false; + pipe.vertexInput.attributes[i].floatCast = false; } + + pipe.vertexInput.attributes[i].format = fmt; } pipe.vertexInput.provokingVertexLast = (rs.ProvokingVertex != eGL_FIRST_VERTEX_CONVENTION); diff --git a/renderdoc/replay/renderdoc_serialise.inl b/renderdoc/replay/renderdoc_serialise.inl index 934c02115..42c376115 100644 --- a/renderdoc/replay/renderdoc_serialise.inl +++ b/renderdoc/replay/renderdoc_serialise.inl @@ -1551,13 +1551,12 @@ void DoSerialise(SerialiserType &ser, GLPipe::VertexAttribute &el) { SERIALISE_MEMBER(enabled); SERIALISE_MEMBER(floatCast); - SERIALISE_MEMBER(normalizedCast); SERIALISE_MEMBER(format); SERIALISE_MEMBER(genericValue); SERIALISE_MEMBER(vertexBufferSlot); SERIALISE_MEMBER(byteOffset); - SIZE_CHECK(36); + SIZE_CHECK(32); } template