浏览代码

debug log flag

/main
xingwei.zhu 5 年前
当前提交
dee7405b
共有 1 个文件被更改,包括 11 次插入3 次删除
  1. 14
      Runtime/ui/renderer/cmdbufferCanvas/rendering/canvas_shader_initializer.cs

14
Runtime/ui/renderer/cmdbufferCanvas/rendering/canvas_shader_initializer.cs


const bool enableComputeBuffer = true;
const bool enableDebugLog = true;
static void DebugAssert(bool condition, string logMsg) {
if (enableDebugLog && !condition) {
Debug.Log(logMsg);
}
}
Debug.Log($"do prepare default shader @frame = {Time.frameCount}");
DebugAssert(false, $"do prepare default shader @frame = {Time.frameCount}");
supportComputeBuffer = false;
var convexFillShader = GetShader("UIWidgets/canvas_convexFill");

var isShaderSupported = testShader.isSupported;
testShader = null;
supportComputeBuffer = enableComputeBuffer && SystemInfo.supportsComputeShaders && isShaderSupported;
Debug.Log($"do prepare computebuffer shader @frame = {Time.frameCount} with support state = {supportComputeBuffer}");
DebugAssert(false, $"do prepare computebuffer shader @frame = {Time.frameCount} with support state = {supportComputeBuffer}");
if (!supportComputeBuffer) {
return;

正在加载...
取消
保存