[Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support
Ilia Mirkin
imirkin at alum.mit.edu
Mon Oct 17 14:23:28 UTC 2016
On Mon, Oct 17, 2016 at 10:20 AM, Marek Olšák <maraeo at gmail.com> wrote:
> I'm adding back this:
>
> options->EmitNoMainReturn =
> !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES);
>
> And:
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 293654c..5f28d07 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -4176,7 +4176,9 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
> void
> glsl_to_tgsi_visitor::visit(ir_return *ir)
> {
> - assert(0);
> + assert(!ir->get_value());
> +
> + emit_asm(ir, TGSI_OPCODE_RET);
> }
>
> void
> @@ -4416,7 +4418,8 @@ glsl_to_tgsi_visitor::simplify_cmp(void)
> inst->dst[1].reladdr || inst->dst[1].reladdr2 ||
> tgsi_get_opcode_info(inst->op)->is_branch ||
> inst->op == TGSI_OPCODE_CONT ||
> - inst->op == TGSI_OPCODE_END) {
> + inst->op == TGSI_OPCODE_END ||
> + inst->op == TGSI_OPCODE_RET) {
> break;
> }
>
>
> Hopefully that should restore the RET support.
Thanks. I think that should be enough. I won't be able to test
anything today, in all likelihood, but probably could tomorrow.
Perhaps Samuel will have time to play with it.
-ilia
More information about the mesa-dev
mailing list