diff options
| author | Chris Forbes <chrisforbes@google.com> | 2015-12-30 10:51:01 +1300 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2016-01-14 15:26:03 -0700 |
| commit | 623d7de1c35dd3bd998cbdbbfd317e3457c86e7d (patch) | |
| tree | 0160e75c0a67d053b3b29b8f4ec7e6d28c70a371 | |
| parent | 872fd00561c6b5228a9340f45905f52e40558b68 (diff) | |
| download | usermoji-623d7de1c35dd3bd998cbdbbfd317e3457c86e7d.tar.xz | |
nulldrv: Add more proper support for ShaderModule objects
Again not OK to claim success but return junk rather than a proper handle. Fixes various layers exploding when running against nulldrv.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
| -rw-r--r-- | icd/nulldrv/nulldrv.c | 12 | ||||
| -rw-r--r-- | icd/nulldrv/nulldrv.h | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c index 0403da8c..2c5e3a28 100644 --- a/icd/nulldrv/nulldrv.c +++ b/icd/nulldrv/nulldrv.c @@ -1892,8 +1892,18 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule( const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { - // TODO: Fill in with real data NULLDRV_LOG_FUNC; + + struct nulldrv_dev *dev = nulldrv_dev(device); + struct nulldrv_shader_module *shader_module; + + shader_module = (struct nulldrv_shader_module *) nulldrv_base_create(dev, + sizeof(*shader_module), VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT); + if (!shader_module) + return VK_ERROR_OUT_OF_HOST_MEMORY; + + *pShaderModule = (VkShaderModule) shader_module; + return VK_SUCCESS; } diff --git a/icd/nulldrv/nulldrv.h b/icd/nulldrv/nulldrv.h index 38652587..f933a77a 100644 --- a/icd/nulldrv/nulldrv.h +++ b/icd/nulldrv/nulldrv.h @@ -113,6 +113,10 @@ struct nulldrv_sampler { struct nulldrv_obj obj; }; +struct nulldrv_shader_module { + struct nulldrv_obj obj; +}; + struct nulldrv_pipeline_cache { struct nulldrv_obj obj; }; |
