[Scummvm-git-logs] scummvm master -> 8bd2ad9d9e22338747a4da8785492697cae2e883

grisenti noreply at scummvm.org
Wed Mar 29 19:30:32 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8bd2ad9d9e HPL1: move shader logging to shader class


Commit: 8bd2ad9d9e22338747a4da8785492697cae2e883
    https://github.com/scummvm/scummvm/commit/8bd2ad9d9e22338747a4da8785492697cae2e883
Author: grisenti (emanuele at grisenti.net)
Date: 2023-03-29T21:30:22+02:00

Commit Message:
HPL1: move shader logging to shader class

Changed paths:
    engines/hpl1/engine/graphics/RenderState.cpp
    engines/hpl1/engine/impl/CGProgram.cpp


diff --git a/engines/hpl1/engine/graphics/RenderState.cpp b/engines/hpl1/engine/graphics/RenderState.cpp
index d1b3092194d..413f304b854 100644
--- a/engines/hpl1/engine/graphics/RenderState.cpp
+++ b/engines/hpl1/engine/graphics/RenderState.cpp
@@ -372,7 +372,6 @@ void iRenderState::setGpuProgMode(cRenderSettings *settings) {
 	if (gpuProgram != settings->gpuProgram) {
 		if (gpuProgram != settings->gpuProgram) {
 			if (gpuProgram) {
-				Hpl1::logInfo(Hpl1::kDebugRenderer, "binding shader: '%s'\n", gpuProgram->GetName().c_str());
 				gpuProgram->Bind();
 
 				if (gpuProgramSetup) {
@@ -391,7 +390,6 @@ void iRenderState::setGpuProgMode(cRenderSettings *settings) {
 				settings->mbUsesLight = mbUsesLight;
 				settings->mbUsesEye = mbUsesEye;
 			} else {
-				Hpl1::logInfo(Hpl1::kDebugRenderer, "unbinding current shader: '%s'\n", settings->gpuProgram->GetName().c_str());
 				settings->gpuProgram->UnBind();
 			}
 			settings->gpuProgram = gpuProgram;
diff --git a/engines/hpl1/engine/impl/CGProgram.cpp b/engines/hpl1/engine/impl/CGProgram.cpp
index d66fb03d109..310a10f212c 100644
--- a/engines/hpl1/engine/impl/CGProgram.cpp
+++ b/engines/hpl1/engine/impl/CGProgram.cpp
@@ -90,12 +90,14 @@ void cCGProgram::destroy() {
 //-----------------------------------------------------------------------
 
 void cCGProgram::Bind() {
+	Hpl1::logInfo(Hpl1::kDebugShaders, "binding shader %s\n", GetName().c_str());
 	_shader->use();
 }
 
 //-----------------------------------------------------------------------
 
 void cCGProgram::UnBind() {
+	Hpl1::logInfo(Hpl1::kDebugShaders, "unbinding shader %s\n", GetName().c_str());
 	_shader->unbind();
 }
 




More information about the Scummvm-git-logs mailing list