mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-02 00:33:16 +00:00
shader_recompiler: Improvements to array and cube handling. (#2083)
* shader_recompiler: Account for instruction array flag in image type. * shader_recompiler: Check da flag for all mimg instructions. * shader_recompiler: Convert cube images into 2D arrays. * shader_recompiler: Move image resource functions into sharp type. * shader_recompiler: Use native AMD cube instructions when possible. * specialization: Fix buffer storage mistake.
This commit is contained in:
parent
93402620de
commit
725814ce01
28 changed files with 217 additions and 144 deletions
|
@ -70,14 +70,8 @@ struct ImageResource {
|
|||
bool is_depth{};
|
||||
bool is_atomic{};
|
||||
bool is_array{};
|
||||
bool is_read{};
|
||||
bool is_written{};
|
||||
|
||||
[[nodiscard]] bool IsStorage(const AmdGpu::Image& image) const noexcept {
|
||||
// Need cube as storage when used with ImageRead.
|
||||
return is_written || (is_read && image.GetBoundType() == AmdGpu::ImageType::Cube);
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr AmdGpu::Image GetSharp(const Info& info) const noexcept;
|
||||
};
|
||||
using ImageResourceList = boost::container::small_vector<ImageResource, 16>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue