diff options
author | Glenn Kennard <[email protected]> | 2014-07-23 11:57:55 +0200 |
---|---|---|
committer | Andreas Boll <[email protected]> | 2014-07-31 11:51:05 +0200 |
commit | b1eb00cd4008e9529f3cbdf0ce8a58aa68e75793 (patch) | |
tree | 8481d0e21d287faa8f529bd9a6ed193b6e6af5b9 /src/gallium/drivers/r600/evergreen_state.c | |
parent | 2768a56f5851c7c2f611ca2a9fb12ad010b608d7 (diff) |
r600g: gpu_shader5 gl_SampleMaskIn support
Map TGSI_SEMANTIC_SAMPLEMASK to register/component.
Enable face register when sample mask is needed by shader.
Requires Evergreen/Cayman
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 45c611e5cc2..608b05b332f 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -2841,8 +2841,14 @@ void evergreen_update_ps_state(struct pipe_context *ctx, struct r600_pipe_shader POSITION goes via GPRs from the SC so isn't counted */ if (rshader->input[i].name == TGSI_SEMANTIC_POSITION) pos_index = i; - else if (rshader->input[i].name == TGSI_SEMANTIC_FACE) - face_index = i; + else if (rshader->input[i].name == TGSI_SEMANTIC_FACE) { + if (face_index == -1) + face_index = i; + } + else if (rshader->input[i].name == TGSI_SEMANTIC_SAMPLEMASK) { + if (face_index == -1) + face_index = i; /* lives in same register, same enable bit */ + } else { ninterp++; if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR) |