summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2018-01-09 16:02:44 -0800
committerEric Anholt <eric@anholt.net>2018-01-12 21:56:17 -0800
commit725d73981a338e967a2c83499e98081e95097fb3 (patch)
tree1e590ef33d10704a159de635b0cba727069192ec /src
parent66f2f3ed97c4225e4d290f4b4401e74ccd33313c (diff)
broadcom/vc5: Set up depth formats for V3D 4.x.
We no longer have the small depth-specific output format enum, and instead depth is just at the end of the output image format enum.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/vc5/v3dx_format_table.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc5/v3dx_format_table.c b/src/gallium/drivers/vc5/v3dx_format_table.c
index 6282bf9fbb..6d198a225f 100644
--- a/src/gallium/drivers/vc5/v3dx_format_table.c
+++ b/src/gallium/drivers/vc5/v3dx_format_table.c
@@ -24,7 +24,7 @@
#include "util/u_format.h"
#include "vc5_context.h"
-#include "broadcom/cle/v3d_packet_v33_pack.h"
+#include "broadcom/cle/v3dx_pack.h"
#include "broadcom/common/v3d_macros.h"
#include "vc5_format_table.h"
@@ -143,6 +143,16 @@ static const struct vc5_format format_table[] = {
FORMAT(R11G11B10_FLOAT, R11F_G11F_B10F, R11F_G11F_B10F, SWIZ_XYZW, 16, 0),
FORMAT(R9G9B9E5_FLOAT, NO, RGB9_E5, SWIZ_XYZW, 16, 0),
+#if V3D_VERSION >= 40
+ FORMAT(S8_UINT_Z24_UNORM, D24S8, DEPTH24_X8, SWIZ_XXXX, 32, 1),
+ FORMAT(X8Z24_UNORM, D24S8, DEPTH24_X8, SWIZ_XXXX, 32, 1),
+ FORMAT(S8X24_UINT, S8, R32F, SWIZ_XXXX, 32, 1),
+ FORMAT(Z32_FLOAT, D32F, R32F, SWIZ_XXXX, 32, 1),
+ FORMAT(Z16_UNORM, D16, DEPTH_COMP16,SWIZ_XXXX, 32, 1),
+
+ /* Pretend we support this, but it'll be separate Z32F depth and S8. */
+ FORMAT(Z32_FLOAT_S8X24_UINT, D32F, R32F, SWIZ_XXXX, 32, 1),
+#else
FORMAT(S8_UINT_Z24_UNORM, ZS_DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_XXXX, 32, 1),
FORMAT(X8Z24_UNORM, ZS_DEPTH24_STENCIL8, DEPTH24_X8, SWIZ_XXXX, 32, 1),
FORMAT(S8X24_UINT, NO, R32F, SWIZ_XXXX, 32, 1),
@@ -151,6 +161,7 @@ static const struct vc5_format format_table[] = {
/* Pretend we support this, but it'll be separate Z32F depth and S8. */
FORMAT(Z32_FLOAT_S8X24_UINT, ZS_DEPTH_COMPONENT32F, R32F, SWIZ_XXXX, 32, 1),
+#endif
FORMAT(ETC2_RGB8, NO, RGB8_ETC2, SWIZ_XYZ1, 16, 0),
FORMAT(ETC2_SRGB8, NO, RGB8_ETC2, SWIZ_XYZ1, 16, 0),