diff --git a/src/graphics/host_gpu/renderer/colorRenderTarget.cpp b/src/graphics/host_gpu/renderer/colorRenderTarget.cpp index 833c83c73..d886a8e63 100644 --- a/src/graphics/host_gpu/renderer/colorRenderTarget.cpp +++ b/src/graphics/host_gpu/renderer/colorRenderTarget.cpp @@ -1,3 +1,5 @@ +#include "graphics/host_gpu/renderer/colorRenderTarget.h" + #include "common/assert.h" #include "common/common.h" #include "common/logging/log.h" @@ -10,10 +12,10 @@ #include "graphics/host_gpu/graphicContext.h" #include "graphics/host_gpu/objects/textureCommon.h" #include "graphics/host_gpu/renderer/descriptorCache.h" +#include "graphics/host_gpu/renderer/debug.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/host_gpu/utils.h" #include "graphics/presentation/displayBuffer.h" diff --git a/src/graphics/host_gpu/renderer/colorRenderTarget.h b/src/graphics/host_gpu/renderer/colorRenderTarget.h new file mode 100644 index 000000000..1ffe056e7 --- /dev/null +++ b/src/graphics/host_gpu/renderer/colorRenderTarget.h @@ -0,0 +1,50 @@ +#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_COLORRENDERTARGET_H_ +#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_COLORRENDERTARGET_H_ + +#include "graphics/guest_gpu/gpu_defs.h" +#include "graphics/host_gpu/renderer/renderTarget.h" + +#include +#include + +namespace Libs::Graphics { + +class CommandBuffer; +struct VulkanImage; + +namespace HW { +class Context; +} // namespace HW + +enum class RenderColorType { + NoColorOutput, + DisplayBuffer, + RenderTexture, +}; + +struct RenderColorInfo { + RenderColorType type = RenderColorType::NoColorOutput; + VulkanImage* vulkan_buffer = nullptr; + VkImageView vulkan_view = nullptr; + VkFormat format = VK_FORMAT_UNDEFINED; + VkExtent2D extent = {}; + uint32_t base_mip_level = 0; + uint32_t base_array_layer = 0; + uint64_t base_addr = 0; + uint64_t buffer_size = 0; + uint32_t target_slot = 0; + Prospero::ColorComponentMapping export_mapping; + bool color_clear_enable = false; + VkClearColorValue color_clear_value {}; +}; + +void ResolveRenderColorTarget(uint64_t submit_id, CommandBuffer* buffer, const HW::Context& hw, + RenderColorInfo* r, uint32_t render_target_slice_offset = 0, + uint32_t render_target_slot = UINT32_MAX, + bool ignore_target_mask = false, + bool reuse_existing_render_texture = false); +void MarkRenderTargetGpuWritten(const RenderColorInfo& target); + +} // namespace Libs::Graphics + +#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_COLORRENDERTARGET_H_ diff --git a/src/graphics/host_gpu/renderer/context.cpp b/src/graphics/host_gpu/renderer/context.cpp index 6fa8348f4..9bafdd875 100644 --- a/src/graphics/host_gpu/renderer/context.cpp +++ b/src/graphics/host_gpu/renderer/context.cpp @@ -5,11 +5,13 @@ #include "common/profiler.h" #include "common/threads.h" #include "graphics/host_gpu/graphicContext.h" +#include "graphics/host_gpu/renderer/colorRenderTarget.h" +#include "graphics/host_gpu/renderer/debug.h" +#include "graphics/host_gpu/renderer/depthRenderTarget.h" #include "graphics/host_gpu/renderer/descriptorCache.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/host_gpu/utils.h" #include "graphics/host_gpu/vma.h" #include "graphics/presentation/window.h" diff --git a/src/graphics/host_gpu/renderer/debug.cpp b/src/graphics/host_gpu/renderer/debug.cpp index e92fb0824..9ae17d440 100644 --- a/src/graphics/host_gpu/renderer/debug.cpp +++ b/src/graphics/host_gpu/renderer/debug.cpp @@ -1,3 +1,5 @@ +#include "graphics/host_gpu/renderer/debug.h" + #include "common/assert.h" #include "common/common.h" #include "common/emulatorConfig.h" @@ -6,7 +8,6 @@ #include "graphics/guest_gpu/hardwareContext.h" #include "graphics/guest_gpu/gpu_defs.h" #include "graphics/host_gpu/renderer/render.h" -#include "graphics/host_gpu/renderer/renderState.h" #include #include diff --git a/src/graphics/host_gpu/renderer/debug.h b/src/graphics/host_gpu/renderer/debug.h new file mode 100644 index 000000000..06ef50311 --- /dev/null +++ b/src/graphics/host_gpu/renderer/debug.h @@ -0,0 +1,44 @@ +#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_DEBUG_H_ +#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_DEBUG_H_ + +#include +#include +#include +#include + +namespace Libs::Graphics { + +namespace HW { +class Context; +class Shader; +class UserConfig; +struct RenderTarget; +struct ScanModeControl; +struct ScreenViewport; +} // namespace HW + +struct ScissorRect { + int left = 0; + int top = 0; + int right = 0; + int bottom = 0; +}; + +uint32_t render_target_mask_slot(uint32_t mask, uint32_t slot); +uint32_t render_target_first_bound_slot(const HW::Context& hw); +bool graphics_debug_dump_enabled(); +void uc_print(const char* func, const HW::UserConfig& uc); +void uc_check(const HW::UserConfig& uc); +void sh_print(const char* func, const HW::Shader& uc); +void sh_check(const HW::Shader& uc); +std::vector rt_print(const char* func, const HW::RenderTarget& rt); +bool RenderIsColorTileModeLinear(uint32_t tile_mode); +void hw_print(const HW::Context& hw); +void hw_check(const HW::Context& hw); +void LogDrawPhase(const char* draw_name, const char* phase); +ScissorRect calc_final_scissor(const HW::ScreenViewport& vp, const HW::ScanModeControl& smc, + VkExtent2D extent); + +} // namespace Libs::Graphics + +#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_DEBUG_H_ diff --git a/src/graphics/host_gpu/renderer/depthRenderTarget.cpp b/src/graphics/host_gpu/renderer/depthRenderTarget.cpp index d23df577c..533d76c78 100644 --- a/src/graphics/host_gpu/renderer/depthRenderTarget.cpp +++ b/src/graphics/host_gpu/renderer/depthRenderTarget.cpp @@ -1,3 +1,5 @@ +#include "graphics/host_gpu/renderer/depthRenderTarget.h" + #include "common/assert.h" #include "common/common.h" #include "common/logging/log.h" @@ -10,10 +12,10 @@ #include "graphics/host_gpu/graphicContext.h" #include "graphics/host_gpu/objects/textureCommon.h" #include "graphics/host_gpu/renderer/descriptorCache.h" +#include "graphics/host_gpu/renderer/debug.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/host_gpu/utils.h" #include "graphics/presentation/displayBuffer.h" diff --git a/src/graphics/host_gpu/renderer/depthRenderTarget.h b/src/graphics/host_gpu/renderer/depthRenderTarget.h new file mode 100644 index 000000000..022fd2a6e --- /dev/null +++ b/src/graphics/host_gpu/renderer/depthRenderTarget.h @@ -0,0 +1,82 @@ +#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_DEPTHRENDERTARGET_H_ +#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_DEPTHRENDERTARGET_H_ + +#include "common/assert.h" +#include "graphics/host_gpu/renderer/renderTarget.h" + +#include +#include + +namespace Libs::Graphics { + +class CommandBuffer; +struct DepthStencilVulkanImage; + +namespace HW { +class Context; +} // namespace HW + +inline constexpr bool depth_htile_stencil_acceleration_compatible(bool has_stencil, bool has_htile, + bool acceleration_disabled) { + return acceleration_disabled || (has_stencil && has_htile); +} + +struct RenderDepthInfo { + VkFormat format = VK_FORMAT_UNDEFINED; + uint32_t width = 0; + uint32_t height = 0; + bool htile = false; + uint64_t depth_buffer_size = 0; + uint64_t depth_buffer_vaddr = 0; + uint64_t depth_tile_swizzle = 0; + uint64_t stencil_buffer_size = 0; + uint64_t stencil_buffer_vaddr = 0; + uint64_t stencil_tile_swizzle = 0; + uint64_t htile_buffer_size = 0; + uint64_t htile_buffer_vaddr = 0; + uint64_t htile_tile_swizzle = 0; + bool depth_clear_enable = false; + bool depth_load_clear_enable = false; + bool depth_meta_clear_enable = false; + float depth_clear_value = 0.0f; + bool depth_test_enable = false; + bool depth_write_enable = false; + VkCompareOp depth_compare_op = VK_COMPARE_OP_NEVER; + bool depth_bounds_test_enable = false; + float depth_min_bounds = 0.0f; + float depth_max_bounds = 0.0f; + bool stencil_clear_enable = false; + uint8_t stencil_clear_value = 0; + bool stencil_test_enable = false; + PipelineStencilStaticState stencil_static_front; + PipelineStencilStaticState stencil_static_back; + PipelineStencilDynamicState stencil_dynamic_front; + PipelineStencilDynamicState stencil_dynamic_back; + DepthStencilVulkanImage* vulkan_buffer = nullptr; + VkImageView vulkan_view = nullptr; + uint64_t vaddr[3] = {}; + uint64_t size[3] = {}; + int vaddr_num = 0; +}; + +inline bool depth_attachment_read_only(const RenderDepthInfo* depth) { + EXIT_IF(depth == nullptr); + const bool stencil_write = + depth->stencil_test_enable && + (depth->stencil_dynamic_front.writeMask != 0 || depth->stencil_dynamic_back.writeMask != 0); + return !depth->depth_load_clear_enable && !depth->stencil_clear_enable && + !depth->depth_write_enable && !stencil_write; +} + +inline VkImageLayout depth_attachment_layout(const RenderDepthInfo* depth) { + return depth_attachment_read_only(depth) ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL + : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; +} + +void ResolveRenderDepthTarget(uint64_t submit_id, CommandBuffer* buffer, const HW::Context& hw, + RenderDepthInfo* r); +void MarkRenderTargetGpuWritten(const RenderDepthInfo& target); + +} // namespace Libs::Graphics + +#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_DEPTHRENDERTARGET_H_ diff --git a/src/graphics/host_gpu/renderer/descriptors.cpp b/src/graphics/host_gpu/renderer/descriptors.cpp index ff5019431..3d23a86b8 100644 --- a/src/graphics/host_gpu/renderer/descriptors.cpp +++ b/src/graphics/host_gpu/renderer/descriptors.cpp @@ -15,12 +15,13 @@ #include "graphics/host_gpu/graphicContext.h" #include "graphics/host_gpu/hostMemory.h" #include "graphics/host_gpu/objects/textureCommon.h" +#include "graphics/host_gpu/renderer/debug.h" #include "graphics/host_gpu/renderer/descriptorCache.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/imageView.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" +#include "graphics/host_gpu/renderer/renderTargetBarriers.h" #include "graphics/host_gpu/renderer/shaderResourceBarrier.h" #include "graphics/host_gpu/utils.h" #include "graphics/host_gpu/vma.h" diff --git a/src/graphics/host_gpu/renderer/framebufferCache.cpp b/src/graphics/host_gpu/renderer/framebufferCache.cpp index f6ecabaae..8f4e8d515 100644 --- a/src/graphics/host_gpu/renderer/framebufferCache.cpp +++ b/src/graphics/host_gpu/renderer/framebufferCache.cpp @@ -3,6 +3,8 @@ #include "common/assert.h" #include "common/logging/log.h" #include "common/profiler.h" +#include "graphics/host_gpu/renderer/colorRenderTarget.h" +#include "graphics/host_gpu/renderer/depthRenderTarget.h" #include "graphics/host_gpu/renderer/renderContext.h" #include "graphics/host_gpu/utils.h" diff --git a/src/graphics/host_gpu/renderer/framebufferCache.h b/src/graphics/host_gpu/renderer/framebufferCache.h index cfd141903..5314d79af 100644 --- a/src/graphics/host_gpu/renderer/framebufferCache.h +++ b/src/graphics/host_gpu/renderer/framebufferCache.h @@ -6,13 +6,16 @@ #include "common/common.h" #include "common/threads.h" #include "graphics/host_gpu/graphicContext.h" -#include "graphics/host_gpu/renderer/renderState.h" +#include "graphics/host_gpu/renderer/renderTarget.h" #include #include namespace Libs::Graphics { +struct RenderColorInfo; +struct RenderDepthInfo; + static constexpr VkImageLayout RENDER_COLOR_IMAGE_LAYOUT = VK_IMAGE_LAYOUT_GENERAL; struct VulkanFramebuffer { diff --git a/src/graphics/host_gpu/renderer/internal.h b/src/graphics/host_gpu/renderer/internal.h index c801b4812..267c04221 100644 --- a/src/graphics/host_gpu/renderer/internal.h +++ b/src/graphics/host_gpu/renderer/internal.h @@ -6,7 +6,6 @@ #include "graphics/host_gpu/renderer/gdsBuffer.h" #include "graphics/host_gpu/renderer/pipelineCache.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/host_gpu/renderer/samplerCache.h" #endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_INTERNAL_H_ diff --git a/src/graphics/host_gpu/renderer/pipelineCache.cpp b/src/graphics/host_gpu/renderer/pipelineCache.cpp index 887c45e5e..d19e73db3 100644 --- a/src/graphics/host_gpu/renderer/pipelineCache.cpp +++ b/src/graphics/host_gpu/renderer/pipelineCache.cpp @@ -7,6 +7,9 @@ #include "common/stringUtils.h" #include "graphics/guest_gpu/graphicsRun.h" #include "graphics/guest_gpu/hardwareContext.h" +#include "graphics/host_gpu/renderer/colorRenderTarget.h" +#include "graphics/host_gpu/renderer/debug.h" +#include "graphics/host_gpu/renderer/depthRenderTarget.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/renderContext.h" #include "graphics/host_gpu/utils.h" diff --git a/src/graphics/host_gpu/renderer/pipelineCache.h b/src/graphics/host_gpu/renderer/pipelineCache.h index b77873688..caef2cedc 100644 --- a/src/graphics/host_gpu/renderer/pipelineCache.h +++ b/src/graphics/host_gpu/renderer/pipelineCache.h @@ -6,18 +6,21 @@ #include "common/common.h" #include "common/file.h" #include "common/threads.h" -#include "graphics/host_gpu/renderer/renderState.h" +#include "graphics/host_gpu/renderer/renderTarget.h" #include "graphics/shader/shader.h" #include #include #include +#include #include #include #include namespace Libs::Graphics { +struct RenderColorInfo; +struct RenderDepthInfo; struct VulkanFramebuffer; namespace HW { @@ -26,6 +29,60 @@ class Shader; struct ComputeShaderInfo; } // namespace HW +#pragma pack(push, 1) + +struct PipelineStaticParameters { + float viewport_scale[3] = {}; + float viewport_offset[3] = {}; + bool negative_one_to_one = false; + int scissor_ltrb[4] = {0}; + VkPrimitiveTopology topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; + bool with_depth = false; + bool depth_test_enable = false; + bool depth_write_enable = false; + VkCompareOp depth_compare_op = VK_COMPARE_OP_NEVER; + bool depth_bounds_test_enable = false; + float depth_min_bounds = 0.0f; + float depth_max_bounds = 0.0f; + bool stencil_test_enable = false; + PipelineStencilStaticState stencil_front; + PipelineStencilStaticState stencil_back; + uint32_t color_count = 1; + uint32_t color_mask[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + bool cull_front = false; + bool cull_back = false; + bool face = false; + uint8_t color_srcblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + uint8_t color_comb_fcn[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + uint8_t color_destblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + uint8_t alpha_srcblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + uint8_t alpha_comb_fcn[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + uint8_t alpha_destblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + bool separate_alpha_blend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + bool blend_enable[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + bool blend_bypass[RENDER_COLOR_ATTACHMENTS_MAX] = {}; + float blend_color_red = 0.0f; + float blend_color_green = 0.0f; + float blend_color_blue = 0.0f; + float blend_color_alpha = 0.0f; + + bool operator==(const PipelineStaticParameters& other) const noexcept; +}; + +#pragma pack(pop) + +static_assert(std::is_trivially_copyable_v); +static_assert(std::is_standard_layout_v); +static_assert(alignof(PipelineStaticParameters) == 1); +static_assert(sizeof(PipelineStaticParameters) == + sizeof(float[3]) + sizeof(float[3]) + sizeof(bool) + sizeof(int[4]) + + sizeof(VkPrimitiveTopology) + sizeof(bool) * 3 + sizeof(VkCompareOp) + + sizeof(bool) + sizeof(float) * 2 + sizeof(bool) + + sizeof(PipelineStencilStaticState) * 2 + sizeof(uint32_t) + + sizeof(uint32_t[RENDER_COLOR_ATTACHMENTS_MAX]) + sizeof(bool) * 3 + + sizeof(uint8_t[RENDER_COLOR_ATTACHMENTS_MAX]) * 6 + + sizeof(bool[RENDER_COLOR_ATTACHMENTS_MAX]) * 3 + sizeof(float) * 4); + class PipelineCache { public: PipelineCache() { EXIT_NOT_IMPLEMENTED(!Common::Thread::IsMainThread()); } diff --git a/src/graphics/host_gpu/renderer/render.h b/src/graphics/host_gpu/renderer/render.h index d55c7b3ca..813307109 100644 --- a/src/graphics/host_gpu/renderer/render.h +++ b/src/graphics/host_gpu/renderer/render.h @@ -40,6 +40,19 @@ struct HtileClearTarget { uint64_t size = 0; }; +enum class CommandBufferDebugOp : uint32_t { + DispatchDirect, + DrawIndex, + DrawIndexAuto, + EopWrite, + EopInterrupt, + EopWriteBack, + EopFlip, + EopWriteBackFlip, + EopOnlyFlip, + Unknown, +}; + class FenceResourceRetainer { public: FenceResourceRetainer() = default; diff --git a/src/graphics/host_gpu/renderer/renderCompute.cpp b/src/graphics/host_gpu/renderer/renderCompute.cpp index 36920643c..50c68f38c 100644 --- a/src/graphics/host_gpu/renderer/renderCompute.cpp +++ b/src/graphics/host_gpu/renderer/renderCompute.cpp @@ -12,6 +12,7 @@ #include "graphics/guest_gpu/tile.h" #include "graphics/host_gpu/graphicContext.h" #include "graphics/host_gpu/objects/label.h" +#include "graphics/host_gpu/renderer/depthRenderTarget.h" #include "graphics/host_gpu/renderer/descriptorCache.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/imageInfo.h" @@ -19,7 +20,6 @@ #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" #include "graphics/host_gpu/renderer/renderInternal.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/host_gpu/renderer/shaderResourceBarrier.h" #include "graphics/host_gpu/renderer/shaderSubgroup.h" #include "graphics/host_gpu/utils.h" diff --git a/src/graphics/host_gpu/renderer/renderDraw.cpp b/src/graphics/host_gpu/renderer/renderDraw.cpp index aa29bcbc7..7f446674f 100644 --- a/src/graphics/host_gpu/renderer/renderDraw.cpp +++ b/src/graphics/host_gpu/renderer/renderDraw.cpp @@ -12,13 +12,17 @@ #include "graphics/guest_gpu/tile.h" #include "graphics/host_gpu/graphicContext.h" #include "graphics/host_gpu/objects/label.h" +#include "graphics/host_gpu/renderer/colorRenderTarget.h" +#include "graphics/host_gpu/renderer/debug.h" +#include "graphics/host_gpu/renderer/depthRenderTarget.h" #include "graphics/host_gpu/renderer/descriptorCache.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/pipelineCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" +#include "graphics/host_gpu/renderer/renderDraw.h" #include "graphics/host_gpu/renderer/renderInternal.h" -#include "graphics/host_gpu/renderer/renderState.h" +#include "graphics/host_gpu/renderer/renderVertex.h" #include "graphics/host_gpu/renderer/shaderResourceBarrier.h" #include "graphics/host_gpu/renderer/shaderSubgroup.h" #include "graphics/host_gpu/utils.h" diff --git a/src/graphics/host_gpu/renderer/renderDraw.h b/src/graphics/host_gpu/renderer/renderDraw.h new file mode 100644 index 000000000..383d4ddf0 --- /dev/null +++ b/src/graphics/host_gpu/renderer/renderDraw.h @@ -0,0 +1,49 @@ +#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERDRAW_H_ +#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERDRAW_H_ + +#include "graphics/host_gpu/renderer/renderTarget.h" + +#include +#include + +namespace Libs::Graphics { + +struct ImageImageCopy; +struct RenderColorInfo; + +#pragma pack(push, 1) + +struct PipelineDynamicParameters { + bool stencil_test_enable = false; + + float viewport_scale[3] = {}; + float viewport_offset[3] = {}; + int scissor_ltrb[4] = {0}; + + float line_width = 1.0f; + uint32_t color_write_count = 1; + bool color_write_enable[RENDER_COLOR_ATTACHMENTS_MAX] = {true, true}; + + PipelineStencilDynamicState stencil_front; + PipelineStencilDynamicState stencil_back; +}; + +#pragma pack(pop) + +static_assert(std::is_trivially_copyable_v); +static_assert(std::is_standard_layout_v); +static_assert(alignof(PipelineDynamicParameters) == 1); +static_assert(sizeof(PipelineDynamicParameters) == + sizeof(bool) + sizeof(float[3]) + sizeof(float[3]) + sizeof(int[4]) + sizeof(float) + + sizeof(uint32_t) + sizeof(bool[RENDER_COLOR_ATTACHMENTS_MAX]) + + sizeof(PipelineStencilDynamicState) * 2); + +[[nodiscard]] bool IsSameColorResolveSubresource(const RenderColorInfo& src, + const RenderColorInfo& dst); +[[nodiscard]] ImageImageCopy MakeColorResolveCopy(const RenderColorInfo& src, + const RenderColorInfo& dst, uint32_t width, + uint32_t height); + +} // namespace Libs::Graphics + +#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERDRAW_H_ diff --git a/src/graphics/host_gpu/renderer/renderState.h b/src/graphics/host_gpu/renderer/renderState.h deleted file mode 100644 index 623cc0160..000000000 --- a/src/graphics/host_gpu/renderer/renderState.h +++ /dev/null @@ -1,310 +0,0 @@ -#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERSTATE_H_ -#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERSTATE_H_ - -#include "common/abi.h" -#include "common/assert.h" -#include "common/common.h" -#include "graphics/guest_gpu/gpu_defs.h" - -#include -#include -#include -#include -#include - -namespace Libs::Graphics { - -class CommandBuffer; -struct DepthStencilVulkanImage; -struct ImageImageCopy; -struct RenderTextureVulkanImage; -struct ShaderVertexInputInfo; -struct VulkanImage; - -namespace HW { -class Context; -class Shader; -class UserConfig; -struct RenderTarget; -struct ScanModeControl; -struct ScreenViewport; -} // namespace HW - -static constexpr uint32_t RENDER_COLOR_ATTACHMENTS_MAX = 8; - -inline constexpr bool depth_msaa_single_sample_compatible(uint32_t encoded_fragments) { - return encoded_fragments == 1 || encoded_fragments == 2; -} - -inline constexpr bool color_msaa_single_sample_compatible(uint32_t encoded_samples, - uint32_t encoded_fragments) { - return encoded_samples == encoded_fragments && - depth_msaa_single_sample_compatible(encoded_fragments); -} - -enum class TargetViewType : uint8_t { Image2D, Image2DArray, Unsupported }; - -struct TargetViewInfo { - TargetViewType type = TargetViewType::Unsupported; - uint32_t base_layer = 0; - uint32_t layer_count = 0; - uint32_t image_layers = 0; -}; - -inline constexpr TargetViewInfo ResolveTargetViewInfo(uint32_t base_layer, uint32_t last_layer, - uint32_t draw_layer_offset = 0) { - if (base_layer > last_layer || draw_layer_offset != 0) { - return {}; - } - return {base_layer == last_layer ? TargetViewType::Image2D : TargetViewType::Image2DArray, - base_layer, last_layer - base_layer + 1u, last_layer + 1u}; -} - -inline constexpr bool depth_htile_stencil_acceleration_compatible(bool has_stencil, bool has_htile, - bool acceleration_disabled) { - return acceleration_disabled || (has_stencil && has_htile); -} - -// Pack structs to guarantee the uniqueness of object representation. -#pragma pack(push, 1) - -struct PipelineStencilStaticState { - VkStencilOp failOp = VK_STENCIL_OP_KEEP; - VkStencilOp passOp = VK_STENCIL_OP_KEEP; - VkStencilOp depthFailOp = VK_STENCIL_OP_KEEP; - VkCompareOp compareOp = VK_COMPARE_OP_NEVER; -}; - -struct PipelineStencilDynamicState { - uint32_t compareMask = 0; - uint32_t writeMask = 0; - uint32_t reference = 0; -}; - -inline constexpr bool stencil_face_accesses_attachment(const PipelineStencilStaticState& state, - const PipelineStencilDynamicState& dynamic) { - return state.compareOp != VK_COMPARE_OP_ALWAYS || - (dynamic.writeMask != 0 && - (state.failOp != VK_STENCIL_OP_KEEP || state.passOp != VK_STENCIL_OP_KEEP || - state.depthFailOp != VK_STENCIL_OP_KEEP)); -} - -struct PipelineStaticParameters { - float viewport_scale[3] = {}; - float viewport_offset[3] = {}; - bool negative_one_to_one = false; - int scissor_ltrb[4] = {0}; - VkPrimitiveTopology topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; - bool with_depth = false; - bool depth_test_enable = false; - bool depth_write_enable = false; - VkCompareOp depth_compare_op = VK_COMPARE_OP_NEVER; - bool depth_bounds_test_enable = false; - float depth_min_bounds = 0.0f; - float depth_max_bounds = 0.0f; - bool stencil_test_enable = false; - PipelineStencilStaticState stencil_front; - PipelineStencilStaticState stencil_back; - uint32_t color_count = 1; - uint32_t color_mask[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - bool cull_front = false; - bool cull_back = false; - bool face = false; - uint8_t color_srcblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - uint8_t color_comb_fcn[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - uint8_t color_destblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - uint8_t alpha_srcblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - uint8_t alpha_comb_fcn[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - uint8_t alpha_destblend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - bool separate_alpha_blend[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - bool blend_enable[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - bool blend_bypass[RENDER_COLOR_ATTACHMENTS_MAX] = {}; - float blend_color_red = 0.0f; - float blend_color_green = 0.0f; - float blend_color_blue = 0.0f; - float blend_color_alpha = 0.0f; - - bool operator==(const PipelineStaticParameters& other) const noexcept; -}; - -struct PipelineDynamicParameters { - bool stencil_test_enable = false; - - float viewport_scale[3] = {}; - float viewport_offset[3] = {}; - int scissor_ltrb[4] = {0}; - - float line_width = 1.0f; - uint32_t color_write_count = 1; - bool color_write_enable[RENDER_COLOR_ATTACHMENTS_MAX] = {true, true}; - - PipelineStencilDynamicState stencil_front; - PipelineStencilDynamicState stencil_back; -}; - -#pragma pack(pop) - -static_assert(std::is_trivially_copyable_v); -static_assert(std::is_standard_layout_v); -static_assert(alignof(PipelineStencilStaticState) == 1); -static_assert(sizeof(PipelineStencilStaticState) == sizeof(VkStencilOp) * 3 + sizeof(VkCompareOp)); -static_assert(std::is_trivially_copyable_v); -static_assert(std::is_standard_layout_v); -static_assert(alignof(PipelineStencilDynamicState) == 1); -static_assert(sizeof(PipelineStencilDynamicState) == sizeof(uint32_t) * 3); -static_assert(std::is_trivially_copyable_v); -static_assert(std::is_standard_layout_v); -static_assert(alignof(PipelineStaticParameters) == 1); -static_assert(sizeof(PipelineStaticParameters) == - sizeof(float[3]) + sizeof(float[3]) + sizeof(bool) + sizeof(int[4]) + - sizeof(VkPrimitiveTopology) + sizeof(bool) * 3 + sizeof(VkCompareOp) + - sizeof(bool) + sizeof(float) * 2 + sizeof(bool) + - sizeof(PipelineStencilStaticState) * 2 + sizeof(uint32_t) + - sizeof(uint32_t[RENDER_COLOR_ATTACHMENTS_MAX]) + sizeof(bool) * 3 + - sizeof(uint8_t[RENDER_COLOR_ATTACHMENTS_MAX]) * 6 + - sizeof(bool[RENDER_COLOR_ATTACHMENTS_MAX]) * 3 + sizeof(float) * 4); -static_assert(std::is_trivially_copyable_v); -static_assert(std::is_standard_layout_v); -static_assert(alignof(PipelineDynamicParameters) == 1); -static_assert(sizeof(PipelineDynamicParameters) == - sizeof(bool) + sizeof(float[3]) + sizeof(float[3]) + sizeof(int[4]) + sizeof(float) + - sizeof(uint32_t) + sizeof(bool[RENDER_COLOR_ATTACHMENTS_MAX]) + - sizeof(PipelineStencilDynamicState) * 2); - -struct RenderDepthInfo { - VkFormat format = VK_FORMAT_UNDEFINED; - uint32_t width = 0; - uint32_t height = 0; - bool htile = false; - uint64_t depth_buffer_size = 0; - uint64_t depth_buffer_vaddr = 0; - uint64_t depth_tile_swizzle = 0; - uint64_t stencil_buffer_size = 0; - uint64_t stencil_buffer_vaddr = 0; - uint64_t stencil_tile_swizzle = 0; - uint64_t htile_buffer_size = 0; - uint64_t htile_buffer_vaddr = 0; - uint64_t htile_tile_swizzle = 0; - bool depth_clear_enable = false; - bool depth_load_clear_enable = false; - bool depth_meta_clear_enable = false; - float depth_clear_value = 0.0f; - bool depth_test_enable = false; - bool depth_write_enable = false; - VkCompareOp depth_compare_op = VK_COMPARE_OP_NEVER; - bool depth_bounds_test_enable = false; - float depth_min_bounds = 0.0f; - float depth_max_bounds = 0.0f; - bool stencil_clear_enable = false; - uint8_t stencil_clear_value = 0; - bool stencil_test_enable = false; - PipelineStencilStaticState stencil_static_front; - PipelineStencilStaticState stencil_static_back; - PipelineStencilDynamicState stencil_dynamic_front; - PipelineStencilDynamicState stencil_dynamic_back; - DepthStencilVulkanImage* vulkan_buffer = nullptr; - VkImageView vulkan_view = nullptr; - uint64_t vaddr[3] = {}; - uint64_t size[3] = {}; - int vaddr_num = 0; -}; - -inline bool depth_attachment_read_only(const RenderDepthInfo* depth) { - EXIT_IF(depth == nullptr); - - const bool stencil_write = - depth->stencil_test_enable && - (depth->stencil_dynamic_front.writeMask != 0 || depth->stencil_dynamic_back.writeMask != 0); - - return !depth->depth_load_clear_enable && !depth->stencil_clear_enable && - !depth->depth_write_enable && !stencil_write; -} - -inline VkImageLayout depth_attachment_layout(const RenderDepthInfo* depth) { - return depth_attachment_read_only(depth) ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL - : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; -} - -enum class RenderColorType { - NoColorOutput, - DisplayBuffer, - RenderTexture, -}; - -struct RenderColorInfo { - RenderColorType type = RenderColorType::NoColorOutput; - VulkanImage* vulkan_buffer = nullptr; - VkImageView vulkan_view = nullptr; - VkFormat format = VK_FORMAT_UNDEFINED; - VkExtent2D extent = {}; - uint32_t base_mip_level = 0; - uint32_t base_array_layer = 0; - uint64_t base_addr = 0; - uint64_t buffer_size = 0; - uint32_t target_slot = 0; - Prospero::ColorComponentMapping export_mapping; - bool color_clear_enable = false; - VkClearColorValue color_clear_value {}; -}; - -[[nodiscard]] bool IsSameColorResolveSubresource(const RenderColorInfo& src, - const RenderColorInfo& dst); -[[nodiscard]] ImageImageCopy MakeColorResolveCopy(const RenderColorInfo& src, - const RenderColorInfo& dst, uint32_t width, - uint32_t height); - -struct ScissorRect { - int left = 0; - int top = 0; - int right = 0; - int bottom = 0; -}; - -enum class CommandBufferDebugOp : uint32_t { - DispatchDirect, - DrawIndex, - DrawIndexAuto, - EopWrite, - EopInterrupt, - EopWriteBack, - EopFlip, - EopWriteBackFlip, - EopOnlyFlip, - Unknown, -}; - -uint32_t render_target_mask_slot(uint32_t mask, uint32_t slot); -uint32_t render_target_first_bound_slot(const HW::Context& hw); -bool graphics_debug_dump_enabled(); -void uc_print(const char* func, const HW::UserConfig& uc); -void uc_check(const HW::UserConfig& uc); -void sh_print(const char* func, const HW::Shader& uc); -void sh_check(const HW::Shader& uc); -std::vector rt_print(const char* func, const HW::RenderTarget& rt); -bool RenderIsColorTileModeLinear(uint32_t tile_mode); -void hw_print(const HW::Context& hw); -void hw_check(const HW::Context& hw); -void LogDrawPhase(const char* draw_name, const char* phase); -ScissorRect calc_final_scissor(const HW::ScreenViewport& vp, const HW::ScanModeControl& smc, - VkExtent2D extent); -int32_t ResolveVertexOffset(uint32_t index_offset, const ShaderVertexInputInfo& vs_input_info); - -void GraphicsRenderTextureBarrier(VkCommandBuffer vk_buffer, VulkanImage* image); -void GraphicsRenderColorImageBarrier(VkCommandBuffer vk_buffer, VulkanImage* image, - VkImageLayout new_layout); -void GraphicsRenderDepthStencilImageBarrier(VkCommandBuffer vk_buffer, VulkanImage* image, - VkImageLayout new_layout); -void GraphicsRenderDepthStencilBarrier(VkCommandBuffer vk_buffer, VulkanImage* image); -void ResolveRenderDepthTarget(uint64_t submit_id, CommandBuffer* buffer, const HW::Context& hw, - RenderDepthInfo* r); -void ResolveRenderColorTarget(uint64_t submit_id, CommandBuffer* buffer, const HW::Context& hw, - RenderColorInfo* r, uint32_t render_target_slice_offset = 0, - uint32_t render_target_slot = UINT32_MAX, - bool ignore_target_mask = false, - bool reuse_existing_render_texture = false); -void MarkRenderTargetGpuWritten(const RenderColorInfo& target); -void MarkRenderTargetGpuWritten(const RenderDepthInfo& target); - -} // namespace Libs::Graphics - -#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERSTATE_H_ diff --git a/src/graphics/host_gpu/renderer/renderTarget.h b/src/graphics/host_gpu/renderer/renderTarget.h new file mode 100644 index 000000000..de9c9e692 --- /dev/null +++ b/src/graphics/host_gpu/renderer/renderTarget.h @@ -0,0 +1,76 @@ +#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERTARGET_H_ +#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERTARGET_H_ + +#include +#include +#include + +namespace Libs::Graphics { + +static constexpr uint32_t RENDER_COLOR_ATTACHMENTS_MAX = 8; + +inline constexpr bool depth_msaa_single_sample_compatible(uint32_t encoded_fragments) { + return encoded_fragments == 1 || encoded_fragments == 2; +} + +inline constexpr bool color_msaa_single_sample_compatible(uint32_t encoded_samples, + uint32_t encoded_fragments) { + return encoded_samples == encoded_fragments && + depth_msaa_single_sample_compatible(encoded_fragments); +} + +enum class TargetViewType : uint8_t { Image2D, Image2DArray, Unsupported }; + +struct TargetViewInfo { + TargetViewType type = TargetViewType::Unsupported; + uint32_t base_layer = 0; + uint32_t layer_count = 0; + uint32_t image_layers = 0; +}; + +inline constexpr TargetViewInfo ResolveTargetViewInfo(uint32_t base_layer, uint32_t last_layer, + uint32_t draw_layer_offset = 0) { + if (base_layer > last_layer || draw_layer_offset != 0) { + return {}; + } + return {base_layer == last_layer ? TargetViewType::Image2D : TargetViewType::Image2DArray, + base_layer, last_layer - base_layer + 1u, last_layer + 1u}; +} + +#pragma pack(push, 1) + +struct PipelineStencilStaticState { + VkStencilOp failOp = VK_STENCIL_OP_KEEP; + VkStencilOp passOp = VK_STENCIL_OP_KEEP; + VkStencilOp depthFailOp = VK_STENCIL_OP_KEEP; + VkCompareOp compareOp = VK_COMPARE_OP_NEVER; +}; + +struct PipelineStencilDynamicState { + uint32_t compareMask = 0; + uint32_t writeMask = 0; + uint32_t reference = 0; +}; + +#pragma pack(pop) + +inline constexpr bool stencil_face_accesses_attachment(const PipelineStencilStaticState& state, + const PipelineStencilDynamicState& dynamic) { + return state.compareOp != VK_COMPARE_OP_ALWAYS || + (dynamic.writeMask != 0 && + (state.failOp != VK_STENCIL_OP_KEEP || state.passOp != VK_STENCIL_OP_KEEP || + state.depthFailOp != VK_STENCIL_OP_KEEP)); +} + +static_assert(std::is_trivially_copyable_v); +static_assert(std::is_standard_layout_v); +static_assert(alignof(PipelineStencilStaticState) == 1); +static_assert(sizeof(PipelineStencilStaticState) == sizeof(VkStencilOp) * 3 + sizeof(VkCompareOp)); +static_assert(std::is_trivially_copyable_v); +static_assert(std::is_standard_layout_v); +static_assert(alignof(PipelineStencilDynamicState) == 1); +static_assert(sizeof(PipelineStencilDynamicState) == sizeof(uint32_t) * 3); + +} // namespace Libs::Graphics + +#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERTARGET_H_ diff --git a/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp b/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp index c77dfd59d..09d63cd16 100644 --- a/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp +++ b/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp @@ -1,3 +1,5 @@ +#include "graphics/host_gpu/renderer/renderTargetBarriers.h" + #include "common/assert.h" #include "common/common.h" #include "common/logging/log.h" @@ -13,7 +15,6 @@ #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/host_gpu/utils.h" #include "graphics/presentation/displayBuffer.h" diff --git a/src/graphics/host_gpu/renderer/renderTargetBarriers.h b/src/graphics/host_gpu/renderer/renderTargetBarriers.h new file mode 100644 index 000000000..5f9477902 --- /dev/null +++ b/src/graphics/host_gpu/renderer/renderTargetBarriers.h @@ -0,0 +1,19 @@ +#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERTARGETBARRIERS_H_ +#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERTARGETBARRIERS_H_ + +#include + +namespace Libs::Graphics { + +struct VulkanImage; + +void GraphicsRenderTextureBarrier(VkCommandBuffer vk_buffer, VulkanImage* image); +void GraphicsRenderColorImageBarrier(VkCommandBuffer vk_buffer, VulkanImage* image, + VkImageLayout new_layout); +void GraphicsRenderDepthStencilImageBarrier(VkCommandBuffer vk_buffer, VulkanImage* image, + VkImageLayout new_layout); +void GraphicsRenderDepthStencilBarrier(VkCommandBuffer vk_buffer, VulkanImage* image); + +} // namespace Libs::Graphics + +#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERTARGETBARRIERS_H_ diff --git a/src/graphics/host_gpu/renderer/renderVertex.cpp b/src/graphics/host_gpu/renderer/renderVertex.cpp index 4de0dbc9a..8cac5a225 100644 --- a/src/graphics/host_gpu/renderer/renderVertex.cpp +++ b/src/graphics/host_gpu/renderer/renderVertex.cpp @@ -1,5 +1,6 @@ +#include "graphics/host_gpu/renderer/renderVertex.h" + #include "common/assert.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/shader/recompiler/ResourceMaterialization.h" #include "graphics/shader/recompiler/ShaderIR.h" #include "graphics/shader/shader.h" diff --git a/src/graphics/host_gpu/renderer/renderVertex.h b/src/graphics/host_gpu/renderer/renderVertex.h new file mode 100644 index 000000000..2cdcc1e13 --- /dev/null +++ b/src/graphics/host_gpu/renderer/renderVertex.h @@ -0,0 +1,14 @@ +#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERVERTEX_H_ +#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERVERTEX_H_ + +#include + +namespace Libs::Graphics { + +struct ShaderVertexInputInfo; + +int32_t ResolveVertexOffset(uint32_t index_offset, const ShaderVertexInputInfo& vs_input_info); + +} // namespace Libs::Graphics + +#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_RENDERVERTEX_H_ diff --git a/src/graphics/host_gpu/renderer/shaders.cpp b/src/graphics/host_gpu/renderer/shaders.cpp index 98990dc6e..4e62361a5 100644 --- a/src/graphics/host_gpu/renderer/shaders.cpp +++ b/src/graphics/host_gpu/renderer/shaders.cpp @@ -5,11 +5,12 @@ #include "common/profiler.h" #include "graphics/guest_gpu/gpu_defs.h" #include "graphics/host_gpu/graphicContext.h" +#include "graphics/host_gpu/renderer/debug.h" #include "graphics/host_gpu/renderer/descriptorCache.h" #include "graphics/host_gpu/renderer/pipelineCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" +#include "graphics/host_gpu/renderer/renderTarget.h" #include "graphics/host_gpu/renderer/shaderSubgroup.h" #include "graphics/shader/recompiler/ShaderIR.h" #include "graphics/shader/shader.h" diff --git a/src/graphics/host_gpu/renderer/sync.cpp b/src/graphics/host_gpu/renderer/sync.cpp index c20f11c11..500030c9c 100644 --- a/src/graphics/host_gpu/renderer/sync.cpp +++ b/src/graphics/host_gpu/renderer/sync.cpp @@ -7,7 +7,6 @@ #include "graphics/host_gpu/renderer/bufferCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderState.h" #include "graphics/presentation/displayBuffer.h" #include "kernel/eventQueue.h" #include "kernel/pthread.h" diff --git a/src/graphics/host_gpu/renderer/textureCache.cpp b/src/graphics/host_gpu/renderer/textureCache.cpp index 640a13c65..52a8ff73d 100644 --- a/src/graphics/host_gpu/renderer/textureCache.cpp +++ b/src/graphics/host_gpu/renderer/textureCache.cpp @@ -16,6 +16,7 @@ #include "graphics/host_gpu/renderer/imageView.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" +#include "graphics/host_gpu/renderer/renderTargetBarriers.h" #include "graphics/host_gpu/renderer/resourceMutex.h" #include "graphics/host_gpu/utils.h" #include "graphics/shader/shader.h" diff --git a/tests/ShaderRecompilerComputeTests.cpp b/tests/ShaderRecompilerComputeTests.cpp index f39e5337d..693ca37fc 100644 --- a/tests/ShaderRecompilerComputeTests.cpp +++ b/tests/ShaderRecompilerComputeTests.cpp @@ -9,11 +9,15 @@ #include "graphics/host_gpu/objects/textureCommon.h" #include "graphics/host_gpu/pageManager.h" #include "graphics/host_gpu/renderer/bufferCache.h" +#include "graphics/host_gpu/renderer/colorRenderTarget.h" +#include "graphics/host_gpu/renderer/depthRenderTarget.h" #include "graphics/host_gpu/renderer/descriptors.h" #include "graphics/host_gpu/renderer/image.h" #include "graphics/host_gpu/renderer/imageView.h" #include "graphics/host_gpu/renderer/render.h" -#include "graphics/host_gpu/renderer/renderState.h" +#include "graphics/host_gpu/renderer/renderDraw.h" +#include "graphics/host_gpu/renderer/renderTarget.h" +#include "graphics/host_gpu/renderer/renderVertex.h" #include "graphics/host_gpu/renderer/resourceMutex.h" #include "graphics/host_gpu/renderer/tiler.h" #include "graphics/host_gpu/renderer/textureCache.h"