Browse Source

Mention transfer pass requirements;

bjorn 2 years ago
parent
commit
e43e32d615

+ 5 - 5
api/init.lua

@@ -14179,7 +14179,7 @@ return {
               name = "blit",
               name = "blit",
               tag = "transfer",
               tag = "transfer",
               summary = "Copy data between textures with scaling.",
               summary = "Copy data between textures with scaling.",
-              description = "Copies data between textures.  Similar to `Pass:copy`, except the source and destination sizes can be different.  The pixels from the source texture will be scaled to the destination size.",
+              description = "Copies data between textures.  Similar to `Pass:copy`, except the source and destination sizes can be different.  The pixels from the source texture will be scaled to the destination size. This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`.",
               key = "Pass:blit",
               key = "Pass:blit",
               module = "lovr.graphics",
               module = "lovr.graphics",
               notes = "When blitting between 3D textures, the layer counts do not need to match, and the layers will be treated as a continuous axis (i.e. pixels will be smoothed between layers).\n\nWhen blitting between array textures, the layer counts must match, and the blit occurs as a sequence of distinct 2D blits layer-by-layer.",
               notes = "When blitting between 3D textures, the layer counts do not need to match, and the layers will be treated as a continuous axis (i.e. pixels will be smoothed between layers).\n\nWhen blitting between array textures, the layer counts must match, and the blit occurs as a sequence of distinct 2D blits layer-by-layer.",
@@ -14424,7 +14424,7 @@ return {
               name = "clear",
               name = "clear",
               tag = "transfer",
               tag = "transfer",
               summary = "Clear a Buffer or Texture.",
               summary = "Clear a Buffer or Texture.",
-              description = "Clears a Buffer or Texture.",
+              description = "Clears a Buffer or Texture.  This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`.",
               key = "Pass:clear",
               key = "Pass:clear",
               module = "lovr.graphics",
               module = "lovr.graphics",
               related = {
               related = {
@@ -14585,7 +14585,7 @@ return {
               name = "copy",
               name = "copy",
               tag = "transfer",
               tag = "transfer",
               summary = "Copy data to or between GPU resources.",
               summary = "Copy data to or between GPU resources.",
-              description = "Copies data to or between `Buffer` and `Texture` objects.  This function must be called on a `transfer` pass.",
+              description = "Copies data to or between `Buffer` and `Texture` objects.  This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`.",
               key = "Pass:copy",
               key = "Pass:copy",
               module = "lovr.graphics",
               module = "lovr.graphics",
               variants = {
               variants = {
@@ -15727,7 +15727,7 @@ return {
               name = "mipmap",
               name = "mipmap",
               tag = "transfer",
               tag = "transfer",
               summary = "Generate mipmaps for a texture.",
               summary = "Generate mipmaps for a texture.",
-              description = "Generates mipmaps for a texture.",
+              description = "Generates mipmaps for a texture.  This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`.\n\nWhen rendering to textures with a render pass, it's also possible to automatically regenerate mipmaps after rendering by adding the `mipmaps` flag when creating the pass.",
               key = "Pass:mipmap",
               key = "Pass:mipmap",
               module = "lovr.graphics",
               module = "lovr.graphics",
               variants = {
               variants = {
@@ -15932,7 +15932,7 @@ return {
               name = "read",
               name = "read",
               tag = "transfer",
               tag = "transfer",
               summary = "Download data from a GPU resource.",
               summary = "Download data from a GPU resource.",
-              description = "Creates a `Readback` object which asynchronously downloads data from a `Buffer`, `Texture`, or `Tally`.  The readback can be polled for completion, or, after this transfer pass is completed, `Readback:wait` can be used to block until the download is complete.",
+              description = "Creates a `Readback` object which asynchronously downloads data from a `Buffer`, `Texture`, or `Tally`.  The readback can be polled for completion, or, after this transfer pass is submitted, `Readback:wait` can be used to block until the download is complete.  This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`.",
               key = "Pass:read",
               key = "Pass:read",
               module = "lovr.graphics",
               module = "lovr.graphics",
               variants = {
               variants = {

+ 1 - 0
api/lovr/graphics/Pass/blit.lua

@@ -4,6 +4,7 @@ return {
   description = [[
   description = [[
     Copies data between textures.  Similar to `Pass:copy`, except the source and destination sizes
     Copies data between textures.  Similar to `Pass:copy`, except the source and destination sizes
     can be different.  The pixels from the source texture will be scaled to the destination size.
     can be different.  The pixels from the source texture will be scaled to the destination size.
+    This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`.
   ]],
   ]],
   arguments = {
   arguments = {
     src = {
     src = {

+ 4 - 1
api/lovr/graphics/Pass/clear.lua

@@ -1,7 +1,10 @@
 return {
 return {
   tag = 'transfer',
   tag = 'transfer',
   summary = 'Clear a Buffer or Texture.',
   summary = 'Clear a Buffer or Texture.',
-  description = 'Clears a Buffer or Texture.',
+  description = [[
+    Clears a Buffer or Texture.  This can only be called on a transfer pass, which can be created
+    with `lovr.graphics.getPass`.
+  ]],
   arguments = {
   arguments = {
     buffer = {
     buffer = {
       type = 'Buffer',
       type = 'Buffer',

+ 2 - 2
api/lovr/graphics/Pass/copy.lua

@@ -2,8 +2,8 @@ return {
   tag = 'transfer',
   tag = 'transfer',
   summary = 'Copy data to or between GPU resources.',
   summary = 'Copy data to or between GPU resources.',
   description = [[
   description = [[
-    Copies data to or between `Buffer` and `Texture` objects.  This function must be called on a
-    `transfer` pass.
+    Copies data to or between `Buffer` and `Texture` objects.  This can only be called on a transfer
+    pass, which can be created with `lovr.graphics.getPass`.
   ]],
   ]],
   arguments = {
   arguments = {
     table = {
     table = {

+ 7 - 1
api/lovr/graphics/Pass/mipmap.lua

@@ -1,7 +1,13 @@
 return {
 return {
   tag = 'transfer',
   tag = 'transfer',
   summary = 'Generate mipmaps for a texture.',
   summary = 'Generate mipmaps for a texture.',
-  description = 'Generates mipmaps for a texture.',
+  description = [[
+    Generates mipmaps for a texture.  This can only be called on a transfer pass, which can be
+    created with `lovr.graphics.getPass`.
+
+    When rendering to textures with a render pass, it's also possible to automatically regenerate
+    mipmaps after rendering by adding the `mipmaps` flag when creating the pass.
+  ]],
   arguments = {
   arguments = {
     texture = {
     texture = {
       type = 'Texture',
       type = 'Texture',

+ 3 - 2
api/lovr/graphics/Pass/read.lua

@@ -3,8 +3,9 @@ return {
   summary = 'Download data from a GPU resource.',
   summary = 'Download data from a GPU resource.',
   description = [[
   description = [[
     Creates a `Readback` object which asynchronously downloads data from a `Buffer`, `Texture`, or
     Creates a `Readback` object which asynchronously downloads data from a `Buffer`, `Texture`, or
-    `Tally`.  The readback can be polled for completion, or, after this transfer pass is completed,
-    `Readback:wait` can be used to block until the download is complete.
+    `Tally`.  The readback can be polled for completion, or, after this transfer pass is submitted,
+    `Readback:wait` can be used to block until the download is complete.  This can only be called on
+    a transfer pass, which can be created with `lovr.graphics.getPass`.
   ]],
   ]],
   arguments = {
   arguments = {
     buffer = {
     buffer = {