diff options
author | Kenneth Graunke <[email protected]> | 2017-09-14 22:59:21 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-09-21 09:39:32 -0700 |
commit | ef719f4fd253161843abf2749ae5220f502caa51 (patch) | |
tree | 58ee46eedf817f4912af639ad6305c1c4079b40e /src/mesa | |
parent | 6d6fae95a360aebcda92b1c0c8ab22a923bc3f54 (diff) |
i965: Force outputs_written to contain varyings needed by stream-out.
If transform feedback is recording a varying, it needs a slot in the
VUE map, regardless of whether or not the shader writes it.
Together with the previous patch, this fixes:
- KHR-GL45.enhanced_layouts.xfb_capture_struct
The test captures a structure where the vertex shader writes the first
and third members - but the second still needs a slot.
Reviewed-by: Juan A. Suarez Romero <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_link.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index a1082a7a05a..c0fda0d4799 100644 --- a/src/mesa/drivers/dri/i965/brw_link.cpp +++ b/src/mesa/drivers/dri/i965/brw_link.cpp @@ -181,7 +181,8 @@ unify_interfaces(struct shader_info **infos) } static void -update_xfb_info(struct gl_transform_feedback_info *xfb_info) +update_xfb_info(struct gl_transform_feedback_info *xfb_info, + struct shader_info *info) { if (!xfb_info) return; @@ -210,6 +211,8 @@ update_xfb_info(struct gl_transform_feedback_info *xfb_info) output->ComponentOffset = 3; break; } + + info->outputs_written |= 1ull << output->OutputRegister; } } @@ -236,8 +239,6 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) prog->ShadowSamplers = shader->shadow_samplers; _mesa_update_shader_textures_used(shProg, prog); - update_xfb_info(prog->sh.LinkedTransformFeedback); - bool debug_enabled = (INTEL_DEBUG & intel_debug_flag_for_shader_stage(shader->Stage)); @@ -252,6 +253,8 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) compiler->scalar_stage[stage]); infos[stage] = &prog->nir->info; + update_xfb_info(prog->sh.LinkedTransformFeedback, infos[stage]); + /* Make a pass over the IR to add state references for any built-in * uniforms that are used. This has to be done now (during linking). * Code generation doesn't happen until the first time this shader is |