mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 05:20:09 +01:00
zink: revert compression control handling
I misunderstood how this works, and there is no general format-query, which may mean the current gallium interface is unimplementable This reverts commit735e402ae4. This reverts commit9696df4132. This reverts commit33c1b940e0. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31444>
This commit is contained in:
parent
4ae273dcf4
commit
83495533b0
6 changed files with 0 additions and 87 deletions
|
|
@ -98,8 +98,6 @@ EXTENSIONS = [
|
|||
Extension("VK_EXT_queue_family_foreign"),
|
||||
Extension("VK_KHR_swapchain_mutable_format"),
|
||||
Extension("VK_KHR_incremental_present"),
|
||||
Extension("VK_EXT_image_compression_control", alias="compctrl", features=True),
|
||||
Extension("VK_EXT_image_compression_control_swapchain", alias="swapchaincompctrl", features=True),
|
||||
Extension("VK_EXT_provoking_vertex",
|
||||
alias="pv",
|
||||
features=True,
|
||||
|
|
|
|||
|
|
@ -292,20 +292,6 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget *
|
|||
if (cdt->formats[1])
|
||||
cswap->scci.pNext = &cdt->format_list;
|
||||
|
||||
cswap->comp.pFixedRateFlags = &cswap->comp_rate;
|
||||
cswap->comp.sType = VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT;
|
||||
cswap->comp.pNext = cswap->scci.pNext;
|
||||
cswap->comp.compressionControlPlaneCount = 0;
|
||||
if (cdt->info.compression) {
|
||||
if (cdt->info.compression == UINT32_MAX) {
|
||||
cswap->comp.flags = VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT;
|
||||
} else {
|
||||
cswap->comp.flags = VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT;
|
||||
cswap->comp_rate = cdt->info.compression;
|
||||
}
|
||||
cswap->scci.pNext = &cswap->comp;
|
||||
}
|
||||
|
||||
/* different display platforms have, by vulkan spec, different sizing methodologies */
|
||||
switch (cdt->type) {
|
||||
case KOPPER_X11:
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@ struct kopper_swapchain {
|
|||
uint32_t last_present_prune;
|
||||
struct hash_table *presents;
|
||||
VkSwapchainCreateInfoKHR scci;
|
||||
VkImageCompressionFixedRateFlagsEXT comp_rate;
|
||||
VkImageCompressionControlEXT comp;
|
||||
unsigned num_acquires;
|
||||
unsigned max_acquires;
|
||||
unsigned async_presents;
|
||||
|
|
|
|||
|
|
@ -1279,23 +1279,6 @@ create_image(struct zink_screen *screen, struct zink_resource_object *obj,
|
|||
} else {
|
||||
ici.pNext = NULL;
|
||||
}
|
||||
VkImageCompressionFixedRateFlagsEXT rate = 0;
|
||||
VkImageCompressionControlEXT compression = {
|
||||
VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT,
|
||||
ici.pNext,
|
||||
0,
|
||||
1,
|
||||
&rate
|
||||
};
|
||||
if (templ->compression_rate != PIPE_COMPRESSION_FIXED_RATE_NONE) {
|
||||
if (templ->compression_rate == PIPE_COMPRESSION_FIXED_RATE_DEFAULT) {
|
||||
compression.flags = VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT;
|
||||
} else {
|
||||
compression.flags = VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT;
|
||||
rate = BITFIELD_BIT(templ->compression_rate - 1);
|
||||
}
|
||||
ici.pNext = &compression;
|
||||
}
|
||||
init_ici(screen, &ici, templ, templ->bind, ici_modifier_count);
|
||||
|
||||
bool success = false;
|
||||
|
|
|
|||
|
|
@ -2029,36 +2029,6 @@ check_have_device_time(struct zink_screen *screen)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
zink_query_compression_rates(struct pipe_screen *pscreen, enum pipe_format pformat, int max, uint32_t *rates, int *count)
|
||||
{
|
||||
struct zink_screen *screen = zink_screen(pscreen);
|
||||
|
||||
if (!screen->format_props[pformat].compressionRates) {
|
||||
*count = 1;
|
||||
if (max)
|
||||
*rates = PIPE_COMPRESSION_FIXED_RATE_NONE;
|
||||
return;
|
||||
}
|
||||
if (screen->format_props[pformat].compressionRates == UINT32_MAX) {
|
||||
*count = 1;
|
||||
if (max)
|
||||
*rates = PIPE_COMPRESSION_FIXED_RATE_DEFAULT;
|
||||
return;
|
||||
}
|
||||
|
||||
*count = util_bitcount(screen->format_props[pformat].compressionRates);
|
||||
if (!max)
|
||||
return;
|
||||
|
||||
unsigned c = 0;
|
||||
u_foreach_bit(r, screen->format_props[pformat].compressionRates) {
|
||||
rates[c] = r + 1;
|
||||
if (++c == max)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
zink_error(const char *msg)
|
||||
{
|
||||
|
|
@ -2192,14 +2162,6 @@ retry:
|
|||
mod_props.pDrmFormatModifierProperties = mods;
|
||||
props.pNext = &mod_props;
|
||||
}
|
||||
VkImageCompressionPropertiesEXT comp;
|
||||
if (screen->info.have_EXT_image_compression_control) {
|
||||
comp.sType = VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT;
|
||||
comp.pNext = props.pNext;
|
||||
comp.imageCompressionFlags = 0;
|
||||
comp.imageCompressionFixedRateFlags = 0;
|
||||
props.pNext = ∁
|
||||
}
|
||||
VkFormatProperties3 props3 = {0};
|
||||
if (screen->info.have_KHR_format_feature_flags2 || screen->info.have_vulkan13) {
|
||||
props3.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3;
|
||||
|
|
@ -2223,17 +2185,6 @@ retry:
|
|||
screen->format_props[pformat].bufferFeatures = props.formatProperties.bufferFeatures;
|
||||
}
|
||||
|
||||
if (screen->info.have_EXT_image_compression_control) {
|
||||
switch (comp.imageCompressionFlags) {
|
||||
case VK_IMAGE_COMPRESSION_DISABLED_EXT:
|
||||
screen->format_props[pformat].compressionRates = 0;
|
||||
break;
|
||||
default:
|
||||
screen->format_props[pformat].compressionRates = comp.imageCompressionFixedRateFlags;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (screen->info.have_EXT_image_drm_format_modifier && mod_props.drmFormatModifierCount) {
|
||||
screen->modifier_props[pformat].drmFormatModifierCount = mod_props.drmFormatModifierCount;
|
||||
screen->modifier_props[pformat].pDrmFormatModifierProperties = ralloc_array(screen, VkDrmFormatModifierPropertiesEXT, mod_props.drmFormatModifierCount);
|
||||
|
|
@ -3611,8 +3562,6 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
|||
}
|
||||
}
|
||||
}
|
||||
if (screen->info.have_EXT_image_compression_control && screen->info.have_EXT_image_compression_control_swapchain)
|
||||
screen->base.query_compression_rates = zink_query_compression_rates;
|
||||
|
||||
if (!zink_screen_resource_init(&screen->base))
|
||||
goto fail;
|
||||
|
|
|
|||
|
|
@ -1379,7 +1379,6 @@ struct zink_format_props {
|
|||
VkFormatFeatureFlags2 linearTilingFeatures;
|
||||
VkFormatFeatureFlags2 optimalTilingFeatures;
|
||||
VkFormatFeatureFlags2 bufferFeatures;
|
||||
VkImageCompressionFixedRateFlagsEXT compressionRates;
|
||||
};
|
||||
|
||||
struct zink_screen {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue