[GPU/D3D12] Letterboxing cropping to action-safe area

This commit is contained in:
Triang3l
2020-09-05 17:47:32 +03:00
parent 52efbcf741
commit 0be0eb2b38
5 changed files with 154 additions and 34 deletions

View File

@@ -272,6 +272,14 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
TraceWriter& trace_writer, uint32_t resolution_scale,
bool edram_16_as_minus_1_to_1, ResolveInfo& info_out);
// Taking user configuration - stretching or letterboxing, overscan region to
// crop to fill while maintaining the aspect ratio - into account, returns the
// area where the frame should be presented in the host window.
void GetPresentArea(uint32_t source_width, uint32_t source_height,
uint32_t window_width, uint32_t window_height,
int32_t& target_x_out, int32_t& target_y_out,
uint32_t& target_width_out, uint32_t& target_height_out);
} // namespace draw_util
} // namespace gpu
} // namespace xe