mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-29 18:54:07 +00:00
Fix unlock FPS flag
Add comments for test flags
This commit is contained in:
@ -678,7 +678,7 @@ GLuint ShaderEngine::compilePresetShader(const PresentShaderType shaderType, Sha
|
||||
if (!parser.ApplyPreprocessor(shaderFilename.c_str(), fullSource.c_str(), fullSource.size(), sourcePreprocessed)) {
|
||||
std::cerr << "Failed to preprocess HLSL(step1) " << shaderTypeString << " shader" << std::endl;
|
||||
|
||||
#ifndef DUMP_SHADERS_ON_ERROR
|
||||
#if !DUMP_SHADERS_ON_ERROR
|
||||
std::cerr << "Source: " << std::endl << fullSource << std::endl;
|
||||
#else
|
||||
std::ofstream out("/tmp/shader_" + shaderTypeString + "_step1.txt");
|
||||
@ -730,7 +730,7 @@ GLuint ShaderEngine::compilePresetShader(const PresentShaderType shaderType, Sha
|
||||
if( !parser.Parse(shaderFilename.c_str(), sourcePreprocessed.c_str(), sourcePreprocessed.size()) ) {
|
||||
std::cerr << "Failed to parse HLSL(step2) " << shaderTypeString << " shader" << std::endl;
|
||||
|
||||
#ifndef DUMP_SHADERS_ON_ERROR
|
||||
#if !DUMP_SHADERS_ON_ERROR
|
||||
std::cerr << "Source: " << std::endl << sourcePreprocessed << std::endl;
|
||||
#else
|
||||
std::ofstream out2("/tmp/shader_" + shaderTypeString + "_step2.txt");
|
||||
@ -743,7 +743,7 @@ GLuint ShaderEngine::compilePresetShader(const PresentShaderType shaderType, Sha
|
||||
// generate GLSL
|
||||
if (!generator.Generate(&tree, M4::GLSLGenerator::Target_FragmentShader, M4::GLSLGenerator::Version_140, "PS")) {
|
||||
std::cerr << "Failed to transpile HLSL(step3) " << shaderTypeString << " shader to GLSL" << std::endl;
|
||||
#ifndef DUMP_SHADERS_ON_ERROR
|
||||
#if !DUMP_SHADERS_ON_ERROR
|
||||
std::cerr << "Source: " << std::endl << sourcePreprocessed << std::endl;
|
||||
#else
|
||||
std::ofstream out2("/tmp/shader_" + shaderTypeString + "_step2.txt");
|
||||
@ -767,7 +767,7 @@ GLuint ShaderEngine::compilePresetShader(const PresentShaderType shaderType, Sha
|
||||
} else {
|
||||
std::cerr << "Compilation error (step3) of " << shaderTypeString << std::endl;
|
||||
|
||||
#ifndef DUMP_SHADERS_ON_ERROR
|
||||
#if !DUMP_SHADERS_ON_ERROR
|
||||
std::cerr << "Source:" << std::endl << generator.GetResult() << std::endl;
|
||||
#else
|
||||
std::ofstream out3("/tmp/shader_" + shaderTypeString + "_step3.txt");
|
||||
|
||||
@ -9,10 +9,13 @@
|
||||
#define GL_TRANSITION
|
||||
|
||||
// Enable openGL extra checks, better not be enabled in release build
|
||||
#define OGL_DEBUG 0
|
||||
#define OGL_DEBUG 0
|
||||
|
||||
// Unlock FPS for rendering benchmarks, it disables Vblank/Vsync and prints drawned frames count within a 5s test run
|
||||
#define UNLOCK_FPS 0
|
||||
|
||||
#define DUMP_SHADERS_ON_ERROR
|
||||
// If a shader compilation failure occurs, it dumps shader source into /tmp instead of stderr
|
||||
#define DUMP_SHADERS_ON_ERROR 0
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <OpenGL/gl3.h>
|
||||
|
||||
@ -449,6 +449,7 @@ static void *thread_callback(void *prjm) {
|
||||
this->fpsstart=getTicks ( &timeKeeper->startTime );
|
||||
}
|
||||
|
||||
#ifndef UNLOCK_FPS
|
||||
int timediff = getTicks ( &timeKeeper->startTime )-this->timestart;
|
||||
|
||||
if ( timediff < this->mspf )
|
||||
@ -461,6 +462,8 @@ static void *thread_callback(void *prjm) {
|
||||
if ( usleep ( sleepTime ) != 0 ) {}}
|
||||
}
|
||||
this->timestart=getTicks ( &timeKeeper->startTime );
|
||||
#endif
|
||||
|
||||
#endif /** !WIN32 */
|
||||
|
||||
#ifdef SYNC_PRESET_SWITCHES
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
|
||||
#include "pmSDL.hpp"
|
||||
|
||||
#define UNLOCK_FPS 0
|
||||
#define FAKE_AUDIO 0
|
||||
#define TEST_ALL_PRESETS 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user