radv: fix detecting invalid binaries with ESO
On GFX9+, if linked shaders are created and shaders are merged (for example VS to GS). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27301>
This commit is contained in:

committed by
Marge Bot

parent
3304c6ca01
commit
d9b61de2f7
@@ -301,8 +301,9 @@ radv_shader_object_init(struct radv_shader_object *shader_obj, struct radv_devic
|
||||
shader_obj->dynamic_offset_count = layout.dynamic_offset_count;
|
||||
|
||||
if (pCreateInfo->codeType == VK_SHADER_CODE_TYPE_BINARY_EXT) {
|
||||
if (pCreateInfo->codeSize < SHA1_DIGEST_LENGTH + VK_UUID_SIZE + 1)
|
||||
if (pCreateInfo->codeSize < VK_UUID_SIZE + sizeof(uint32_t)) {
|
||||
return VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT;
|
||||
}
|
||||
|
||||
struct blob_reader blob;
|
||||
blob_reader_init(&blob, pCreateInfo->pCode, pCreateInfo->codeSize);
|
||||
|
Reference in New Issue
Block a user