nv50,nvc0: allow to create resources other than buffers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 1 Dec 2015 21:40:45 +0000 (22:40 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 1 Dec 2015 21:55:14 +0000 (22:55 +0100)
commitea33920f7ed3a4100c921db563dc998e0ca24aad
tree65b38fb2b1068969751ab6613fbbfe9f564b992c
parentf391b95105489be58f33991eb49a24d3d509f897
nv50,nvc0: allow to create resources other than buffers

For the compute support, we might stick buffers as surfaces. This fixes
an assertion when executing src/gallium/tests/trivial/compute.

To avoid using these "restricted" surfaces as render targets, these
assertions have been moved. Note that it's already handled for the
framebuffer thing on nvc0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_resource.c
src/gallium/drivers/nouveau/nv50/nv50_state_validate.c
src/gallium/drivers/nouveau/nv50/nv50_surface.c
src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c