D3D12: Add helper method for setting both viewport and scissor rect

Simplfies making changes, as well as keeping the two in sync.
This commit is contained in:
Stenzek
2016-02-23 22:18:41 +10:00
parent 13e143de38
commit c4d79d6db3
6 changed files with 49 additions and 129 deletions

View File

@ -152,8 +152,7 @@ void PSTextureEncoder::Encode(u8* dst, u32 format, u32 native_width, u32 bytes_p
const u32 words_per_row = bytes_per_row / sizeof(u32);
D3D12_VIEWPORT vp = { 0.f, 0.f, FLOAT(words_per_row), FLOAT(num_blocks_y), D3D12_MIN_DEPTH, D3D12_MAX_DEPTH };
D3D::current_command_list->RSSetViewports(1, &vp);
D3D::SetViewportAndScissor(0, 0, words_per_row, num_blocks_y);
constexpr EFBRectangle full_src_rect(0, 0, EFB_WIDTH, EFB_HEIGHT);