Add fixed bindpoint information to shader reflection data

* Previously this was provided by the ShaderBindpointMapping, but since we plan
  to remove that we add the information here. These will be purely for
  informational purposes and will not be used to look up bound resources etc.
  They exist for display only, or for API-specific interpretation if e.g. the
  bindpoint is known ahead of time it can be identified here without having to
  jump through hoops to get which descriptor a given bind accesses and get the
  register number for that descriptor.
* On OpenGL this information will not be present because bindings are mutable
  (even if they are declared in the shader). The only way to identify a
  particular binding by register will be with those hoops
This commit is contained in:
baldurk
2024-04-10 18:58:50 +01:00
parent d88aad8fc2
commit bbbfb5f3d2
4 changed files with 179 additions and 8 deletions
+13 -4
View File
@@ -198,11 +198,14 @@ void DoSerialise(SerialiserType &ser, ConstantBlock &el)
SERIALISE_MEMBER(name);
SERIALISE_MEMBER(variables);
SERIALISE_MEMBER(bindPoint);
SERIALISE_MEMBER(fixedBindNumber);
SERIALISE_MEMBER(fixedBindSetOrSpace);
SERIALISE_MEMBER(bindArraySize);
SERIALISE_MEMBER(byteSize);
SERIALISE_MEMBER(bufferBacked);
SERIALISE_MEMBER(compileConstants);
SIZE_CHECK(64);
SIZE_CHECK(72);
}
template <typename SerialiserType>
@@ -210,8 +213,11 @@ void DoSerialise(SerialiserType &ser, ShaderSampler &el)
{
SERIALISE_MEMBER(name);
SERIALISE_MEMBER(bindPoint);
SERIALISE_MEMBER(fixedBindNumber);
SERIALISE_MEMBER(fixedBindSetOrSpace);
SERIALISE_MEMBER(bindArraySize);
SIZE_CHECK(32);
SIZE_CHECK(40);
}
template <typename SerialiserType>
@@ -221,12 +227,15 @@ void DoSerialise(SerialiserType &ser, ShaderResource &el)
SERIALISE_MEMBER(name);
SERIALISE_MEMBER(variableType);
SERIALISE_MEMBER(bindPoint);
SERIALISE_MEMBER(fixedBindNumber);
SERIALISE_MEMBER(fixedBindSetOrSpace);
SERIALISE_MEMBER(bindArraySize);
SERIALISE_MEMBER(isTexture);
SERIALISE_MEMBER(hasSampler);
SERIALISE_MEMBER(isInputAttachment);
SERIALISE_MEMBER(isReadOnly);
SIZE_CHECK(112);
SIZE_CHECK(128);
}
template <typename SerialiserType>
@@ -312,7 +321,7 @@ void DoSerialise(SerialiserType &ser, ShaderReflection &el)
SERIALISE_MEMBER(taskPayload);
SIZE_CHECK(480);
SIZE_CHECK(488);
}
template <typename SerialiserType>