X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi965%2Fbrw_gs.c;h=9683fc61fdd9eb5aff29f1413ee6f0f4a9e2522c;hb=e374809819d82f2e3e946fe809c4d46061ddc5b5;hp=3882c06b75cae525de5a0772f3a54c4fad80ebeb;hpb=32e16e23377ecbba7783e33428ebb4575b874fe5;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 3882c06b75c..9683fc61fdd 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -1,8 +1,8 @@ /* Copyright (C) Intel Corp. 2006. All Rights Reserved. - Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to + Intel funded Tungsten Graphics to develop this 3D driver. - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including @@ -10,11 +10,11 @@ distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -22,13 +22,13 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + **********************************************************************/ /* * Authors: - * Keith Whitwell + * Keith Whitwell */ - + #include "main/glheader.h" #include "main/macros.h" #include "main/enums.h" @@ -54,13 +54,13 @@ static void compile_ff_gs_prog(struct brw_context *brw, GLuint program_size; memset(&c, 0, sizeof(c)); - + c.key = *key; c.vue_map = brw->vs.prog_data->base.vue_map; c.nr_regs = (c.vue_map.num_slots + 1)/2; mem_ctx = ralloc_context(NULL); - + /* Begin the compilation: */ brw_init_compile(brw, &c.func, mem_ctx); @@ -68,9 +68,9 @@ static void compile_ff_gs_prog(struct brw_context *brw, c.func.single_program_flow = 1; /* For some reason the thread is spawned with only 4 channels - * unmasked. + * unmasked. */ - brw_set_mask_control(&c.func, BRW_MASK_DISABLE); + brw_set_default_mask_control(&c.func, BRW_MASK_DISABLE); if (brw->gen >= 6) { unsigned num_verts; @@ -128,18 +128,16 @@ static void compile_ff_gs_prog(struct brw_context *brw, } } + brw_compact_instructions(&c.func, 0, 0, NULL); + /* get the program */ program = brw_get_program(&c.func, &program_size); if (unlikely(INTEL_DEBUG & DEBUG_GS)) { - int i; - - printf("gs:\n"); - for (i = 0; i < program_size / sizeof(struct brw_instruction); i++) - brw_disasm(stdout, &((struct brw_instruction *)program)[i], - brw->gen); - printf("\n"); + fprintf(stderr, "gs:\n"); + brw_disassemble(brw, c.func.store, 0, program_size, stderr); + fprintf(stderr, "\n"); } brw_upload_cache(&brw->cache, BRW_FF_GS_PROG, @@ -187,7 +185,7 @@ static void populate_key(struct brw_context *brw, /* BRW_NEW_TRANSFORM_FEEDBACK */ if (_mesa_is_xfb_active_and_unpaused(ctx)) { const struct gl_shader_program *shaderprog = - ctx->Shader.CurrentVertexProgram; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; const struct gl_transform_feedback_info *linked_xfb_info = &shaderprog->LinkedTransformFeedback; int i;