i965g: Fix assertions that were always true.
authorVinson Lee <vlee@vmware.com>
Sun, 21 Feb 2010 09:19:47 +0000 (01:19 -0800)
committerVinson Lee <vlee@vmware.com>
Sun, 21 Feb 2010 09:19:47 +0000 (01:19 -0800)
commit0b83f48e8263ab9ea7c30a929f1d5764b9c61d2a
tree1a0ce87f456d8011192ffbf2a1be7cd5262d7020
parentd1aafb33b5193db351ece5887edad1c908cbf36b
i965g: Fix assertions that were always true.

The surface_format field is 9 bits wide which has a maximum value
of 511. BRW_SURFACEFORMAT_INVALID has a value of 4095 which exceeds
the width of the surface_format field.

This patch asserts that the format is not BRW_SURFACEFORMAT_INVALID
before assignment to the surface_format field.
src/gallium/drivers/i965/brw_screen_texture.c