Mesa (master): iris: Update comment about 3-component formats and buffer textures
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 8 06:12:07 UTC 2019
Module: Mesa
Branch: master
Commit: 016c19bc895ffaa85954aa864a9de969261f9922
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=016c19bc895ffaa85954aa864a9de969261f9922
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Oct 7 16:03:14 2019 -0700
iris: Update comment about 3-component formats and buffer textures
You can't render to PIPE_BUFFER so there's no reason to prefer RGBX.
PBO upload would like to use proper RGB textures as source data.
---
src/gallium/drivers/iris/iris_formats.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_formats.c b/src/gallium/drivers/iris/iris_formats.c
index 9daef41407a..94b89be84e0 100644
--- a/src/gallium/drivers/iris/iris_formats.c
+++ b/src/gallium/drivers/iris/iris_formats.c
@@ -479,12 +479,14 @@ iris_is_format_supported(struct pipe_screen *pscreen,
if (!is_integer)
supported &= isl_format_supports_filtering(devinfo, format);
- /* Don't advertise 3-component RGB formats. This ensures that they
- * are renderable from an API perspective since the state tracker will
- * fall back to RGBA or RGBX, which are renderable. We want to render
- * internally for copies and blits, even if the application doesn't.
+ /* Don't advertise 3-component RGB formats for non-buffer textures.
+ * This ensures that they are renderable from an API perspective since
+ * the state tracker will fall back to RGBA or RGBX, which are
+ * renderable. We want to render internally for copies and blits,
+ * even if the application doesn't.
*
- * We do need to advertise 32-bit RGB for texture buffers though.
+ * Buffer textures don't need to be renderable, so we support real RGB.
+ * This is useful for PBO upload, and 32-bit RGB support is mandatory.
*/
if (target != PIPE_BUFFER)
supported &= fmtl->bpb != 24 && fmtl->bpb != 48 && fmtl->bpb != 96;
More information about the mesa-commit
mailing list