mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 14:18:31 +09:00
[Fix, Test] (MG_Test): include the header that defines MOBILEGL_PIPE_POISON - seven emitter suites tested the macro without it, compiled the non-aborting arm, and turned eighteen expected refusals into aborts the moment a disaggregated build armed it
This commit is contained in:
@@ -51,6 +51,13 @@
|
|||||||
#include <MG_Pipe/MGPipe.h>
|
#include <MG_Pipe/MGPipe.h>
|
||||||
#if MOBILEGL_PIPE_PUSH
|
#if MOBILEGL_PIPE_PUSH
|
||||||
#include "Init.h"
|
#include "Init.h"
|
||||||
|
// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere
|
||||||
|
// else, so a TU that tests it without this include silently reads it as 0. That is
|
||||||
|
// invisible in a push build (where it really is 0) and in a verify build (where
|
||||||
|
// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the
|
||||||
|
// one arming condition that lives behind the header, so a split build is the first place
|
||||||
|
// the refusals below stop being fatal while the expectations still say they are.
|
||||||
|
#include <MG_Backend/MGPipe/PipeInputs.h>
|
||||||
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
||||||
#include <MG_Impl/GLImpl/Program/GL_ProgramPipeline.h>
|
#include <MG_Impl/GLImpl/Program/GL_ProgramPipeline.h>
|
||||||
#include <MG_Impl/Pipe/CompositeResolver.h>
|
#include <MG_Impl/Pipe/CompositeResolver.h>
|
||||||
|
|||||||
@@ -57,6 +57,13 @@
|
|||||||
#include "Includes.h"
|
#include "Includes.h"
|
||||||
#include <MG_Pipe/MGPipe.h>
|
#include <MG_Pipe/MGPipe.h>
|
||||||
#if MOBILEGL_PIPE_PUSH
|
#if MOBILEGL_PIPE_PUSH
|
||||||
|
// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere
|
||||||
|
// else, so a TU that tests it without this include silently reads it as 0. That is
|
||||||
|
// invisible in a push build (where it really is 0) and in a verify build (where
|
||||||
|
// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the
|
||||||
|
// one arming condition that lives behind the header, so a split build is the first place
|
||||||
|
// the refusals below stop being fatal while the expectations still say they are.
|
||||||
|
#include <MG_Backend/MGPipe/PipeInputs.h>
|
||||||
#include <MG_Impl/Pipe/FramebufferEmit.h>
|
#include <MG_Impl/Pipe/FramebufferEmit.h>
|
||||||
#include <MG_Impl/Pipe/SetHashSuppressor.h>
|
#include <MG_Impl/Pipe/SetHashSuppressor.h>
|
||||||
#include <MG_Pipe/PipeApply.h>
|
#include <MG_Pipe/PipeApply.h>
|
||||||
|
|||||||
@@ -45,6 +45,13 @@
|
|||||||
#include <MG_Pipe/MGPipe.h>
|
#include <MG_Pipe/MGPipe.h>
|
||||||
#if MOBILEGL_PIPE_PUSH
|
#if MOBILEGL_PIPE_PUSH
|
||||||
#include "Init.h"
|
#include "Init.h"
|
||||||
|
// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere
|
||||||
|
// else, so a TU that tests it without this include silently reads it as 0. That is
|
||||||
|
// invisible in a push build (where it really is 0) and in a verify build (where
|
||||||
|
// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the
|
||||||
|
// one arming condition that lives behind the header, so a split build is the first place
|
||||||
|
// the refusals below stop being fatal while the expectations still say they are.
|
||||||
|
#include <MG_Backend/MGPipe/PipeInputs.h>
|
||||||
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
||||||
#include <MG_Impl/GLImpl/Texture/GL_Texture.h>
|
#include <MG_Impl/GLImpl/Texture/GL_Texture.h>
|
||||||
#include <MG_Impl/Pipe/ImageEmit.h>
|
#include <MG_Impl/Pipe/ImageEmit.h>
|
||||||
|
|||||||
@@ -50,6 +50,13 @@
|
|||||||
#include <MG_Pipe/MGPipe.h>
|
#include <MG_Pipe/MGPipe.h>
|
||||||
#if MOBILEGL_PIPE_PUSH
|
#if MOBILEGL_PIPE_PUSH
|
||||||
#include "Init.h"
|
#include "Init.h"
|
||||||
|
// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere
|
||||||
|
// else, so a TU that tests it without this include silently reads it as 0. That is
|
||||||
|
// invisible in a push build (where it really is 0) and in a verify build (where
|
||||||
|
// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the
|
||||||
|
// one arming condition that lives behind the header, so a split build is the first place
|
||||||
|
// the refusals below stop being fatal while the expectations still say they are.
|
||||||
|
#include <MG_Backend/MGPipe/PipeInputs.h>
|
||||||
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
||||||
#include <MG_Impl/Pipe/ProgramEmit.h>
|
#include <MG_Impl/Pipe/ProgramEmit.h>
|
||||||
#include <MG_Impl/Pipe/SlotAllocator.h>
|
#include <MG_Impl/Pipe/SlotAllocator.h>
|
||||||
|
|||||||
@@ -56,6 +56,13 @@
|
|||||||
#include <MG_Pipe/MGPipe.h>
|
#include <MG_Pipe/MGPipe.h>
|
||||||
#if MOBILEGL_PIPE_PUSH
|
#if MOBILEGL_PIPE_PUSH
|
||||||
#include <Config.h>
|
#include <Config.h>
|
||||||
|
// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere
|
||||||
|
// else, so a TU that tests it without this include silently reads it as 0. That is
|
||||||
|
// invisible in a push build (where it really is 0) and in a verify build (where
|
||||||
|
// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the
|
||||||
|
// one arming condition that lives behind the header, so a split build is the first place
|
||||||
|
// the refusals below stop being fatal while the expectations still say they are.
|
||||||
|
#include <MG_Backend/MGPipe/PipeInputs.h>
|
||||||
#include <MG_Impl/Pipe/ResourceTracker.h>
|
#include <MG_Impl/Pipe/ResourceTracker.h>
|
||||||
#include <MG_Impl/Pipe/SlotAllocator.h>
|
#include <MG_Impl/Pipe/SlotAllocator.h>
|
||||||
#include <MG_Impl/Pipe/VertexInputEmit.h>
|
#include <MG_Impl/Pipe/VertexInputEmit.h>
|
||||||
@@ -1246,7 +1253,12 @@ namespace {
|
|||||||
TEST(ResourceEmit, TheLiveHostWritesWireFiresOnTheCallAPersistentMapProducerWouldSetItOn) {
|
TEST(ResourceEmit, TheLiveHostWritesWireFiresOnTheCallAPersistentMapProducerWouldSetItOn) {
|
||||||
#if !MOBILEGL_PIPE_PUSH
|
#if !MOBILEGL_PIPE_PUSH
|
||||||
GTEST_SKIP() << "MOBILEGL_PIPE_PUSH is off: there is no applier in this build";
|
GTEST_SKIP() << "MOBILEGL_PIPE_PUSH is off: there is no applier in this build";
|
||||||
#elif !(MOBILEGL_PIPE_POISON || MOBILEGL_PIPE_VERIFY)
|
// MOBILEGL_PIPE_VERIFY alone, NOT `POISON || VERIFY`. PinNoLiveHostWrites is compiled
|
||||||
|
// under `#if MOBILEGL_PIPE_VERIFY` only (PipeApply.cpp:838-853), so in a split build -
|
||||||
|
// where POISON is armed by MOBILEGL_BUILD_DISAGGREGATED but VERIFY is off - the wire
|
||||||
|
// genuinely is compiled out and this case must skip. The wrong disjunction was masked
|
||||||
|
// until now by POISON being invisible in this TU at all (see the include at the top).
|
||||||
|
#elif !MOBILEGL_PIPE_VERIFY
|
||||||
GTEST_SKIP() << "Fatal{PipeLiveHostWrites} is a MOBILEGL_PIPE_VERIFY wire and is compiled out here";
|
GTEST_SKIP() << "Fatal{PipeLiveHostWrites} is a MOBILEGL_PIPE_VERIFY wire and is compiled out here";
|
||||||
#elif !MGTEST_HAVE_FORK
|
#elif !MGTEST_HAVE_FORK
|
||||||
GTEST_SKIP() << "no fork on this platform; the wire's verdict is std::abort()";
|
GTEST_SKIP() << "no fork on this platform; the wire's verdict is std::abort()";
|
||||||
|
|||||||
@@ -56,6 +56,13 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "Init.h"
|
#include "Init.h"
|
||||||
|
// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere
|
||||||
|
// else, so a TU that tests it without this include silently reads it as 0. That is
|
||||||
|
// invisible in a push build (where it really is 0) and in a verify build (where
|
||||||
|
// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the
|
||||||
|
// one arming condition that lives behind the header, so a split build is the first place
|
||||||
|
// the refusals below stop being fatal while the expectations still say they are.
|
||||||
|
#include <MG_Backend/MGPipe/PipeInputs.h>
|
||||||
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
#include <MG_Impl/GLImpl/Program/GL_Program.h>
|
||||||
#include <MG_Impl/GLImpl/Texture/GL_Texture.h>
|
#include <MG_Impl/GLImpl/Texture/GL_Texture.h>
|
||||||
#include <MG_Impl/Pipe/TextureEmit.h>
|
#include <MG_Impl/Pipe/TextureEmit.h>
|
||||||
|
|||||||
@@ -57,6 +57,13 @@
|
|||||||
#include "Includes.h"
|
#include "Includes.h"
|
||||||
#include <MG_Pipe/MGPipe.h>
|
#include <MG_Pipe/MGPipe.h>
|
||||||
#if MOBILEGL_PIPE_PUSH
|
#if MOBILEGL_PIPE_PUSH
|
||||||
|
// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere
|
||||||
|
// else, so a TU that tests it without this include silently reads it as 0. That is
|
||||||
|
// invisible in a push build (where it really is 0) and in a verify build (where
|
||||||
|
// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the
|
||||||
|
// one arming condition that lives behind the header, so a split build is the first place
|
||||||
|
// the refusals below stop being fatal while the expectations still say they are.
|
||||||
|
#include <MG_Backend/MGPipe/PipeInputs.h>
|
||||||
#include <MG_Impl/Pipe/PipeFill.h>
|
#include <MG_Impl/Pipe/PipeFill.h>
|
||||||
#include <MG_Impl/Pipe/SamplerEmit.h>
|
#include <MG_Impl/Pipe/SamplerEmit.h>
|
||||||
#include <MG_Impl/Pipe/TextureEmit.h>
|
#include <MG_Impl/Pipe/TextureEmit.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user