nv50, nvc0: initialize ctx->sample_mask to ~0
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 12 Jan 2014 20:01:29 +0000 (15:01 -0500)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Thu, 16 Jan 2014 18:26:05 +0000 (19:26 +0100)
Commit 95bf222603b (cso_context: Fix cso_context::sample_mask initial
value.) fixed the cso sample mask to be initialized to ~0. The cso code
is also careful not to needlessly call set_sample_mask, so we ended up
with the ctx->sample_mask never being set. This broke a number of
EXT_framebuffer_multisample piglit tests.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_state.c
src/gallium/drivers/nouveau/nvc0/nvc0_state.c

index b6a180ef22f73e50a8c8774e2ac5cb7372752e33..87dd07f9c010df58cf74b81d9b48347b4ac60e05 100644 (file)
@@ -1123,4 +1123,6 @@ nv50_init_state_functions(struct nv50_context *nv50)
    pipe->create_stream_output_target = nv50_so_target_create;
    pipe->stream_output_target_destroy = nv50_so_target_destroy;
    pipe->set_stream_output_targets = nv50_set_stream_output_targets;
+
+   nv50->sample_mask = ~0;
 }
index 4b8632a33d77ea8ccd24926a37e7102a83709482..0213a8e22acfd5df7b243928263313a6a2ee9114 100644 (file)
@@ -1229,4 +1229,6 @@ nvc0_init_state_functions(struct nvc0_context *nvc0)
    pipe->set_global_binding = nvc0_set_global_bindings;
    pipe->set_compute_resources = nvc0_set_compute_resources;
    pipe->set_shader_resources = nvc0_set_shader_resources;
+
+   nvc0->sample_mask = ~0;
 }