From e81aaeba37f5419323d8f88bc10943c77e25ed14 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 20 Oct 2016 14:24:03 +1100 Subject: r200/i915/st/mesa/compiler: use common inputs read field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And set set inputs_read directly in shader_info. To avoid regressions between changes this change is a squashed version of the following patches. st/mesa changes where: Reviewed-by: Marek Olšák Reviewed-by: Jason Ekstrand --- src/mesa/vbo/vbo_attrib.h | 2 +- src/mesa/vbo/vbo_exec_draw.c | 6 ++++-- src/mesa/vbo/vbo_save_draw.c | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src/mesa/vbo') diff --git a/src/mesa/vbo/vbo_attrib.h b/src/mesa/vbo/vbo_attrib.h index 7b7d87af5e4..5ee77fe1920 100644 --- a/src/mesa/vbo/vbo_attrib.h +++ b/src/mesa/vbo/vbo_attrib.h @@ -79,7 +79,7 @@ enum { VBO_ATTRIB_GENERIC14 = 31, VBO_ATTRIB_GENERIC15 = 32, - /* XXX: in the vertex program InputsRead flag, we alias + /* XXX: in the vertex program inputs_read flag, we alias * materials and generics and use knowledge about the program * (whether it is a fixed-function emulation) to * differentiate. Here we must keep them apart instead. diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 19114daa6ad..3d1b2f71648 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -211,8 +211,10 @@ vbo_exec_bind_arrays( struct gl_context *ctx ) * glVertexAttrib(0, val) calls to feed into the GENERIC0 input. * The original state gets essentially restored below. */ - if ((ctx->VertexProgram._Current->InputsRead & VERT_BIT_POS) == 0 && - (ctx->VertexProgram._Current->InputsRead & VERT_BIT_GENERIC0)) { + if ((ctx->VertexProgram._Current->info.inputs_read & + VERT_BIT_POS) == 0 && + (ctx->VertexProgram._Current->info.inputs_read & + VERT_BIT_GENERIC0)) { swap_pos = true; exec->vtx.inputs[VERT_ATTRIB_GENERIC0] = exec->vtx.inputs[0]; exec->vtx.attrsz[VERT_ATTRIB_GENERIC0] = exec->vtx.attrsz[0]; diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index cb68e1d2583..2aa00952037 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -174,8 +174,10 @@ static void vbo_bind_vertex_list(struct gl_context *ctx, * In that case we effectively need to route the data from * glVertexAttrib(0, val) calls to feed into the GENERIC0 input. */ - if ((ctx->VertexProgram._Current->InputsRead & VERT_BIT_POS) == 0 && - (ctx->VertexProgram._Current->InputsRead & VERT_BIT_GENERIC0)) { + if ((ctx->VertexProgram._Current->info.inputs_read & + VERT_BIT_POS) == 0 && + (ctx->VertexProgram._Current->info.inputs_read & + VERT_BIT_GENERIC0)) { save->inputs[VERT_ATTRIB_GENERIC0] = save->inputs[0]; node_attrsz[VERT_ATTRIB_GENERIC0] = node_attrsz[0]; node_attrtype[VERT_ATTRIB_GENERIC0] = node_attrtype[0]; -- cgit v1.2.3