Mesa (main): gallium: add multi-component 64-bit UINT formats for raw double vertex attribs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 2 20:35:19 UTC 2021
Module: Mesa
Branch: main
Commit: 4a713c568bbf1bbd82d59900007bc71f0f9d5c10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a713c568bbf1bbd82d59900007bc71f0f9d5c10
Author: Marek Olšák <marek.olsak at amd.com>
Date: Mon Jun 14 19:51:11 2021 -0400
gallium: add multi-component 64-bit UINT formats for raw double vertex attribs
This is the distinction between formats:
- PIPE_FORMAT_R64_FLOAT is the legacy "convert-to-float" vertex format.
- PIPE_FORMAT_R64_UINT is the raw double format.
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370>
---
src/gallium/include/pipe/p_format.h | 7 +++++--
src/util/format/u_format.csv | 4 ++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index f2d4be77db9..308cd8f3732 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -41,7 +41,11 @@ extern "C" {
enum pipe_format {
PIPE_FORMAT_NONE,
/* Vertex formats must be first and must be <= 255. */
- PIPE_FORMAT_R64_FLOAT,
+ PIPE_FORMAT_R64_UINT, /**< raw doubles (ARB_vertex_attrib_64bit) */
+ PIPE_FORMAT_R64G64_UINT,
+ PIPE_FORMAT_R64G64B64_UINT,
+ PIPE_FORMAT_R64G64B64A64_UINT,
+ PIPE_FORMAT_R64_FLOAT, /**< doubles converted to float */
PIPE_FORMAT_R64G64_FLOAT,
PIPE_FORMAT_R64G64B64_FLOAT,
PIPE_FORMAT_R64G64B64A64_FLOAT,
@@ -293,7 +297,6 @@ enum pipe_format {
PIPE_FORMAT_R8A8_UNORM,
PIPE_FORMAT_A8R8_UNORM,
- PIPE_FORMAT_R64_UINT,
PIPE_FORMAT_R64_SINT,
PIPE_FORMAT_A8_UINT,
diff --git a/src/util/format/u_format.csv b/src/util/format/u_format.csv
index d7cea4641c4..58d56a63ca9 100644
--- a/src/util/format/u_format.csv
+++ b/src/util/format/u_format.csv
@@ -467,6 +467,10 @@ PIPE_FORMAT_R32G32B32_SINT , plain, 1, 1, 1, sp32, sp32, sp32, , xyz1,
PIPE_FORMAT_R32G32B32A32_SINT , plain, 1, 1, 1, sp32, sp32, sp32, sp32, xyzw, rgb
PIPE_FORMAT_R64_UINT , plain, 1, 1, 1, up64, , , , x001, rgb
+PIPE_FORMAT_R64G64_UINT , plain, 1, 1, 1, up64, up64, , , xy01, rgb
+PIPE_FORMAT_R64G64B64_UINT , plain, 1, 1, 1, up64, up64, up64, , xyz1, rgb
+PIPE_FORMAT_R64G64B64A64_UINT , plain, 1, 1, 1, up64, up64, up64, up64, xyzw, rgb
+
PIPE_FORMAT_R64_SINT , plain, 1, 1, 1, sp64, , , , x001, rgb
PIPE_FORMAT_A8_UINT , plain, 1, 1, 1, up8, , , , 000x, rgb
More information about the mesa-commit
mailing list