[virglrenderer-devel] [PATCH] Fixes dEQP-GLES2.functional.shaders.return.output_write_dynamic_verte test. Calls emmit_prescale before return in vertex shader.
Dave Airlie
airlied at gmail.com
Wed Feb 21 02:25:42 UTC 2018
On 21 February 2018 at 10:42, <tutankhamen at chromium.org> wrote:
> From: Robert Tarasov <tutankhamen at chromium.org>
While I think this is correct, I don't think it is sufficient,
Is returning meant to act like goto the end of the shader?
Then we should handle all things TGSI_OPCODE_END handles
for whatever shaders use return.
I suggest some refactoring of the code into a shared function might help.
Dave.
>
> diff --git src/vrend_shader.c src/vrend_shader.c
> index 88784bf..750a157 100644
> --- src/vrend_shader.c
> +++ src/vrend_shader.c
> @@ -2009,6 +2009,12 @@ iter_instruction(struct tgsi_iterate_context *iter,
> return FALSE;
> break;
> case TGSI_OPCODE_RET:
> + if (iter->processor.Processor == TGSI_PROCESSOR_VERTEX) {
> + if (!ctx->key->gs_present) {
> + ret = emit_prescale(ctx);
> + }
> + }
> +
> EMIT_BUF_WITH_RET(ctx, "return;\n");
> break;
> case TGSI_OPCODE_ARL:
> _______________________________________________
> virglrenderer-devel mailing list
> virglrenderer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel
More information about the virglrenderer-devel
mailing list