anv: pipeline cache: fix return value of vkGetPipelineCacheData
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 7 Oct 2016 16:16:55 +0000 (17:16 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 7 Oct 2016 17:46:12 +0000 (18:46 +0100)
commiteb23de61162d83238e0a93ff10e3f6bdafb364fb
treeb25829292aab24a09f4f41b01fb8a4be03cdf8f4
parent965ebc8b286afee827b820479cc1714a2aeb46cc
anv: pipeline cache: fix return value of vkGetPipelineCacheData

According to the spec - 9.6. Pipeline Cache :

  If pDataSize is less than the maximum size that can be retrieved by the
  pipeline cache, at most pDataSize bytes will be written to pData, and
  vkGetPipelineCacheData will return VK_INCOMPLETE.

Fixes the following test from Vulkan CTS :

  dEQP-VK.pipeline.cache.pipeline_from_incomplete_get_data.vertex_stage_fragment_stage
  dEQP-VK.pipeline.cache.pipeline_from_incomplete_get_data.vertex_stage_geometry_stage_fragment_stage
  dEQP-VK.pipeline.cache.misc_tests.invalid_size_test

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_pipeline_cache.c