OSDN Git Service

svga: handle mismatched number of samplers, sampler views
authorBrian Paul <brianp@vmware.com>
Fri, 15 Jul 2016 13:08:13 +0000 (07:08 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 15 Jul 2016 17:05:18 +0000 (11:05 -0600)
commit50a669de4e216d2e3bea3ec1148c7e79f77ecb27
treecd31ee13b79761bbfb958da7e56e6cb8c6ec5300
parentb9d10e79c88842ba05d6937a3803cb5740b866da
svga: handle mismatched number of samplers, sampler views

in svga_init_shader_key_common().  Since the CSO module only tracks
sampler views for fragment shaders, the number of samplers and sampler
views can be mismatched for other types of shaders.  This situation
triggered an assertion in Chrome with maps.google.com

This patch adds defensive code to handle that situation.

Fixes VMware bug 1694027
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_shader.c