Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot size during replay is now configurable #1226

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

panos-lunarg
Copy link
Contributor

@panos-lunarg panos-lunarg commented Aug 14, 2023

Adds two new replay options that controls the screenshot dimensions:

--screenshot-size <width>x<height> explicitly sets the dimensions of the
generated screenshot

--screenshot-scale <number> Scales the swapchain images by that number.
Number can be decimal

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 23008.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3083 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3083 passed.

@panos-lunarg panos-lunarg force-pushed the panos_screenshot_size branch from af377ba to ab9883b Compare August 15, 2023 06:59
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 23738.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3087 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3087 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 29559.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3125 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 29572.

@@ -92,6 +95,10 @@ void ScreenshotHandler::WriteImage(const std::string& filen

VkResult result = VK_SUCCESS;

// If both copy_scale and copy_width are provided, use copy_scale.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the function that calls this function is a better location to do this conditional. That is, receive only copy_width and copy_height in this function and calculate it in functions that call this function.

width = std::stoul(value.substr(0, x));
height = std::stoul(value.substr(x + 1));
}
catch (std::exception& e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If any of these exceptions happened, that means we couldn't parse the screenshot size, right? I think the user probably needs to be warned in each of these cases.

@bradgrantham-lunarg
Copy link
Contributor

Note that you may get a conflict with #1205, so please be cognizant of that PR if it goes in first.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3126 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3126 passed.

@panos-lunarg panos-lunarg force-pushed the panos_screenshot_size branch from 9bfdcdb to 74cbcc4 Compare August 25, 2023 07:56
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 30136.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3133 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3133 passed.

Adds two new replay options that controls the screenshot dimensions:

--screenshot-size <width>x<height> explicitly sets the dimensions of the
generated screenshot

--screenshot-scale <number> Scales the swapchain images by that number.
Number can be decimal
@panos-lunarg panos-lunarg force-pushed the panos_screenshot_size branch from 74cbcc4 to b76260d Compare August 28, 2023 07:39
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 31719.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3141 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3141 passed.

@panos-lunarg panos-lunarg merged commit c6d7c1a into LunarG:dev Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants