[Mesa-dev] [PATCH] etnaviv: Reset indexed rendering information when not rendering indexed
Lucas Stach
l.stach at pengutronix.de
Fri Jul 14 15:27:20 UTC 2017
Am Freitag, den 14.07.2017, 13:26 +0200 schrieb Wladimir J. van der
Laan:
> A dangling bo object would result in memory corruption while
> loading a level in ioquake3_opengl2.
>
> Fixes a problem introduced in 330d0607ed60fd3edca192e54b4246310f06652f.
> Fix suggested by Lucas Stach.
>
> Signed-off-by: Wladimir J. van der Laan <laanwj at gmail.com>
I've adjusted the code and commit message slightly and pushed this out.
Regards,
Lucas
> ---
> src/gallium/drivers/etnaviv/etnaviv_context.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
> index e759095..3437906 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_context.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c
> @@ -198,6 +198,12 @@ etna_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
> BUG("Unsupported or no index buffer");
> return;
> }
> + } else {
> + ctx->index_buffer.FE_INDEX_STREAM_BASE_ADDR.bo = 0;
> + ctx->index_buffer.FE_INDEX_STREAM_BASE_ADDR.offset = 0;
> + ctx->index_buffer.FE_INDEX_STREAM_BASE_ADDR.flags = 0;
> + ctx->index_buffer.FE_INDEX_STREAM_CONTROL = 0;
> + ctx->dirty |= ETNA_DIRTY_INDEX_BUFFER;
> }
>
> struct etna_shader_key key = {};
More information about the mesa-dev
mailing list