|
|
|
|
|
|
|
|
|
|
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; |
|
|
|