lovr.graphics.getLimits
EditReturns limits of the current GPU.
limits = lovr.graphics.getLimits()
Arguments
None
Returns
Name | Type | Description |
limits | table | |
.textureSize2D | number |
The maximum width/height of 2d and array textures.
|
.textureSize3D | number |
The maximum width/height/depth of 3d textures.
|
.textureSizeCube | number |
The maximum width/height of cube textures.
|
.textureLayers | number |
The maximum depth of array textures.
|
.renderSize | table | The maximum width, height, and layer count of a texture (or texture view) used as a render target. |
.uniformBuffersPerStage | number | The maximum number of uniform buffers in a shader stage. |
.storageBuffersPerStage | number | The maximum number of storage buffers in a shader stage. |
.sampledTexturesPerStage | number | The maximum number of sampled textures in a shader stage. |
.storageTexturesPerStage | number | The maximum number of storage textures in a shader stage. |
.samplersPerStage | number | The maximum number of samplers in a shader stage. |
.resourcesPerShader | number | The maximum combined number of buffers, textures, and sampler variables in a Shader. |
.uniformBufferRange | number | The maximum range of bytes that can be bound to a uniform buffer in a shader. |
.storageBufferRange | number | The maximum range of bytes that can be bound to a storage buffer in a shader. |
.uniformBufferAlign | number | When binding a range of bytes to a uniform buffer binding in a shader, the byte offset of the range must be a multiple of this limit's value. |
.storageBufferAlign | number | When binding a range of bytes to a storage buffer binding in a shader, the byte offset of the range must be a multiple of this limit's value. |
.vertexAttributes | number | The maximum number of input attributes in a vertex shader. |
.vertexBufferStride | number | The maximum stride of a buffer used as a vertex buffer, in bytes. |
.vertexShaderOutputs | number | The maximum number of components output from a vertex shader. |
.clipDistances | number | The maximum number of clipping planes declared by a shader. |
.cullDistances | number | The maximum number of cull distances declared by a shader. |
.clipAndCullDistances | number | The maximum number of clipping planes and cull distances declared by a shader. |
.workgroupCount | table |
The maximum values of x , y , and z in Pass:compute .
|
.workgroupSize | table |
The maximum values of local_size_x , local_size_y , and local_size_z declared in a compute shader.
|
.totalWorkgroupSize | number |
The maximum product of local_size_x , local_size_y , and local_size_z in a compute shader.
|
.computeSharedMemory | number |
The maximum number of bytes used by shared variables in compute shaders.
|
.indirectDrawCount | number | The maximum number of draws that can be issued by an indirect draw call. |
.instances | number | The maximum number of instances that can be rendered in a draw call. |
.anisotropy | number |
The maximum value of the anisotropy parameter in lovr.graphics.newSampler .
|
.pointSize | number | The maximum point size. |
Notes
The limit ranges are as follows:
Limit | Minimum | Maximum |
textureSize2D |
4096 | |
textureSize3D |
256 | |
textureSizeCube |
4096 | |
textureLayers |
256 | |
renderSize |
{ 4096, 4096, 6 } | |
uniformBuffersPerStage |
9 | 32* |
storageBuffersPerStage |
4 | 32* |
sampledTexturesPerStage |
32 | 32* |
storageTexturesPerStage |
4 | 32* |
samplersPerStage |
15 | 32* |
resourcesPerShader |
32 | 32* |
uniformBufferRange |
65536 | |
storageBufferRange |
134217728 (128MB) | 1073741824 (1GB)* |
uniformBufferAlign |
256 | |
storageBufferAlign |
64 | |
vertexAttributes |
16 | 16* |
vertexBufferStride |
2048 | 65535* |
vertexShaderOutputs |
64 | |
clipDistances |
0 | |
cullDistances |
0 | |
clipAndCullDistances |
0 | |
computeDispatchCount |
{ 65536, 65536, 65536 } | |
computeWorkgroupSize |
{ 128, 128, 64 } | |
computeWorkgroupVolume |
128 | |
computeSharedMemory |
16384 (16KB) | |
pushConstantSize |
128 | 256* |
indirectDrawCount |
1 | |
instances |
134217727 | |
anisotropy |
0.0 | |
pointSize |
1.0 |
Note: in the table above, *
means that LÖVR itself is imposing a cap on the limit, instead of the GPU.