diff options
author | Tim Rowley <[email protected]> | 2016-08-05 16:42:24 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-08-10 11:08:40 -0500 |
commit | ad153189ec3fb16fdca2666e0bfe2b88d31ebb70 (patch) | |
tree | 78d4008671c4b12bac16b9ff934f198493255084 /src/gallium/drivers/swr/swr_state.cpp | |
parent | d86e2487a0fb3b3d1f88a07d0eff723f3b30c737 (diff) |
swr: [rasterizer core] viewport array support
Change viewport matrix storage from AOS to SOA to support viewport arrays.
Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r-- | src/gallium/drivers/swr/swr_state.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index 2df79855358..de41ddc704d 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -944,7 +944,7 @@ swr_update_derived(struct pipe_context *pipe, pipe_rasterizer_state *rasterizer = ctx->rasterizer; SWR_VIEWPORT *vp = &ctx->derived.vp; - SWR_VIEWPORT_MATRIX *vpm = &ctx->derived.vpm; + SWR_VIEWPORT_MATRICES *vpm = &ctx->derived.vpm; vp->x = state->translate[0] - state->scale[0]; vp->width = state->translate[0] + state->scale[0]; @@ -958,12 +958,12 @@ swr_update_derived(struct pipe_context *pipe, vp->maxZ = state->translate[2] + state->scale[2]; } - vpm->m00 = state->scale[0]; - vpm->m11 = state->scale[1]; - vpm->m22 = state->scale[2]; - vpm->m30 = state->translate[0]; - vpm->m31 = state->translate[1]; - vpm->m32 = state->translate[2]; + vpm->m00[0] = state->scale[0]; + vpm->m11[0] = state->scale[1]; + vpm->m22[0] = state->scale[2]; + vpm->m30[0] = state->translate[0]; + vpm->m31[0] = state->translate[1]; + vpm->m32[0] = state->translate[2]; /* Now that the matrix is calculated, clip the view coords to screen * size. OpenGL allows for -ve x,y in the viewport. */ |