[Mesa-dev] [PATCH] i965: remove redundant NULL check
Kenneth Graunke
kenneth at whitecape.org
Sat May 21 04:44:59 UTC 2016
On Saturday, May 21, 2016 12:06:58 PM PDT Timothy Arceri wrote:
> We would have segfaulted in the above code if prog could be NULL.
> ---
> src/mesa/drivers/dri/i965/brw_gs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/
brw_gs.c
> index 4dddb86..8f5dcf3 100644
> --- a/src/mesa/drivers/dri/i965/brw_gs.c
> +++ b/src/mesa/drivers/dri/i965/brw_gs.c
> @@ -144,7 +144,7 @@ brw_codegen_gs_prog(struct brw_context *brw,
>
> brw_compute_vue_map(brw->intelScreen->devinfo,
> &prog_data.base.vue_map, outputs_written,
> - prog ? prog->SeparateShader : false);
> + prog->SeparateShader);
>
> if (unlikely(INTEL_DEBUG & DEBUG_GS))
> brw_dump_ir("geometry", prog, gs, NULL);
>
Right, prog == NULL should only happen for the TCS (passthrough).
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160520/4e46b0ef/attachment.sig>
More information about the mesa-dev
mailing list