diff --git a/src/shader_recompiler/frontend/translate/scalar_alu.cpp b/src/shader_recompiler/frontend/translate/scalar_alu.cpp index f64710fc..b85917b6 100644 --- a/src/shader_recompiler/frontend/translate/scalar_alu.cpp +++ b/src/shader_recompiler/frontend/translate/scalar_alu.cpp @@ -321,4 +321,8 @@ void Translator::S_NOT_B64(const GcnInst& inst) { } } +void Translator::S_BREV_B32(const GcnInst& inst) { + SetDst(inst.dst[0], ir.BitReverse(GetSrc(inst.src[0]))); +} + } // namespace Shader::Gcn diff --git a/src/shader_recompiler/frontend/translate/translate.cpp b/src/shader_recompiler/frontend/translate/translate.cpp index 2b32b6d8..344fdc8b 100644 --- a/src/shader_recompiler/frontend/translate/translate.cpp +++ b/src/shader_recompiler/frontend/translate/translate.cpp @@ -684,6 +684,12 @@ void Translate(IR::Block* block, std::span inst_list, Info& info) case Opcode::V_CEIL_F32: translator.V_CEIL_F32(inst); break; + case Opcode::V_BFI_B32: + translator.V_BFI_B32(inst); + break; + case Opcode::S_BREV_B32: + translator.S_BREV_B32(inst); + break; case Opcode::S_TTRACEDATA: LOG_WARNING(Render_Vulkan, "S_TTRACEDATA instruction!"); break; diff --git a/src/shader_recompiler/frontend/translate/translate.h b/src/shader_recompiler/frontend/translate/translate.h index 2568df30..9c6d6a30 100644 --- a/src/shader_recompiler/frontend/translate/translate.h +++ b/src/shader_recompiler/frontend/translate/translate.h @@ -53,6 +53,7 @@ public: void S_LSHL_B32(const GcnInst& inst); void S_BFM_B32(const GcnInst& inst); void S_NOT_B64(const GcnInst& inst); + void S_BREV_B32(const GcnInst& inst); // Scalar Memory void S_LOAD_DWORD(int num_dwords, const GcnInst& inst); @@ -120,6 +121,7 @@ public: void V_CEIL_F32(const GcnInst& inst); void V_MIN_U32(const GcnInst& inst); void V_CMP_NE_U64(const GcnInst& inst); + void V_BFI_B32(const GcnInst& inst); // Vector Memory void BUFFER_LOAD_FORMAT(u32 num_dwords, bool is_typed, const GcnInst& inst); diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index b894d69f..db717b5a 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -470,4 +470,12 @@ void Translator::V_CMP_NE_U64(const GcnInst& inst) { } } +void Translator::V_BFI_B32(const GcnInst& inst) { + const IR::U32 src0{GetSrc(inst.src[0])}; + const IR::U32 src1{GetSrc(inst.src[1])}; + const IR::U32 src2{GetSrc(inst.src[2])}; + SetDst(inst.dst[0], ir.BitwiseOr(ir.BitwiseAnd(src0, src1), + ir.BitwiseAnd(ir.BitwiseNot(src0), src2))); +} + } // namespace Shader::Gcn diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index b4a71997..c5966305 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -827,7 +827,8 @@ struct Liverpool { PolygonControl polygon_control; ViewportControl viewport_control; VsOutputControl vs_output_control; - INSERT_PADDING_WORDS(0xA29E - 0xA207 - 1); + INSERT_PADDING_WORDS(0xA29E - 0xA207 - 2); + u32 index_size; u32 max_index_size; IndexBufferType index_buffer_type; INSERT_PADDING_WORDS(0xA2A1 - 0xA29E - 2); @@ -993,6 +994,7 @@ static_assert(GFX6_3D_REG_INDEX(depth_control) == 0xA200); static_assert(GFX6_3D_REG_INDEX(clipper_control) == 0xA204); static_assert(GFX6_3D_REG_INDEX(viewport_control) == 0xA206); static_assert(GFX6_3D_REG_INDEX(vs_output_control) == 0xA207); +static_assert(GFX6_3D_REG_INDEX(index_size) == 0xA29D); static_assert(GFX6_3D_REG_INDEX(index_buffer_type) == 0xA29F); static_assert(GFX6_3D_REG_INDEX(enable_primitive_id) == 0xA2A1); static_assert(GFX6_3D_REG_INDEX(poly_offset) == 0xA2DF); diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 37b3f79b..85a051f8 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -23,7 +23,7 @@ Rasterizer::Rasterizer(const Instance& instance_, Scheduler& scheduler_, : instance{instance_}, scheduler{scheduler_}, texture_cache{texture_cache_}, liverpool{liverpool_}, memory{Core::Memory::Instance()}, pipeline_cache{instance, scheduler, liverpool}, - vertex_index_buffer{instance, scheduler, VertexIndexFlags, 32_MB} { + vertex_index_buffer{instance, scheduler, VertexIndexFlags, 128_MB} { if (!Config::nullGpu()) { liverpool->BindRasterizer(this); } diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index 2d9d2316..4d96e96d 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -226,7 +226,7 @@ static constexpr vk::BufferUsageFlags StagingFlags = vk::BufferUsageFlagBits::eT vk::BufferUsageFlagBits::eStorageBuffer; TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler) - : instance{instance}, scheduler{scheduler}, staging{instance, scheduler, StagingFlags, 64_MB} { + : instance{instance}, scheduler{scheduler}, staging{instance, scheduler, StagingFlags, 64_MB, Vulkan::BufferType::Upload} { static const std::array detiler_shaders{ HostShaders::DETILE_M8X1_COMP,