mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 15:33:22 +09:00
[MG_Remote] (Disaggregated): P5f fe - document handle consumers and capture ordering
This commit is contained in:
@@ -1993,7 +1993,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
xfb.scattered = false;
|
xfb.scattered = false;
|
||||||
xfb.scatterProgram.reset();
|
xfb.scatterProgram.reset();
|
||||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||||
xfb.scatterArchive.reset();
|
xfb.scatterArchive.reset();
|
||||||
#endif
|
#endif
|
||||||
xfb.scatterCapacityVertices = 0;
|
xfb.scatterCapacityVertices = 0;
|
||||||
if (program->NeedsScatteredTransformFeedbackCapture()) {
|
if (program->NeedsScatteredTransformFeedbackCapture()) {
|
||||||
@@ -2101,7 +2101,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
xfb.scattered = false;
|
xfb.scattered = false;
|
||||||
xfb.scatterProgram.reset();
|
xfb.scatterProgram.reset();
|
||||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||||
xfb.scatterArchive.reset();
|
xfb.scatterArchive.reset();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
ReadbackCapturedRanges(xfb.targets);
|
ReadbackCapturedRanges(xfb.targets);
|
||||||
|
|||||||
@@ -1389,21 +1389,12 @@ namespace MobileGL::MG_Remote::Client {
|
|||||||
// MarkEndTransformFeedbackCaptureTargets). Taking it here as well would mark the same
|
// MarkEndTransformFeedbackCaptureTargets). Taking it here as well would mark the same
|
||||||
// buffers twice and taking it INSTEAD of there would mark nothing.
|
// buffers twice and taking it INSTEAD of there would mark nothing.
|
||||||
//
|
//
|
||||||
// RULE D (CONTRACT-P5B.md §0): each record carries the GL arguments the frontend handed
|
// P5f fe extends Begin with the immutable capture snapshot: program CSO handle,
|
||||||
// the backend slot and nothing that is a READING of them. The capture program, the
|
// XFB object lifetime id, and four buffer handle/range pairs. Buffer resource records
|
||||||
// capture-buffer bindings, the patch state and the bound XFB object all stay
|
// precede this verb through BeforeReadOnlyVerb; AcquireShaderCso below publishes the
|
||||||
// BARRIER-PULLED - the server's backend reads the client's gPipeInputs fill of the
|
// program archive before Begin. Deferred driver Begin and End therefore need no
|
||||||
// moment, which MGP_FILL at each call site has just written and the verb barrier holds
|
// frontend program or binding-point lookup. set_stream_output_targets stays unused:
|
||||||
// still (R-1). That is why these are six two-line emitters and not an XFB protocol.
|
// this state changes at the capture-span boundary, so it rides Begin itself.
|
||||||
//
|
|
||||||
// WHAT MUST HAVE CROSSED BEFORE begin_stream_output, since it is the ordering question
|
|
||||||
// this package was asked: the capture buffers' own resource records (emitted at their
|
|
||||||
// own call sites through the resource family, long before this point), the program
|
|
||||||
// (the CSO/program family, likewise), and the buffer BINDINGS - which do not cross as a
|
|
||||||
// record at all, because set_stream_output_targets (39) has no producer and no consumer
|
|
||||||
// and CONTRACT-P5B.md §2 rules it NOT required for t2: under the barrier the server's
|
|
||||||
// StartPendingTransformFeedback reads them through the kXfbSpan/kDraw pulls
|
|
||||||
// (GetTransformFeedbackProgram, GetBufferBindingPoint). Producing that row is P9's.
|
|
||||||
|
|
||||||
void EmitBeginTransformFeedback(GLenum primitiveMode) {
|
void EmitBeginTransformFeedback(GLenum primitiveMode) {
|
||||||
ClientSession& session = RequireSession("BeginTransformFeedback");
|
ClientSession& session = RequireSession("BeginTransformFeedback");
|
||||||
|
|||||||
@@ -850,9 +850,8 @@ namespace MobileGL::MG_Remote::Server {
|
|||||||
ServerUnmigratedVerbFatal("CopyImageSubData+RENDERBUFFER");
|
ServerUnmigratedVerbFatal("CopyImageSubData+RENDERBUFFER");
|
||||||
}
|
}
|
||||||
|
|
||||||
// THE TWO ENDPOINTS ARE REBUILT FROM THE GL NAMES, through the BARRIER-PULLED sticky
|
// P5f fe: both texture identities already travel in the record. Pass those handles
|
||||||
// forward GetTextureObject(name) - `rsp` counts every one of these and P7 is what
|
// to the backend's server-owned texture table; GL names are diagnostic data only.
|
||||||
// retires them by making the backend take the handles that travel beside the names.
|
|
||||||
MG_Backend::CopyImageEndpoint src{};
|
MG_Backend::CopyImageEndpoint src{};
|
||||||
MG_Backend::CopyImageEndpoint dst{};
|
MG_Backend::CopyImageEndpoint dst{};
|
||||||
src.TextureHandle = copy.Src;
|
src.TextureHandle = copy.Src;
|
||||||
@@ -918,9 +917,8 @@ namespace MobileGL::MG_Remote::Server {
|
|||||||
// application's block INDEX. `name` points into the decoder's bounded local and is
|
// application's block INDEX. `name` points into the decoder's bounded local and is
|
||||||
// valid for this call only (rule C); the backend slot copies what it needs.
|
// valid for this call only (rule C); the backend slot copies what it needs.
|
||||||
//
|
//
|
||||||
// Both backends resolve the PROGRAM through the barrier-pulled GetProgramObject(GlName)
|
// P5f fe: publish the record's program handle for the backend consumer. Espryt
|
||||||
// / TryGetDirectVulkanProgram - `rsp` again, retired by P9. ShaderCso travels beside the
|
// resolves its server twin directly; Magma's consumer is the fm package's seam.
|
||||||
// name for the phase that dispatches on it.
|
|
||||||
MG_Pipe::MGPipeApplier().ClearVerbHandles();
|
MG_Pipe::MGPipeApplier().ClearVerbHandles();
|
||||||
MG_Pipe::MGPipeApplier().VerbStorageBlockProgram = binding.ShaderCso;
|
MG_Pipe::MGPipeApplier().VerbStorageBlockProgram = binding.ShaderCso;
|
||||||
table->GL.ShaderStorageBlockBinding(static_cast<GLuint>(binding.GlName), name,
|
table->GL.ShaderStorageBlockBinding(static_cast<GLuint>(binding.GlName), name,
|
||||||
@@ -1015,10 +1013,8 @@ namespace MobileGL::MG_Remote::Server {
|
|||||||
// objects by the GL name (XfbImpl::g_xfbObjects[name], DirectGLES.cpp:1401) and creates
|
// objects by the GL name (XfbImpl::g_xfbObjects[name], DirectGLES.cpp:1401) and creates
|
||||||
// the ES object on first bind; passing the lifetime id would index a map that has never
|
// the ES object on first bind; passing the lifetime id would index a map that has never
|
||||||
// heard of it and silently create a second driver object per bind. The lifetime id
|
// heard of it and silently create a second driver object per bind. The lifetime id
|
||||||
// travels as the identity P7/P9 will dispatch on once the XFB namespace has a wire
|
// identifies the P5f capture snapshot on this side. Keeping it separate preserves
|
||||||
// lifetime of its own - it has no reader on this side today, and pretending otherwise
|
// the backend GL-name argument while Begin/End find the right server-owned span.
|
||||||
// by folding it into the key is exactly the "a GL name is never an identity" confusion
|
|
||||||
// the contract's GlName row is written against.
|
|
||||||
MG_Pipe::MGPipeApplier().BoundStreamOutputLifetimeId = bind.LifetimeId;
|
MG_Pipe::MGPipeApplier().BoundStreamOutputLifetimeId = bind.LifetimeId;
|
||||||
table->GL.BindTransformFeedback(static_cast<GLuint>(bind.GlName));
|
table->GL.BindTransformFeedback(static_cast<GLuint>(bind.GlName));
|
||||||
++m_streamOutputBinds;
|
++m_streamOutputBinds;
|
||||||
|
|||||||
Reference in New Issue
Block a user