[Fix] (MG_Test|MG_Bench): Fix compilation.

This commit is contained in:
BZLZHH
2026-02-21 22:25:59 +08:00
parent 9e90d9508b
commit 8bdf990810
7 changed files with 28 additions and 38 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ static void BM_CreateBufferObjectsAndBindBuffer(benchmark::State& state) {
BENCHMARK(BM_CreateBufferObjectsAndBindBuffer)->Unit(benchmark::kMillisecond)->UseRealTime();
static void BM_DeleteBufferObjects(benchmark::State& state) {
MG_Initialize();
Initialize();
std::vector<GLuint> buffers(BUFFER_COUNT);
for (auto _ : state) {
@@ -179,7 +179,7 @@ static void BM_UpdateDataPartially(benchmark::State& state) {
BENCHMARK(BM_UpdateDataPartially)->Unit(benchmark::kMillisecond)->UseRealTime();
int main(int argc, char** argv) {
MG_Initialize();
Initialize();
benchmark ::MaybeReenterWithoutASLR(argc, argv);
char arg0_default[] = "benchmark";
char* args_default = reinterpret_cast<char*>(arg0_default);
@@ -43,7 +43,7 @@ void main(){
// Use TestMat2 and TestMat3 to prevent optimization
vec2 dummy2 = TestMat2[0];
vec3 dummy3 = TestMat3[0];
oneTexel = (1.0 * (fIn1 * fIn2 * fIn3 * fIn4 * fIn5 * fIn6)) / InSize;
texCoord = Position.xy / OutSize;
@@ -221,7 +221,7 @@ static void BM_CompileAndLink(benchmark::State& state) {
BENCHMARK(BM_CompileAndLink)->Unit(benchmark::kMillisecond);
int main(int argc, char** argv) {
MG_Initialize();
Initialize();
benchmark ::MaybeReenterWithoutASLR(argc, argv);
char arg0_default[] = "benchmark";
char* args_default = reinterpret_cast<char*>(arg0_default);
@@ -234,4 +234,4 @@ int main(int argc, char** argv) {
::benchmark ::RunSpecifiedBenchmarks();
::benchmark ::Shutdown();
return 0;
}
}