renderer_vulkan: Fix some missing view formats
* Many times the format itself wouldn't have been added to the list causing device losses for nvidia GPUs * Also account for ASTC acceleration storage views
This commit is contained in:
parent
95cefaf993
commit
272916eeaf
|
@ -272,6 +272,9 @@ constexpr Table MakeNonNativeBgrCopyTable() {
|
||||||
|
|
||||||
bool IsViewCompatible(PixelFormat format_a, PixelFormat format_b, bool broken_views,
|
bool IsViewCompatible(PixelFormat format_a, PixelFormat format_b, bool broken_views,
|
||||||
bool native_bgr) {
|
bool native_bgr) {
|
||||||
|
if (format_a == format_b) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (broken_views) {
|
if (broken_views) {
|
||||||
// If format views are broken, only accept formats that are identical.
|
// If format views are broken, only accept formats that are identical.
|
||||||
return format_a == format_b;
|
return format_a == format_b;
|
||||||
|
@ -282,6 +285,9 @@ bool IsViewCompatible(PixelFormat format_a, PixelFormat format_b, bool broken_vi
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsCopyCompatible(PixelFormat format_a, PixelFormat format_b, bool native_bgr) {
|
bool IsCopyCompatible(PixelFormat format_a, PixelFormat format_b, bool native_bgr) {
|
||||||
|
if (format_a == format_b) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
static constexpr Table BGR_TABLE = MakeNativeBgrCopyTable();
|
static constexpr Table BGR_TABLE = MakeNativeBgrCopyTable();
|
||||||
static constexpr Table NO_BGR_TABLE = MakeNonNativeBgrCopyTable();
|
static constexpr Table NO_BGR_TABLE = MakeNonNativeBgrCopyTable();
|
||||||
return IsSupported(native_bgr ? BGR_TABLE : NO_BGR_TABLE, format_a, format_b);
|
return IsSupported(native_bgr ? BGR_TABLE : NO_BGR_TABLE, format_a, format_b);
|
||||||
|
|
|
@ -826,9 +826,8 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& sched
|
||||||
}
|
}
|
||||||
for (size_t index_a = 0; index_a < VideoCore::Surface::MaxPixelFormat; index_a++) {
|
for (size_t index_a = 0; index_a < VideoCore::Surface::MaxPixelFormat; index_a++) {
|
||||||
const auto image_format = static_cast<PixelFormat>(index_a);
|
const auto image_format = static_cast<PixelFormat>(index_a);
|
||||||
const auto type_a = VideoCore::Surface::GetFormatType(image_format);
|
if (IsPixelFormatASTC(image_format) && !device.IsOptimalAstcSupported()) {
|
||||||
if (type_a != SurfaceType::ColorTexture) {
|
view_formats[index_a].push_back(VK_FORMAT_A8B8G8R8_UNORM_PACK32);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
for (size_t index_b = 0; index_b < VideoCore::Surface::MaxPixelFormat; index_b++) {
|
for (size_t index_b = 0; index_b < VideoCore::Surface::MaxPixelFormat; index_b++) {
|
||||||
const auto view_format = static_cast<PixelFormat>(index_b);
|
const auto view_format = static_cast<PixelFormat>(index_b);
|
||||||
|
|
Loading…
Reference in a new issue