rsx: Fixes - #3931
Conversation
| //Redirect parameter 0 to the x2d temp register for TEXBEM | ||
| //TODO: Organize this a little better | ||
| std::pair<std::string, std::string> repl[] = { { "$0", "x2d" } }; | ||
| std::string result = fmt::replace_all(code, repl); |
There was a problem hiding this comment.
copypasta, should have been used in the next line instead of code var
| image_type = type; | ||
| } | ||
|
|
||
| void set_sampler_status(const rsx::texture_sampler_status status) |
There was a problem hiding this comment.
its an enum value so no. Its never used with allocated vars
There was a problem hiding this comment.
I see, const in signature confused me since it's not needed here (see my other comment) and usually considered bad style.
|
|
||
| GLenum remap_values[4]; | ||
|
|
||
| for (u8 channel = 0; channel < 4; ++channel) |
There was a problem hiding this comment.
using u8 just because the loop variable fits in range isn't really beneficial and can have negative performance (especially if it's used in indexing). plain int /unsigned is usually faster. Also, you can use something like int_fast8_t.
| std::vector<rsx_subresource_layout>& subresources_layout, std::pair<std::array<u8, 4>, std::array<u8, 4>>& decoded_remap, bool static_state); | ||
| std::vector<rsx_subresource_layout>& subresources_layout, const std::pair<std::array<u8, 4>, std::array<u8, 4>>& decoded_remap, bool static_state); | ||
|
|
||
| void apply_swizzle_remap(const GLenum target, const std::array<GLenum, 4>& swizzle_remap, const std::pair<std::array<u8, 4>, std::array<u8, 4>>& decoded_remap); |
There was a problem hiding this comment.
const GLenum target
adding const to pass-by value in declaration is meaningless and can bit omitted.
| m_discarded_memory_size = 0; | ||
| } | ||
|
|
||
| VkComponentMapping apply_swizzle_remap(const std::array<VkComponentSwizzle, 4> base_remap, const std::pair<std::array<u8, 4>, std::array<u8, 4>>& remap_vector) |
There was a problem hiding this comment.
do you need to pass base_remap by value here?
|
Winter Star is just worse , less time outs but even less fps ...cant get single ''normal'' render, but that game need spu recompiler for speed anyway more than anything. |
|
the last commit on Semaphore timeout is critical on Nier/Nier Replicant. Game freeze 1 second every time the error appears now and Vulkan crash after a while with error: F {rsx::thread} class std::runtime_error thrown: Assertion Failed! Vulkan API call failed with unrecoverable error: Device lost (Driver crashed with unspecified error or stopped responding and recovered) (VK_ERROR_DEVICE_LOST) |
- Fixes remap vectors for memory copied via blit engine as it has no context
- Handle blit resources in a more consistent way - TODO: Handle some corner cases (piyotama)
- Fixes messed up BG on retroarch glyphs
- Abort nv406e semaphore acquire if the rsx thread stalls/crashes - Fix texture size approximation to take mipmaps into account. Fixes some games hanging with WCB
- Sometimes square renders are done to surfaces with pitch=64 and re-uploaded with swizzle scanning -- This setup avoids discarding targets if they are square and pitch == 64
- Force mipmap count to 1 if sampling from an RTV/DSV - TODO: Better wcb flush detection, it should be better to re-upload the texture after it has been dwnloaded if expected mipmaps are > 1
- Implement BEM - Add LG2 to special instructions
|
@Illynir The two errors seem to be unrelated, but I had to raise the hang detection timeout. 33ms is too short a duration to truly detect if something has gone wrong and attempt a recovery. A more comprehensive solution will be required as well as more tests. @danilaml Critiques noted. The 'const' madness is borne of gcc paranoia (it's all over the texture code) and will need a more thorough set of changes that I will submit in a separate PR. I don't want to wrestle travis with all the other functional changes in the same PR. |









#3913
#3740
#3829
#3768
#2194
#3905