diff options
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_drawpixels.c | 16 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_texture.c | 5 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 14 |
4 files changed, 19 insertions, 22 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c index 912241b35..65b444552 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c @@ -1182,12 +1182,9 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, return; } - /* Get the dest renderbuffer. If there's a wrapper, use the - * underlying renderbuffer. - */ - rbDraw = st_renderbuffer(ctx->DrawBuffer->_StencilBuffer); - if (rbDraw->Base.Wrapped) - rbDraw = st_renderbuffer(rbDraw->Base.Wrapped); + /* Get the dest renderbuffer */ + rbDraw = st_renderbuffer(ctx->DrawBuffer-> + Attachment[BUFFER_STENCIL].Renderbuffer); /* this will do stencil pixel transfer ops */ _mesa_readpixels(ctx, srcx, srcy, width, height, @@ -1484,7 +1481,8 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, } else { assert(type == GL_DEPTH); - rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer); + rbRead = st_renderbuffer(ctx->ReadBuffer-> + Attachment[BUFFER_DEPTH].Renderbuffer); color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; fpv = get_depth_stencil_fp_variant(st, GL_TRUE, GL_FALSE); @@ -1496,10 +1494,6 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, /* update fragment program constants */ st_upload_constants(st, fpv->parameters, PIPE_SHADER_FRAGMENT); - - if (rbRead->Base.Wrapped) - rbRead = st_renderbuffer(rbRead->Base.Wrapped); - sample_count = rbRead->texture->nr_samples; /* I believe this would be legal, presumably would need to do a resolve for color, and for depth/stencil spec says to just use one of the diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index 52f654d7d..289ad5114 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -1385,10 +1385,7 @@ st_copy_texsubimage(struct gl_context *ctx, /* determine if copying depth or color data */ if (texBaseFormat == GL_DEPTH_COMPONENT || texBaseFormat == GL_DEPTH_STENCIL) { - strb = st_renderbuffer(fb->_DepthBuffer); - if (strb->Base.Wrapped) { - strb = st_renderbuffer(strb->Base.Wrapped); - } + strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer); } else { /* texBaseFormat == GL_RGB, GL_RGBA, GL_ALPHA, etc */ diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 9e39729e9..457d5d62a 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -222,6 +222,12 @@ void st_init_limits(struct st_context *st) c->UniformBooleanTrue = ~0; c->StripTextureBorder = GL_TRUE; + + c->GLSLSkipStrictMaxUniformLimitCheck = + screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS); + + c->GLSLSkipStrictMaxVaryingLimitCheck = + screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS); } diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 6cc655d70..9ef65c8fd 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1807,27 +1807,27 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) } case ir_binop_lshift: if (native_integers) { - emit(ir, TGSI_OPCODE_SHL, result_dst, op[0]); + emit(ir, TGSI_OPCODE_SHL, result_dst, op[0], op[1]); break; } case ir_binop_rshift: if (native_integers) { - emit(ir, TGSI_OPCODE_ISHR, result_dst, op[0]); + emit(ir, TGSI_OPCODE_ISHR, result_dst, op[0], op[1]); break; } case ir_binop_bit_and: if (native_integers) { - emit(ir, TGSI_OPCODE_AND, result_dst, op[0]); + emit(ir, TGSI_OPCODE_AND, result_dst, op[0], op[1]); break; } case ir_binop_bit_xor: if (native_integers) { - emit(ir, TGSI_OPCODE_XOR, result_dst, op[0]); + emit(ir, TGSI_OPCODE_XOR, result_dst, op[0], op[1]); break; } case ir_binop_bit_or: if (native_integers) { - emit(ir, TGSI_OPCODE_OR, result_dst, op[0]); + emit(ir, TGSI_OPCODE_OR, result_dst, op[0], op[1]); break; } case ir_unop_round_even: @@ -3515,8 +3515,8 @@ glsl_to_tgsi_visitor::eliminate_dead_code_advanced(void) case TGSI_OPCODE_ENDIF: case TGSI_OPCODE_ELSE: - /* Promote the recorded level all channels written inside the preceding - * if or else block to the level above the if/else block. + /* Promote the recorded level of all channels written inside the + * preceding if or else block to the level above the if/else block. */ for (int r = 0; r < this->next_temp; r++) { for (int c = 0; c < 4; c++) { |