mesh profiling
This commit is contained in:
parent
272a1268a0
commit
3625123363
@ -1973,6 +1973,7 @@ Performance improvements
|
|||||||
- Nearby entity lookup caching per frame
|
- Nearby entity lookup caching per frame
|
||||||
- Far-away entities do not spawn physics by default
|
- Far-away entities do not spawn physics by default
|
||||||
Lod emitter service checker function
|
Lod emitter service checker function
|
||||||
|
Mesh profiling
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -445,6 +445,7 @@ public class Mesh {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(renderPipelineState.getUseLight()){
|
if(renderPipelineState.getUseLight()){
|
||||||
|
Globals.profiler.beginAggregateCpuSample("Light");
|
||||||
//Until we switch to uniform buffer objects we will have to buffer lighting data here manually each time we draw
|
//Until we switch to uniform buffer objects we will have to buffer lighting data here manually each time we draw
|
||||||
//side note: :(
|
//side note: :(
|
||||||
if(Globals.renderingEngine.getLightManager() == null){
|
if(Globals.renderingEngine.getLightManager() == null){
|
||||||
@ -463,6 +464,7 @@ public class Mesh {
|
|||||||
|
|
||||||
}
|
}
|
||||||
Globals.renderingEngine.checkError();
|
Globals.renderingEngine.checkError();
|
||||||
|
Globals.profiler.endCpuSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(renderPipelineState.getUseMaterial() && textureMask == null){
|
if(renderPipelineState.getUseMaterial() && textureMask == null){
|
||||||
@ -483,6 +485,7 @@ public class Mesh {
|
|||||||
//
|
//
|
||||||
//The texture masking logic
|
//The texture masking logic
|
||||||
if(textureMask != null){
|
if(textureMask != null){
|
||||||
|
Globals.profiler.beginAggregateCpuSample("Texture mask");
|
||||||
//
|
//
|
||||||
//path that uses already-defined texture objects
|
//path that uses already-defined texture objects
|
||||||
if(textureMask.getTextures() != null){
|
if(textureMask.getTextures() != null){
|
||||||
@ -507,6 +510,7 @@ public class Mesh {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Globals.renderingEngine.checkError();
|
Globals.renderingEngine.checkError();
|
||||||
|
Globals.profiler.endCpuSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(renderPipelineState.getUseShadowMap()){
|
if(renderPipelineState.getUseShadowMap()){
|
||||||
@ -574,15 +578,19 @@ public class Mesh {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(renderPipelineState.getBufferNonStandardUniforms()){
|
if(renderPipelineState.getBufferNonStandardUniforms()){
|
||||||
|
Globals.profiler.beginAggregateCpuSample("Nonstandard uniforms");
|
||||||
this.bufferAllUniforms(openGLState);
|
this.bufferAllUniforms(openGLState);
|
||||||
Globals.renderingEngine.checkError();
|
Globals.renderingEngine.checkError();
|
||||||
|
Globals.profiler.endCpuSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(renderPipelineState.getInstanced()){
|
if(renderPipelineState.getInstanced()){
|
||||||
|
Globals.profiler.beginAggregateCpuSample("Instance logic");
|
||||||
if(renderPipelineState.getInstanceData()!=null){
|
if(renderPipelineState.getInstanceData()!=null){
|
||||||
InstanceData instanceData = renderPipelineState.getInstanceData();
|
InstanceData instanceData = renderPipelineState.getInstanceData();
|
||||||
instanceData.upload(openGLState, renderPipelineState);
|
instanceData.upload(openGLState, renderPipelineState);
|
||||||
}
|
}
|
||||||
|
Globals.profiler.endCpuSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user