*/
pipe_sampler_view_release(pipe,
&llvmpipe->sampler_views[shader][start + i]);
+ /*
+ * Warn if someone tries to set a view created in a different context
+ * (which is why we need the hack above in the first place).
+ * An assert would be better but st/mesa relies on it...
+ */
+ if (views[i] && views[i]->context != pipe) {
+ debug_printf("Illegal setting of sampler_view %d created in another "
+ "context\n", i);
+ }
pipe_sampler_view_reference(&llvmpipe->sampler_views[shader][start + i],
views[i]);
}
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 */
struct llvmpipe_context *lp = llvmpipe_context(pipe);
boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb);
+ unsigned i;
assert(fb->width <= LP_MAX_WIDTH);
assert(fb->height <= LP_MAX_HEIGHT);
const struct util_format_description *depth_desc =
util_format_description(depth_format);
+ if (lp->framebuffer.zsbuf && lp->framebuffer.zsbuf->context != pipe) {
+ debug_printf("Illegal setting of fb state with zsbuf created in "
+ "another context\n");
+ }
+ for (i = 0; i < fb->nr_cbufs; i++) {
+ if (lp->framebuffer.cbufs[i] &&
+ lp->framebuffer.cbufs[i]->context != pipe) {
+ debug_printf("Illegal setting of fb state with cbuf %d created in "
+ "another context\n", i);
+ }
+ }
+
util_copy_framebuffer_state(&lp->framebuffer, fb);
if (LP_PERF & PERF_NO_DEPTH) {
- pipe_surface_reference(&lp->framebuffer.zsbuf, NULL);
+ pipe_surface_reference(&lp->framebuffer.zsbuf, NULL);
}
/*