diff options
author | Nanley Chery <[email protected]> | 2015-09-28 17:42:39 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2015-11-09 15:41:41 -0800 |
commit | 7b4244dea02c38c194def5ff05636e09124cd6b7 (patch) | |
tree | a00052c42cc865423e5a15d05ef8e936d2a8bdfa /src/vulkan | |
parent | a6c7d1e016545c05b64bacf4dd87a354a6c9cd58 (diff) |
anv/formats: Add fields for block dimensions
A non-compressed texture is a 1x1x1 block. Compressed
textures could have values which vary in different
dimensions WxHxD.
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/anv_formats.c | 2 | ||||
-rw-r--r-- | src/vulkan/anv_private.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vulkan/anv_formats.c b/src/vulkan/anv_formats.c index 5631bea10e3..b588465e00e 100644 --- a/src/vulkan/anv_formats.c +++ b/src/vulkan/anv_formats.c @@ -27,7 +27,7 @@ #define UNSUPPORTED 0xffff #define fmt(__vk_fmt, __hw_fmt, ...) \ - [__vk_fmt] = { .vk_format = __vk_fmt, .name = #__vk_fmt, .surface_format = __hw_fmt, __VA_ARGS__ } + [__vk_fmt] = { .vk_format = __vk_fmt, .name = #__vk_fmt, .surface_format = __hw_fmt, .bw = 1, .bh = 1, .bd = 1, __VA_ARGS__ } static const struct anv_format anv_formats[] = { fmt(VK_FORMAT_UNDEFINED, RAW, .bs = 1, .num_channels = 1), diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 03d033ff0c5..8a8fe8d04a4 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -1208,6 +1208,9 @@ struct anv_format { const char *name; uint16_t surface_format; /**< RENDER_SURFACE_STATE.SurfaceFormat */ uint8_t bs; /**< Block size (in bytes) of anv_format::surface_format. */ + uint8_t bw; /**< Block width of anv_format::surface_format. */ + uint8_t bh; /**< Block height of anv_format::surface_format. */ + uint8_t bd; /**< Block depth of anv_format::surface_format. */ uint8_t num_channels; uint16_t depth_format; /**< 3DSTATE_DEPTH_BUFFER.SurfaceFormat */ bool has_stencil; |