From 4a713c568bbf1bbd82d59900007bc71f0f9d5c10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 14 Jun 2021 19:51:11 -0400 Subject: [PATCH] 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 Part-of: --- 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 f2d4be7..308cd8f 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 d7cea46..58d56a6 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 -- 2.7.4