diff options
author | Marek Olšák <[email protected]> | 2014-11-08 15:30:54 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-11-16 01:28:24 +0100 |
commit | 717f2dd69fadc8ba07b0b8f4612f28a547fb7a4c (patch) | |
tree | 5490538ecff778b1037539e200e95f207f6cb22f /src/gallium/auxiliary/util/u_simple_shaders.c | |
parent | ad54b01896c157757bb7440e82bd42bfc2b927a2 (diff) |
gallium/util: add a window_space option to the passthrough vertex shader
Tested-by: Nick Sarnie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_simple_shaders.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_simple_shaders.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index adf4887d5cd..280ed8f4cb9 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -59,11 +59,13 @@ void * util_make_vertex_passthrough_shader(struct pipe_context *pipe, uint num_attribs, const uint *semantic_names, - const uint *semantic_indexes) + const uint *semantic_indexes, + bool window_space) { return util_make_vertex_passthrough_shader_with_so(pipe, num_attribs, semantic_names, - semantic_indexes, NULL); + semantic_indexes, + window_space, NULL); } void * @@ -71,6 +73,7 @@ util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe, uint num_attribs, const uint *semantic_names, const uint *semantic_indexes, + bool window_space, const struct pipe_stream_output_info *so) { struct ureg_program *ureg; @@ -80,6 +83,9 @@ util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe, if (ureg == NULL) return NULL; + if (window_space) + ureg_property_vs_window_space_position(ureg, TRUE); + for (i = 0; i < num_attribs; i++) { struct ureg_src src; struct ureg_dst dst; |