mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
renderer: broaden compatibility
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
#include "graphics/guest_gpu/hardwareContext.h"
|
#include "graphics/guest_gpu/hardwareContext.h"
|
||||||
#include "graphics/guest_gpu/tile.h"
|
#include "graphics/guest_gpu/tile.h"
|
||||||
#include "graphics/host_gpu/graphicContext.h"
|
#include "graphics/host_gpu/graphicContext.h"
|
||||||
#include "graphics/host_gpu/renderer/image/textureCommon.h"
|
|
||||||
#include "graphics/host_gpu/renderer/debug.h"
|
#include "graphics/host_gpu/renderer/debug.h"
|
||||||
|
#include "graphics/host_gpu/renderer/image/textureCommon.h"
|
||||||
#include "graphics/host_gpu/renderer/pipeline/descriptorCache.h"
|
#include "graphics/host_gpu/renderer/pipeline/descriptorCache.h"
|
||||||
#include "graphics/host_gpu/renderer/render.h"
|
#include "graphics/host_gpu/renderer/render.h"
|
||||||
#include "graphics/host_gpu/renderer/renderContext.h"
|
#include "graphics/host_gpu/renderer/renderContext.h"
|
||||||
@@ -79,10 +79,8 @@ void RenderExecutor::ResolveRenderColorTarget(uint64_t submit_id, RenderCommandB
|
|||||||
const auto view = ResolveTargetViewInfo(
|
const auto view = ResolveTargetViewInfo(
|
||||||
rt.view.base_array_slice_index, rt.view.last_array_slice_index, render_target_slice_offset);
|
rt.view.base_array_slice_index, rt.view.last_array_slice_index, render_target_slice_offset);
|
||||||
switch (view.type) {
|
switch (view.type) {
|
||||||
case TargetViewType::Image2D: break;
|
case TargetViewType::Image2D:
|
||||||
case TargetViewType::Image2DArray:
|
case TargetViewType::Image2DArray: break;
|
||||||
EXIT("layered render-target views are unsupported: base=%u count=%u\n", view.base_layer,
|
|
||||||
view.layer_count);
|
|
||||||
case TargetViewType::Unsupported:
|
case TargetViewType::Unsupported:
|
||||||
EXIT("invalid render-target view: base=%u last=%u draw_offset=%u\n",
|
EXIT("invalid render-target view: base=%u last=%u draw_offset=%u\n",
|
||||||
rt.view.base_array_slice_index, rt.view.last_array_slice_index,
|
rt.view.base_array_slice_index, rt.view.last_array_slice_index,
|
||||||
|
|||||||
@@ -548,14 +548,6 @@ static void ZCheck(const HW::DepthRenderTarget& z) {
|
|||||||
EXIT_NOT_IMPLEMENTED(z.htile_surface.prefetch_height != 0x00000000);
|
EXIT_NOT_IMPLEMENTED(z.htile_surface.prefetch_height != 0x00000000);
|
||||||
EXIT_NOT_IMPLEMENTED(z.htile_surface.dst_outside_zero_to_one != 0x00000000);
|
EXIT_NOT_IMPLEMENTED(z.htile_surface.dst_outside_zero_to_one != 0x00000000);
|
||||||
|
|
||||||
if (z.depth_view.slice_start != 0x00000000 || z.depth_view.slice_max != 0x00000000) {
|
|
||||||
static std::atomic<uint32_t> log_count {0};
|
|
||||||
if (log_count.fetch_add(1, std::memory_order_relaxed) < 16) {
|
|
||||||
LOGF("DepthTarget: temporary: ignoring PS5 array slice view start=0x%08" PRIx32
|
|
||||||
", max=0x%08" PRIx32 "\n",
|
|
||||||
z.depth_view.slice_start, z.depth_view.slice_max);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (z.depth_view.current_mip_level != 0x00000000) {
|
if (z.depth_view.current_mip_level != 0x00000000) {
|
||||||
static std::atomic<uint32_t> log_count {0};
|
static std::atomic<uint32_t> log_count {0};
|
||||||
if (log_count.fetch_add(1, std::memory_order_relaxed) < 16) {
|
if (log_count.fetch_add(1, std::memory_order_relaxed) < 16) {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
#include "graphics/guest_gpu/hardwareContext.h"
|
#include "graphics/guest_gpu/hardwareContext.h"
|
||||||
#include "graphics/guest_gpu/tile.h"
|
#include "graphics/guest_gpu/tile.h"
|
||||||
#include "graphics/host_gpu/graphicContext.h"
|
#include "graphics/host_gpu/graphicContext.h"
|
||||||
#include "graphics/host_gpu/renderer/image/textureCommon.h"
|
|
||||||
#include "graphics/host_gpu/renderer/debug.h"
|
#include "graphics/host_gpu/renderer/debug.h"
|
||||||
#include "graphics/host_gpu/renderer/pipeline/descriptorCache.h"
|
|
||||||
#include "graphics/host_gpu/renderer/image/imageView.h"
|
#include "graphics/host_gpu/renderer/image/imageView.h"
|
||||||
|
#include "graphics/host_gpu/renderer/image/textureCommon.h"
|
||||||
|
#include "graphics/host_gpu/renderer/pipeline/descriptorCache.h"
|
||||||
#include "graphics/host_gpu/renderer/render.h"
|
#include "graphics/host_gpu/renderer/render.h"
|
||||||
#include "graphics/host_gpu/renderer/renderContext.h"
|
#include "graphics/host_gpu/renderer/renderContext.h"
|
||||||
#include "graphics/host_gpu/vulkanCommon.h"
|
#include "graphics/host_gpu/vulkanCommon.h"
|
||||||
@@ -150,10 +150,8 @@ void RenderExecutor::ResolveRenderDepthTarget(uint64_t submit_id, RenderCommandB
|
|||||||
has_stencil, has_htile, z.stencil_info.htile_stencil_disabled);
|
has_stencil, has_htile, z.stencil_info.htile_stencil_disabled);
|
||||||
const auto view = ResolveTargetViewInfo(z.depth_view.slice_start, z.depth_view.slice_max);
|
const auto view = ResolveTargetViewInfo(z.depth_view.slice_start, z.depth_view.slice_max);
|
||||||
switch (view.type) {
|
switch (view.type) {
|
||||||
case TargetViewType::Image2D: break;
|
case TargetViewType::Image2D:
|
||||||
case TargetViewType::Image2DArray:
|
case TargetViewType::Image2DArray: break;
|
||||||
DepthFatal("layered depth views are unsupported: base=%u count=%u", view.base_layer,
|
|
||||||
view.layer_count);
|
|
||||||
case TargetViewType::Unsupported:
|
case TargetViewType::Unsupported:
|
||||||
DepthFatal("invalid depth view: base=%u last=%u", z.depth_view.slice_start,
|
DepthFatal("invalid depth view: base=%u last=%u", z.depth_view.slice_start,
|
||||||
z.depth_view.slice_max);
|
z.depth_view.slice_max);
|
||||||
|
|||||||
@@ -213,19 +213,21 @@ bool IsSupportedDepthTargetDescriptor(const ShaderTextureResource& descriptor, c
|
|||||||
const auto height = static_cast<uint32_t>(descriptor.Height5()) + 1u;
|
const auto height = static_cast<uint32_t>(descriptor.Height5()) + 1u;
|
||||||
const auto pitch = TileGetTexturePitch(descriptor.Format(), width, 1, descriptor.TileMode());
|
const auto pitch = TileGetTexturePitch(descriptor.Format(), width, 1, descriptor.TileMode());
|
||||||
const auto type = static_cast<Prospero::ImageType>(descriptor.Type());
|
const auto type = static_cast<Prospero::ImageType>(descriptor.Type());
|
||||||
const bool supported_single_layer =
|
const bool supported_2d = type == Prospero::ImageType::kColor2D &&
|
||||||
image.info.resources.layers == 1 && descriptor.Depth() == 0 &&
|
image.info.resources.layers == 1 && descriptor.Depth() == 0 &&
|
||||||
descriptor.BaseArray5() == 0 &&
|
descriptor.BaseArray5() == 0;
|
||||||
(type == Prospero::ImageType::kColor2D || type == Prospero::ImageType::kColor2DArray);
|
const bool supported_array = type == Prospero::ImageType::kColor2DArray &&
|
||||||
|
descriptor.BaseArray5() <= descriptor.Depth() &&
|
||||||
|
descriptor.Depth() < image.info.resources.layers;
|
||||||
const bool supported_cube =
|
const bool supported_cube =
|
||||||
type == Prospero::ImageType::kCube && width == height && image.info.resources.layers >= 6 &&
|
type == Prospero::ImageType::kCube && width == height && image.info.resources.layers >= 6 &&
|
||||||
image.info.resources.layers % 6u == 0 &&
|
image.info.resources.layers % 6u == 0 &&
|
||||||
static_cast<uint32_t>(descriptor.Depth()) + 1u == image.info.resources.layers &&
|
static_cast<uint32_t>(descriptor.Depth()) + 1u == image.info.resources.layers &&
|
||||||
descriptor.BaseArray5() == 0;
|
descriptor.BaseArray5() == 0;
|
||||||
return image.info.IsDepth() && width == image.info.extent.width &&
|
return image.info.IsDepth() && width == image.info.extent.width &&
|
||||||
height == image.info.extent.height && (supported_single_layer || supported_cube) &&
|
height == image.info.extent.height &&
|
||||||
descriptor.BaseLevel() == 0 && descriptor.LastLevel() == 0 && descriptor.MaxMip() == 0 &&
|
(supported_2d || supported_array || supported_cube) && descriptor.BaseLevel() == 0 &&
|
||||||
descriptor.MinLod() == 0 && descriptor.BaseArray5() == 0 &&
|
descriptor.LastLevel() == 0 && descriptor.MaxMip() == 0 && descriptor.MinLod() == 0 &&
|
||||||
descriptor.TileMode() == Prospero::GpuEnumValue(Prospero::TileMode::kDepth) &&
|
descriptor.TileMode() == Prospero::GpuEnumValue(Prospero::TileMode::kDepth) &&
|
||||||
descriptor.BCSwizzle() == 0 && !descriptor.MsaaDepth() && pitch >= width &&
|
descriptor.BCSwizzle() == 0 && !descriptor.MsaaDepth() && pitch >= width &&
|
||||||
pitch == image.info.pitch;
|
pitch == image.info.pitch;
|
||||||
|
|||||||
Reference in New Issue
Block a user