It's not really OK to claim success but leave junk in the caller's memory rather than a real handle. This prevents object tracker randomly exploding when running against the null driver.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
{
NULLDRV_LOG_FUNC;
+
+ struct nulldrv_dev *dev = nulldrv_dev(device);
+ struct nulldrv_pipeline_cache *pipeline_cache;
+
+ pipeline_cache = (struct nulldrv_pipeline_cache *) nulldrv_base_create(dev,
+ sizeof(*pipeline_cache), VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT);
+ if (!pipeline_cache)
+ return VK_ERROR_OUT_OF_HOST_MEMORY;
+
+ *pPipelineCache = (VkPipelineCache) pipeline_cache;
+
return VK_SUCCESS;
}
struct nulldrv_obj obj;
};
+struct nulldrv_pipeline_cache {
+ struct nulldrv_obj obj;
+};
+
struct nulldrv_img_view {
struct nulldrv_obj obj;
struct nulldrv_img *img;