i965: Fix HW binding tables editing
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 5 Aug 2015 12:58:46 +0000 (13:58 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Aug 2015 19:57:05 +0000 (20:57 +0100)
commitffadfbf5d076638fa4022106cfe989bc5a145f20
treea4d2f25fccc76b6b71560afdb8661fb9472389c2
parentba651967a201b48f380cd30495e271317c1d8522
i965: Fix HW binding tables editing

Since the introduction of new gl_shader_stages in

commit a2af956963b6bc4d29f37485e44c98008d2ef077
Author: Fabian Bieler <fabianbieler@fastmail.fm>
Date:   Fri Mar 7 10:19:09 2014 +0100

    mesa: add tessellation shader enums

the translation table for the stage into the HW binding table edit
command was broken, and so we used illegal commands. Fix the array
initialisation to be impervious to changes in the gl_shader_stages enum
and add the asserts that would have caught the issue earlier.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_binding_tables.c