mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-29 20:52:16 +09:00
[Chore] (MG_Backend, MG_Backend/DirectGLES, MG_Backend/DirectVulkan, MG_Backend/MGPipe, MG_Backend/Record, MG_Benchmark/Buffer, MG_Benchmark/Container, MG_Benchmark/Driver, MG_Benchmark/Program, MG_Benchmark/ShaderCache, MG_Benchmark/Transpile, MG_Gbm, MG_Impl, MG_Impl/CGLImpl, MG_Impl/DyldInterpose, MG_Impl/EGLImpl, MG_Impl/GLImpl, MG_Impl/GLXImpl, MG_Impl/NSOpenGLImpl, MG_Impl/Pipe, MG_Impl/WGLImpl, MG_IntegrationTest, MG_IntegrationTest/Harness, MG_IntegrationTest/Scenarios, MG_Pipe, MG_Remote, MG_Remote/Client, MG_Remote/Protocol, MG_Remote/Server, MG_Remote/Transport, MG_Remote/Wire, MG_State/EGLState, MG_State/GLState, MG_Test, MG_Test/Backend, MG_Test/BackendLoader, MG_Test/Buffer, MG_Test/EGLState, MG_Test/Framebuffer, MG_Test/Gbm, MG_Test/Pipe, MG_Test/Pipeline, MG_Test/Program, MG_Test/Query, MG_Test/SelfTest, MG_Test/ShaderTranspiler, MG_Test/State, MG_Test/Swapchain, MG_Test/Texture, MG_Test/Util, MG_Test/VertexArray, MG_Test/Wire, MG_Util/Async, MG_Util/BackendLoaders, MG_Util/Converters, MG_Util/Damage, MG_Util/Debug, MG_Util/Math, MG_Util/Metrics, MG_Util/SelfTest, MG_Util/ShaderTranspiler, MG_Util/Texture, MG_Util/X11, MobileGL, scripts/data, tools/cts, tools/device_bench, tools/spikes, tools/trace_replay, tools/wgl-smoke): clang-format every C and C++ source
- Layout only: token streams match up to split literals, continuations and using order - The size totals fall, so the structure baseline is lowered
This commit is contained in:
1 parent
76b10cc35b
commit
f4994ee36e
747 files changed
+35842
-36261
No files matched your search
@@ -139,13 +139,9 @@ void main() { fragColor = vec4(0.0, 1.0, 0.0, 1.0); }
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3);
|
||||
}
|
||||
|
||||
static bool IsGreen(const unsigned char* px) {
|
||||
return px[0] < 64 && px[1] > 192;
|
||||
}
|
||||
static bool IsGreen(const unsigned char* px) { return px[0] < 64 && px[1] > 192; }
|
||||
|
||||
static bool IsRed(const unsigned char* px) {
|
||||
return px[0] > 192 && px[1] < 64;
|
||||
}
|
||||
static bool IsRed(const unsigned char* px) { return px[0] > 192 && px[1] < 64; }
|
||||
|
||||
void PixelAt(int x, int y, unsigned char* out) const {
|
||||
glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, out);
|
||||
@@ -275,8 +271,9 @@ void main() { fragColor = vec4(0.0, 1.0, 0.0, 1.0); }
|
||||
PixelAt(width / 4, height / 2, left);
|
||||
EXPECT_EQ(FirstGLError(), 0u);
|
||||
|
||||
EXPECT_TRUE(IsGreen(right)) << "the kept half is not painted (" << int(right[0]) << "," << int(right[1])
|
||||
<< "," << int(right[2]) << ") - the draw itself did not happen, so the clipped "
|
||||
EXPECT_TRUE(IsGreen(right)) << "the kept half is not painted (" << int(right[0]) << "," << int(right[1]) << ","
|
||||
<< int(right[2])
|
||||
<< ") - the draw itself did not happen, so the clipped "
|
||||
"half below proves nothing";
|
||||
EXPECT_TRUE(IsRed(left)) << "gl_ClipDistance[0] is negative on the left half and GL_CLIP_DISTANCE0 is "
|
||||
"enabled, so those fragments must be clipped away; found ("
|
||||
|
||||
Reference in new issue
Block a user