Browse Source

Update limits; mv scissor/viewport;

bjorn 3 years ago
parent
commit
c8d95e1e00

File diff suppressed because it is too large
+ 37 - 2
api/init.lua


+ 1 - 1
api/lovr/graphics/Pass/setScissor.lua

@@ -1,5 +1,5 @@
 return {
 return {
-  tag = 'camera',
+  tag = 'pipeline',
   summary = 'Set the scissor.',
   summary = 'Set the scissor.',
   description = 'TODO',
   description = 'TODO',
   arguments = {
   arguments = {

+ 1 - 1
api/lovr/graphics/Pass/setViewport.lua

@@ -1,5 +1,5 @@
 return {
 return {
-  tag = 'camera',
+  tag = 'pipeline',
   summary = 'Set the viewport.',
   summary = 'Set the viewport.',
   description = 'TODO',
   description = 'TODO',
   arguments = {
   arguments = {

+ 86 - 9
api/lovr/graphics/getLimits.lua

@@ -37,18 +37,50 @@ return {
             render target.
             render target.
           ]]
           ]]
         },
         },
+        {
+          name = 'uniformBuffersPerStage',
+          type = 'number',
+          description = 'The maximum number of uniform buffers in a shader stage.'
+        },
+        {
+          name = 'storageBuffersPerStage',
+          type = 'number',
+          description = 'The maximum number of storage buffers in a shader stage.'
+        },
+        {
+          name = 'sampledTexturesPerStage',
+          type = 'number',
+          description = 'The maximum number of sampled textures in a shader stage.'
+        },
+        {
+          name = 'storageTexturesPerStage',
+          type = 'number',
+          description = 'The maximum number of storage textures in a shader stage.'
+        },
+        {
+          name = 'samplersPerStage',
+          type = 'number',
+          description = 'The maximum number of samplers in a shader stage.'
+        },
+        {
+          name = 'resourcesPerShader',
+          type = 'number',
+          description = [[
+            The maximum combined number of buffers, textures, and sampler variables in a Shader.
+          ]]
+        },
         {
         {
           name = 'uniformBufferRange',
           name = 'uniformBufferRange',
           type = 'number',
           type = 'number',
           description = [[
           description = [[
-            The maximum range of bytes that can be bound to a uniform buffer binding in a shader.
+            The maximum range of bytes that can be bound to a uniform buffer in a shader.
           ]]
           ]]
         },
         },
         {
         {
           name = 'storageBufferRange',
           name = 'storageBufferRange',
           type = 'number',
           type = 'number',
           description = [[
           description = [[
-            The maximum range of bytes that can be bound to a storage buffer binding in a shader.
+            The maximum range of bytes that can be bound to a storage buffer in a shader.
           ]]
           ]]
         },
         },
         {
         {
@@ -125,6 +157,15 @@ return {
           type = 'number',
           type = 'number',
           description = 'The maximum number of bytes used by `shared` variables in compute shaders.'
           description = 'The maximum number of bytes used by `shared` variables in compute shaders.'
         },
         },
+        {
+          name = 'shaderConstantSize',
+          type = 'number',
+          description = [[
+            The maximum number of bytes of push constants that can be in a Shader.  Push constants
+            are shared between stages, so the stage with the largest amount of push constant data
+            will count towards this limit.
+          ]]
+        },
         {
         {
           name = 'indirectDrawCount',
           name = 'indirectDrawCount',
           type = 'number',
           type = 'number',
@@ -165,17 +206,17 @@ return {
         <tr>
         <tr>
           <td><code>textureSize2D</code></td>
           <td><code>textureSize2D</code></td>
           <td>4096</td>
           <td>4096</td>
-          <td>65536*</td>
+          <td></td>
         </tr>
         </tr>
         <tr>
         <tr>
           <td><code>textureSize3D</code></td>
           <td><code>textureSize3D</code></td>
           <td>256</td>
           <td>256</td>
-          <td>65536*</td>
+          <td></td>
         </tr>
         </tr>
         <tr>
         <tr>
           <td><code>textureSizeCube</code></td>
           <td><code>textureSizeCube</code></td>
           <td>4096</td>
           <td>4096</td>
-          <td>65536*</td>
+          <td></td>
         </tr>
         </tr>
         <tr>
         <tr>
           <td><code>textureLayers</code></td>
           <td><code>textureLayers</code></td>
@@ -185,11 +226,41 @@ return {
         <tr>
         <tr>
           <td><code>renderSize</code></td>
           <td><code>renderSize</code></td>
           <td>{ 4096, 4096, 6 }</td>
           <td>{ 4096, 4096, 6 }</td>
-          <td>{ 65536*, 65536*, 6* }</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><code>uniformBuffersPerStage</code></td>
+          <td>9</td>
+          <td>32*</td>
+        </tr>
+        <tr>
+          <td><code>storageBuffersPerStage</code></td>
+          <td>4</td>
+          <td>32*</td>
+        </tr>
+        <tr>
+          <td><code>sampledTexturesPerStage</code></td>
+          <td>32</td>
+          <td>32*</td>
+        </tr>
+        <tr>
+          <td><code>storageTexturesPerStage</code></td>
+          <td>4</td>
+          <td>32*</td>
+        </tr>
+        <tr>
+          <td><code>samplersPerStage</code></td>
+          <td>15</td>
+          <td>32*</td>
+        </tr>
+        <tr>
+          <td><code>resourcesPerShader</code></td>
+          <td>32</td>
+          <td>32*</td>
         </tr>
         </tr>
         <tr>
         <tr>
           <td><code>uniformBufferRange</code></td>
           <td><code>uniformBufferRange</code></td>
-          <td>16384 (often 65536)</td>
+          <td>65536</td>
           <td></td>
           <td></td>
         </tr>
         </tr>
         <tr>
         <tr>
@@ -215,7 +286,7 @@ return {
         <tr>
         <tr>
           <td><code>vertexBufferStride</code></td>
           <td><code>vertexBufferStride</code></td>
           <td>2048</td>
           <td>2048</td>
-          <td></td>
+          <td>65535*</td>
         </tr>
         </tr>
         <tr>
         <tr>
           <td><code>vertexShaderOutputs</code></td>
           <td><code>vertexShaderOutputs</code></td>
@@ -257,6 +328,11 @@ return {
           <td>16384 (16KB)</td>
           <td>16384 (16KB)</td>
           <td></td>
           <td></td>
         </tr>
         </tr>
+        <tr>
+          <td><code>pushConstantSize</code></td>
+          <td>128</td>
+          <td>256*</td>
+        </tr>
         <tr>
         <tr>
           <td><code>indirectDrawCount</code></td>
           <td><code>indirectDrawCount</code></td>
           <td>1</td>
           <td>1</td>
@@ -280,7 +356,8 @@ return {
       </tbody>
       </tbody>
     </table>
     </table>
 
 
-    Note: in the table above, `*` means that LÖVR itself is imposing a cap on the limit.
+    Note: in the table above, `*` means that LÖVR itself is imposing a cap on the limit, instead of
+    the GPU.
   ]],
   ]],
   related = {
   related = {
     'lovr.graphics.isFormatSupported',
     'lovr.graphics.isFormatSupported',

Some files were not shown because too many files changed in this diff