Skip to content

Commit

Permalink
Apply GL_QCOM_binning_control if available
Browse files Browse the repository at this point in the history
  • Loading branch information
raven02 committed Sep 5, 2013
1 parent 20f6e4b commit a59c058
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion GPU/GLES/GLES_GPU.cpp
Expand Up @@ -364,7 +364,26 @@ GLES_GPU::GLES_GPU()
} else {
glstate.SetVSyncInterval(g_Config.bVSync ? 1 : 0);
}


#ifdef ANDROID
if (gl_extensions.QCOM_binning_control)
/*
We can try different HINTS later or even with option to toggle for Adreno GPU
CPU_OPTIMIZED_QCOM
- binning algorithm focuses on lower CPU utilization (this path increases vertex processing
GPU_OPTIMIZED_QCOM
- binning algorithm focuses on lower GPU utilization (this path increases CPU usage
RENDER_DIRECT_TO_FRAMEBUFFER_QCOM
- render directly to the final framebuffer and bypass tile memory
(this path has a low CPU usage, but in some cases uses more memory bandwidth)
*/
glHint(GL_BINNING_CONTROL_HINT_QCOM, GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM);
#endif

shaderManager_ = new ShaderManager();
transformDraw_.SetShaderManager(shaderManager_);
transformDraw_.SetTextureCache(&textureCache_);
Expand Down

3 comments on commit a59c058

@xsacha
Copy link
Collaborator

@xsacha xsacha commented on a59c058 Sep 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My Blackberry device has 'QCOM_binning_control'.
Why does this have an #ifdef for Android?

@raven02
Copy link
Contributor

@raven02 raven02 commented on a59c058 Sep 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added the BLACKBERRY string there as well as native. Since i don't have blackberry , it would be good if you can test it if there is any measurable speedup with this enable direct rendering or even CPU_OPTIMIZED_QCOM/GPU_OPTIMIZED_QCOM hints as well.

@xsacha
Copy link
Collaborator

@xsacha xsacha commented on a59c058 Sep 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll test it out.

Please sign in to comment.