r300g: reject resources from handles which are not large enough
authorMarek Olšák <maraeo@gmail.com>
Sat, 24 Jul 2010 01:34:18 +0000 (03:34 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 25 Jul 2010 08:25:21 +0000 (10:25 +0200)
commit065e3f7ff2a9b6170e51b0104036088e8d163ea0
tree04060c79de38bb73937803dd48673c617836f366
parent4ce26210842176c4b280b7db85639ced40d4083d
r300g: reject resources from handles which are not large enough

The driver gets a buffer and its size in resource_from_handle.
It computes the required minimum buffer size from given texture
properties, and compares the two sizes.

This is to early detect DDX bugs.
src/gallium/drivers/r300/r300_context.h
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r300/r300_winsys.h
src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
src/gallium/winsys/radeon/drm/radeon_r300.c