vk/0.170.2: Update VkFormatProperties
This commit is contained in:
parent
545f5cc6e1
commit
98c2bb6917
|
@ -851,7 +851,8 @@ typedef enum {
|
||||||
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,
|
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,
|
||||||
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100,
|
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100,
|
||||||
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200,
|
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200,
|
||||||
VK_FORMAT_FEATURE_CONVERSION_BIT = 0x00000400,
|
VK_FORMAT_FEATURE_BLIT_SOURCE_BIT = 0x00000400,
|
||||||
|
VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT = 0x00000800,
|
||||||
} VkFormatFeatureFlagBits;
|
} VkFormatFeatureFlagBits;
|
||||||
typedef VkFlags VkFormatFeatureFlags;
|
typedef VkFlags VkFormatFeatureFlags;
|
||||||
|
|
||||||
|
@ -1199,6 +1200,7 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
VkFormatFeatureFlags linearTilingFeatures;
|
VkFormatFeatureFlags linearTilingFeatures;
|
||||||
VkFormatFeatureFlags optimalTilingFeatures;
|
VkFormatFeatureFlags optimalTilingFeatures;
|
||||||
|
VkFormatFeatureFlags bufferFeatures;
|
||||||
} VkFormatProperties;
|
} VkFormatProperties;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -252,6 +252,7 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
|
||||||
{
|
{
|
||||||
const struct surface_format_info *info;
|
const struct surface_format_info *info;
|
||||||
int gen;
|
int gen;
|
||||||
|
VkFormatFeatureFlags flags;
|
||||||
|
|
||||||
if (format == NULL)
|
if (format == NULL)
|
||||||
return VK_ERROR_INVALID_VALUE;
|
return VK_ERROR_INVALID_VALUE;
|
||||||
|
@ -267,6 +268,10 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
|
||||||
if (anv_format_is_depth_or_stencil(format)) {
|
if (anv_format_is_depth_or_stencil(format)) {
|
||||||
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
|
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
|
||||||
tiled |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT;
|
tiled |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT;
|
||||||
|
tiled |= VK_FORMAT_FEATURE_BLIT_SOURCE_BIT;
|
||||||
|
if (format->depth_format) {
|
||||||
|
tiled |= VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* The surface_formats table only contains color formats */
|
/* The surface_formats table only contains color formats */
|
||||||
info = &surface_formats[format->surface_format];
|
info = &surface_formats[format->surface_format];
|
||||||
|
@ -274,12 +279,16 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
|
||||||
goto unsupported;
|
goto unsupported;
|
||||||
|
|
||||||
if (info->sampling <= gen) {
|
if (info->sampling <= gen) {
|
||||||
linear |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
|
flags = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
|
||||||
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
|
VK_FORMAT_FEATURE_BLIT_SOURCE_BIT;
|
||||||
|
linear |= flags;
|
||||||
|
tiled |= flags;
|
||||||
}
|
}
|
||||||
if (info->render_target <= gen) {
|
if (info->render_target <= gen) {
|
||||||
linear |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT;
|
flags = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
|
||||||
tiled |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT;
|
VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT;
|
||||||
|
linear |= flags;
|
||||||
|
tiled |= flags;
|
||||||
}
|
}
|
||||||
if (info->alpha_blend <= gen) {
|
if (info->alpha_blend <= gen) {
|
||||||
linear |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
|
linear |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
|
||||||
|
@ -292,6 +301,7 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
|
||||||
|
|
||||||
out_properties->linearTilingFeatures = linear;
|
out_properties->linearTilingFeatures = linear;
|
||||||
out_properties->optimalTilingFeatures = tiled;
|
out_properties->optimalTilingFeatures = tiled;
|
||||||
|
out_properties->bufferFeatures = 0; /* FINISHME */
|
||||||
|
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue