mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[Feat] (Pipe): land the P3a contract - the handle-shaped resource op table, the applier's resource and vertex-elements records, the two vertex wire views, an explicit baseInstance on set_vertex_buffers, and the first kNeedsAck
This commit is contained in:
@@ -306,6 +306,7 @@ inline constexpr const char* kMGPipeInputFieldFilledBy[kMGPipeInputFieldCount] =
|
||||
enum class MGPipeFieldEmitter : Uint8 {
|
||||
kNone = 0,
|
||||
BindRenderState,
|
||||
BindVertexElements,
|
||||
CreateRenderState,
|
||||
SetDynamicState,
|
||||
SetPatchState,
|
||||
@@ -315,6 +316,7 @@ enum class MGPipeFieldEmitter : Uint8 {
|
||||
inline constexpr const char* kMGPipeFieldEmitterNames[] = {
|
||||
"kNone",
|
||||
"BindRenderState",
|
||||
"BindVertexElements",
|
||||
"CreateRenderState",
|
||||
"SetDynamicState",
|
||||
"SetPatchState",
|
||||
@@ -327,7 +329,7 @@ inline constexpr MGPipeFieldEmitter kMGPipeFieldEmittedBy[kMGPipeInputFieldCount
|
||||
MGPipeFieldEmitter::CreateRenderState, // GetBlendEquationIndexed
|
||||
MGPipeFieldEmitter::CreateRenderState, // GetBlendFuncIndexed
|
||||
MGPipeFieldEmitter::kNone, // GetBoundTransformFeedbackName
|
||||
MGPipeFieldEmitter::kNone, // GetBoundVertexArray
|
||||
MGPipeFieldEmitter::BindVertexElements, // GetBoundVertexArray
|
||||
MGPipeFieldEmitter::kNone, // GetBufferBindingSlot
|
||||
MGPipeFieldEmitter::kNone, // GetBufferBindingPoint
|
||||
MGPipeFieldEmitter::kNone, // GetBufferBindingPointCount
|
||||
@@ -386,7 +388,7 @@ inline constexpr MGPipeFieldEmitter kMGPipeFieldEmittedBy[kMGPipeInputFieldCount
|
||||
MGPipeFieldEmitter::kNone, // GetBoundTransformFeedbackLifetimeId
|
||||
MGPipeFieldEmitter::kNone, // HasOpenTransformFeedbackSpan
|
||||
};
|
||||
inline constexpr SizeT kMGPipeEmittedFieldCount = 33;
|
||||
inline constexpr SizeT kMGPipeEmittedFieldCount = 34;
|
||||
|
||||
struct MGPipeFilledState {
|
||||
Uint64 CurrentVerbSerial;
|
||||
|
||||
@@ -113,6 +113,8 @@ inline Bool MGPipeVerify(const PerBufferBlendState& a, const PerBufferBlendState
|
||||
inline Bool MGPipeVerify(const StencilFaceState& a, const StencilFaceState& b, const char** outField);
|
||||
inline Bool MGPipeVerify(const DynamicBackendParameters& a, const DynamicBackendParameters& b, const char** outField);
|
||||
inline Bool MGPipeVerify(const MGHostSpan& a, const MGHostSpan& b, const char** outField);
|
||||
inline Bool MGPipeVerify(const MGPVertexAttribWire& a, const MGPVertexAttribWire& b, const char** outField);
|
||||
inline Bool MGPipeVerify(const MGPVertexBindingPointWire& a, const MGPVertexBindingPointWire& b, const char** outField);
|
||||
|
||||
template <>
|
||||
struct MGPipeHasFieldVerifier<MGPBlobRef> : std::true_type {};
|
||||
@@ -252,6 +254,10 @@ template <>
|
||||
struct MGPipeHasFieldVerifier<DynamicBackendParameters> : std::true_type {};
|
||||
template <>
|
||||
struct MGPipeHasFieldVerifier<MGHostSpan> : std::true_type {};
|
||||
template <>
|
||||
struct MGPipeHasFieldVerifier<MGPVertexAttribWire> : std::true_type {};
|
||||
template <>
|
||||
struct MGPipeHasFieldVerifier<MGPVertexBindingPointWire> : std::true_type {};
|
||||
|
||||
template <class T>
|
||||
inline Bool MGPipeFieldEqual(const T& a, const T& b) {
|
||||
@@ -643,6 +649,16 @@ inline Bool MGPipeVerify(const MGHostSpan& a, const MGHostSpan& b, const char**
|
||||
return true;
|
||||
}
|
||||
|
||||
inline Bool MGPipeVerify(const MGPVertexAttribWire& a, const MGPVertexAttribWire& b, const char** outField) {
|
||||
MGP_FIELDS_MGPVertexAttribWire(MGP_VERIFY_FIELD)
|
||||
return true;
|
||||
}
|
||||
|
||||
inline Bool MGPipeVerify(const MGPVertexBindingPointWire& a, const MGPVertexBindingPointWire& b, const char** outField) {
|
||||
MGP_FIELDS_MGPVertexBindingPointWire(MGP_VERIFY_FIELD)
|
||||
return true;
|
||||
}
|
||||
|
||||
#undef MGP_VERIFY_FIELD
|
||||
|
||||
inline constexpr SizeT kMGPipeVerifiedPayloadCount = 69;
|
||||
inline constexpr SizeT kMGPipeVerifiedPayloadCount = 71;
|
||||
|
||||
Reference in New Issue
Block a user