Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit a0d1ffc

Browse files
committed
Disable the Debug compute shaders for ES3
1 parent 4aafe84 commit a0d1ffc

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

PostProcessing/Shaders/Debug/Histogram.compute

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ CBUFFER_END
1717

1818
groupshared uint gs_histogram[HISTOGRAM_BINS];
1919

20+
#ifdef DISABLE_COMPUTE_SHADERS
21+
22+
TRIVIAL_COMPUTE_KERNEL(KHistogramGather)
23+
TRIVIAL_COMPUTE_KERNEL(KHistogramClear)
24+
25+
#else
26+
2027
#pragma kernel KHistogramGather
2128
[numthreads(GROUP_SIZE_X, GROUP_SIZE_Y, 1)]
2229
void KHistogramGather(uint2 dispatchThreadId : SV_DispatchThreadID, uint2 groupThreadId : SV_GroupThreadID)
@@ -64,3 +71,5 @@ void KHistogramClear(uint dispatchThreadId : SV_DispatchThreadID)
6471
if (dispatchThreadId < HISTOGRAM_BINS)
6572
_HistogramBuffer[dispatchThreadId] = 0u;
6673
}
74+
75+
#endif // DISABLE_COMPUTE_SHADERS

PostProcessing/Shaders/Debug/Vectorscope.compute

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ CBUFFER_END
1414
#define GROUP_SIZE_X 16
1515
#define GROUP_SIZE_Y 16
1616

17+
#ifdef DISABLE_COMPUTE_SHADERS
18+
19+
TRIVIAL_COMPUTE_KERNEL(KVectorscopeGather)
20+
TRIVIAL_COMPUTE_KERNEL(KVectorscopeClear)
21+
22+
#else
23+
1724
#pragma kernel KVectorscopeGather
1825
[numthreads(GROUP_SIZE_X, GROUP_SIZE_Y, 1)]
1926
void KVectorscopeGather(uint2 dispatchThreadId : SV_DispatchThreadID)
@@ -40,3 +47,5 @@ void KVectorscopeClear(uint2 dispatchThreadId : SV_DispatchThreadID)
4047
if (dispatchThreadId.x < uint(_Params.z) && dispatchThreadId.y < uint(_Params.z))
4148
_VectorscopeBuffer[dispatchThreadId.y * _Params.z + dispatchThreadId.x] = 0u;
4249
}
50+
51+
#endif

PostProcessing/Shaders/Debug/Waveform.compute

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ CBUFFER_END
1616
#define GROUP_SIZE_X 16
1717
#define GROUP_SIZE_Y 16
1818

19+
#ifdef DISABLE_COMPUTE_SHADERS
20+
21+
TRIVIAL_COMPUTE_KERNEL(KWaveformGather)
22+
TRIVIAL_COMPUTE_KERNEL(KWaveformClear)
23+
24+
#else
25+
1926
#pragma kernel KWaveformGather
2027
[numthreads(1, GROUP_SIZE, 1)]
2128
void KWaveformGather(uint2 dispatchThreadId : SV_DispatchThreadID)
@@ -47,3 +54,5 @@ void KWaveformClear(uint2 dispatchThreadId : SV_DispatchThreadID)
4754
if (dispatchThreadId.x < uint(_Params.x) && dispatchThreadId.y < uint(_Params.y))
4855
_WaveformBuffer[dispatchThreadId.y * uint(_Params.x) + dispatchThreadId.x] = uint4(0u, 0u, 0u, 0u);
4956
}
57+
58+
#endif // DISABLE_COMPUTE_SHADERS

0 commit comments

Comments
 (0)