mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-12 04:23:23 +09:00
[MG_Pipe, MG_Remote, MG_Impl] (P7): the ID-49 neutral read_pixels pack has one spelling
- MG_Pipe/MGPipeTypes.h gains inline MGPipeNeutralReadPixelsPack() next to MGPPixelPackState, whose owner it is; the applier that installs the neutral state and the comparator whose oracle it is now call the same function - MG_Remote/Server/PipeApplier.cpp read_pixels takes the constant from there instead of building it field by field - MG_Impl/Pipe/PipeFill.cpp drops ServerReadPixelsNeutralPack, the re-typed second copy: a drift between two hand-typed spellings costs a FALSE DIVERGENCE on the server read, not a build break, which is the direction that fails quietly - notes/p7/verify-split.md 2.2 says one spelling and why the old reasoning (do not reach into MG_Remote/Server from MG_Impl) did not survive the failure-direction argument
This commit is contained in:
@@ -452,12 +452,10 @@ namespace MobileGL::MG_Remote::Server {
|
||||
// in which the pack state is neutral does not outlive the call.
|
||||
const MG_Pipe::PixelStoreParameters savedPack =
|
||||
MG_Pipe::gPipeInputs.GetPixelStoreParameters(/*isUnpack=*/false);
|
||||
MG_Pipe::MGPPixelPackState neutralPack{};
|
||||
neutralPack.Pack.RowLength = 0;
|
||||
neutralPack.Pack.SkipRows = 0;
|
||||
neutralPack.Pack.SkipPixels = 0;
|
||||
neutralPack.Pack.SkipImages = 0;
|
||||
neutralPack.Pack.Alignment = 1;
|
||||
// MG_Pipe owns the constant (MGPipeTypes.h): in a verify build the compare-at-read hook's
|
||||
// oracle for the pack half inside this window is the same value, and a second hand-typed
|
||||
// copy would drift without a build break.
|
||||
const MG_Pipe::MGPPixelPackState neutralPack = MG_Pipe::MGPipeNeutralReadPixelsPack();
|
||||
MG_Pipe::MGPipeApplySetPixelPackState(neutralPack);
|
||||
|
||||
table->GL.ReadPixels(info.Box.X, info.Box.Y, static_cast<GLsizei>(info.Box.W),
|
||||
|
||||
Reference in New Issue
Block a user