From 0cbefc1bea703378381afff946e30c27a21f191d Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Wed, 11 Jun 2014 15:33:41 -0400 Subject: [PATCH] gallium: add vertex stream argument to EMIT/ENDPRIM MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák Reviewed-by: Brian Paul Reviewed-by: Roland Scheidegger --- src/gallium/auxiliary/tgsi/tgsi_info.c | 4 ++-- src/gallium/docs/source/tgsi.rst | 8 ++++---- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index d03a920..e2c4e65 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -134,8 +134,8 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] = { 1, 2, 1, 0, 0, 0, OTHR, "TXF", TGSI_OPCODE_TXF }, { 1, 2, 1, 0, 0, 0, OTHR, "TXQ", TGSI_OPCODE_TXQ }, { 0, 0, 0, 0, 0, 0, NONE, "CONT", TGSI_OPCODE_CONT }, - { 0, 0, 0, 0, 0, 0, NONE, "EMIT", TGSI_OPCODE_EMIT }, - { 0, 0, 0, 0, 0, 0, NONE, "ENDPRIM", TGSI_OPCODE_ENDPRIM }, + { 0, 1, 0, 0, 0, 0, NONE, "EMIT", TGSI_OPCODE_EMIT }, + { 0, 1, 0, 0, 0, 0, NONE, "ENDPRIM", TGSI_OPCODE_ENDPRIM }, { 0, 0, 0, 1, 0, 1, NONE, "BGNLOOP", TGSI_OPCODE_BGNLOOP }, { 0, 0, 0, 0, 0, 1, NONE, "BGNSUB", TGSI_OPCODE_BGNSUB }, { 0, 0, 0, 1, 1, 0, NONE, "ENDLOOP", TGSI_OPCODE_ENDLOOP }, diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 2130e08..4213b4a 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -1646,14 +1646,14 @@ in any other type of shader. .. opcode:: EMIT - Emit - Generate a new vertex for the current primitive using the values in the - output registers. + Generate a new vertex for the current primitive into the specified vertex + stream using the values in the output registers. .. opcode:: ENDPRIM - End Primitive - Complete the current primitive (consisting of the emitted vertices), - and start a new one. + Complete the current primitive in the specified vertex stream (consisting of + the emitted vertices), and start a new one. GLSL ISA diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index cac1e0f..b7218ef 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3139,14 +3139,14 @@ void glsl_to_tgsi_visitor::visit(ir_emit_vertex *ir) { assert(this->prog->Target == GL_GEOMETRY_PROGRAM_NV); - emit(ir, TGSI_OPCODE_EMIT); + emit(ir, TGSI_OPCODE_EMIT, undef_dst, st_src_reg_for_int(0)); } void glsl_to_tgsi_visitor::visit(ir_end_primitive *ir) { assert(this->prog->Target == GL_GEOMETRY_PROGRAM_NV); - emit(ir, TGSI_OPCODE_ENDPRIM); + emit(ir, TGSI_OPCODE_ENDPRIM, undef_dst, st_src_reg_for_int(0)); } glsl_to_tgsi_visitor::glsl_to_tgsi_visitor() -- 2.7.4