X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_state_so.c;h=b2afd6fbf702ba202b031cf0aed830af0654762c;hb=c7c59f75e59510be890bc77a9257c14ffd5b7b59;hp=2af04cdf1c3feea02af3bad948ded5420e193619;hpb=dfa25ea5cd19d5a050a1c94bd7370a2259b9f007;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_state_so.c b/src/gallium/drivers/llvmpipe/lp_state_so.c index 2af04cdf1c3..b2afd6fbf70 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_so.c +++ b/src/gallium/drivers/llvmpipe/lp_state_so.c @@ -70,6 +70,15 @@ llvmpipe_set_so_targets(struct pipe_context *pipe, int i; for (i = 0; i < num_targets; i++) { const boolean append = (offsets[i] == (unsigned)-1); + /* + * Warn if the so target was created in another context. + * XXX Not entirely sure if mesa/st may rely on this? + * Otherwise should just assert. + */ + if (targets[i] && targets[i]->context != pipe) { + debug_printf("Illegal setting of so target with target %d created in " + "another context\n", i); + } pipe_so_target_reference((struct pipe_stream_output_target **)&llvmpipe->so_targets[i], targets[i]); /* If we're not appending then lets set the internal offset to what was requested */