tgsi_to_nir: handle PIPE_FORMAT_NONE in image opcodes

radeonsi doesn't use the format and internal shaders don't set it.

Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
(cherry picked from commit f704fb7f0b)
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2112
This commit is contained in:
Marek Olšák 2019-09-16 21:19:44 -04:00 committed by Dylan Baker
parent 2353a63a58
commit 0e7e56aa2f

View file

@ -1727,6 +1727,9 @@ static GLenum
get_image_format(struct tgsi_full_instruction *tgsi_inst)
{
switch (tgsi_inst->Memory.Format) {
case PIPE_FORMAT_NONE:
return GL_NONE;
case PIPE_FORMAT_R8_UNORM:
return GL_R8;
case PIPE_FORMAT_R8G8_UNORM: