panfrost: Handle empty shaders
I didn't realize this was in spec, but it fixes a crash in shaderdb. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3125>
This commit is contained in:
parent
35418f6770
commit
bf5d8cfd28
|
@ -77,9 +77,14 @@ panfrost_shader_compile(
|
|||
* I bet someone just thought that would be a cute pun. At least,
|
||||
* that's how I'd do it. */
|
||||
|
||||
state->bo = panfrost_bo_create(screen, size, PAN_BO_EXECUTE);
|
||||
memcpy(state->bo->cpu, dst, size);
|
||||
meta->shader = state->bo->gpu | program.first_tag;
|
||||
if (size) {
|
||||
state->bo = panfrost_bo_create(screen, size, PAN_BO_EXECUTE);
|
||||
memcpy(state->bo->cpu, dst, size);
|
||||
meta->shader = state->bo->gpu | program.first_tag;
|
||||
} else {
|
||||
/* no shader */
|
||||
meta->shader = 0x0;
|
||||
}
|
||||
|
||||
util_dynarray_fini(&program.compiled);
|
||||
|
||||
|
|
Loading…
Reference in New Issue