Implement RenderPassEncoder::SetViewport: impl on backends

Implement SetViewport on the rest backends: D3D12 and Metal

BUG=dawn:53
TEST=dawn_end2end_tests

Change-Id: I2e552867080eb8c35db641d1a61b0341d2a0a048
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9020
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Yunchao He
2019-07-19 21:57:39 +00:00
committed by Commit Bot service account
parent 472bd1ec29
commit c0b8132f55
4 changed files with 28 additions and 3 deletions

View File

@@ -811,8 +811,7 @@ namespace dawn_native { namespace opengl {
case Command::SetViewport: {
SetViewportCmd* cmd = mCommands.NextCommand<SetViewportCmd>();
gl.Viewport(static_cast<int>(cmd->x), static_cast<int>(cmd->y),
static_cast<int>(cmd->width), static_cast<int>(cmd->height));
gl.ViewportIndexedf(0, cmd->x, cmd->y, cmd->width, cmd->height);
gl.DepthRangef(cmd->minDepth, cmd->maxDepth);
} break;