소스 검색

Mention workgroup limits more;

bjorn 8 달 전
부모
커밋
9640a9f7f5
3개의 변경된 파일14개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 0
      api/init.lua
  2. 6 1
      api/lovr/graphics/Pass/compute.lua
  3. 8 1
      api/lovr/graphics/Shader/getWorkgroupSize.lua

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
api/init.lua


+ 6 - 1
api/lovr/graphics/Pass/compute.lua

@@ -87,6 +87,10 @@ return {
       dispatch. It's equivalent to `WorkgroupID * WorkgroupSize + LocalThreadID` (usually what you
       want!)
 
+    There are limits to the number of workgroups that can be dispatched, see the `workgroupCount`
+    limit in `lovr.graphics.getLimits`.  The local workgroup size is also limited by the
+    `workgroupSize` and `totalWorkgroupSize` limits.
+
     Indirect compute dispatches are useful to "chain" compute shaders together, while keeping all of
     the data on the GPU.  The first dispatch can do some computation and write some results to
     buffers, then the second indirect dispatch can use the data in those buffers to know how many
@@ -144,6 +148,7 @@ return {
   related = {
     'Pass:barrier',
     'Pass:setShader',
-    'Pass:send'
+    'Pass:send',
+    'lovr.graphics.getLimits'
   }
 }

+ 8 - 1
api/lovr/graphics/Shader/getWorkgroupSize.lua

@@ -28,5 +28,12 @@ return {
   notes = [[
     For example, if the workgroup size is `8x8x1` and `16x16x16` workgroups are dispatched, then the
     compute shader will run `16 * 16 * 16 * (8 * 8 * 1) = 262144` times.
-  ]]
+
+    The maximum workgroup size is hardware-specific, and is given by the `workgroupSize` and
+    `totalWorkgroupSize` limit in `lovr.graphics.getLimits`.
+  ]],
+  related = {
+    'Pass:compute',
+    'lovr.graphics.getLimits'
+  }
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.