mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Vulkan scissor fix (validation errors).
This commit is contained in:
parent
85ac0f8856
commit
5876388c65
2 changed files with 14 additions and 5 deletions
|
@ -185,13 +185,22 @@ public:
|
|||
|
||||
// Clamp to curWidth_/curHeight_. Apparently an issue.
|
||||
if ((int)(rc.offset.x + rc.extent.width) > curWidth_) {
|
||||
rc.extent.width = curWidth_ - rc.offset.x;
|
||||
int newWidth = curWidth_ - rc.offset.x;
|
||||
rc.extent.width = std::max(1, newWidth);
|
||||
if (rc.offset.x >= curWidth_) {
|
||||
// Fallback.
|
||||
rc.offset.x = curWidth_ - rc.extent.width;
|
||||
}
|
||||
}
|
||||
|
||||
if ((int)(rc.offset.y + rc.extent.height) > curHeight_) {
|
||||
rc.extent.height = curHeight_ - rc.offset.y;
|
||||
int newHeight = curHeight_ - rc.offset.y;
|
||||
rc.extent.height = std::max(1, newHeight);
|
||||
if (rc.offset.y >= curHeight_) {
|
||||
// Fallback.
|
||||
rc.offset.y = curHeight_ - rc.extent.height;
|
||||
}
|
||||
}
|
||||
_dbg_assert_((int)(rc.offset.x + rc.extent.width) <= curWidth_);
|
||||
_dbg_assert_((int)(rc.offset.y + rc.extent.height) <= curHeight_);
|
||||
curRenderArea_.Apply(rc);
|
||||
|
||||
VkRenderData data{ VKRRenderCommand::SCISSOR };
|
||||
|
|
|
@ -83,7 +83,7 @@ void LoadPostShaderInfo(const std::vector<Path> &directories) {
|
|||
std::vector<File::FileInfo> fileInfo;
|
||||
VFSGetFileListing(directories[d].c_str(), &fileInfo, "ini:");
|
||||
|
||||
if (fileInfo.size() == 0) {
|
||||
if (fileInfo.empty()) {
|
||||
File::GetFilesInDir(directories[d], &fileInfo, "ini:");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue