Create a bunch of temp arrays based on the input TGSI
ranges. Otherwise the temps code triggers a lack of
some passes in the mesa GLSL compiler.
A large shader from shadertoy triggered 1m30s compile in mesa
due to the large temp array.
Reported-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This updates the tgsi code from mesa, it introduces
changes necessary to deal with tessellation and doubles.
It also drops an unused saturate feature, which we didn't
use anyways.
I'm not sure this is 100% complete, piglit fbo-alpha now passes.
This was a guess as to why gnome-shell was broken, but I don't think
it was the correct one.
- virgl maps VIRGL_FORMAT_B8G8R8X8_UNORM to GL_RGBA8
- _mesa_choose_tex_format() maps GL_RGBA8 to
MESA_FORMAT_R8G8B8A8_UNORM or MESA_FORMAT_A8B8G8R8_UNORM or
MESA_FORMAT_B8G8R8A8_UNORM.
- it ends up in (gl_texture_image *)img->TexFormat
- then in intel (_DRIImage *) image->format.
- on create image, image->dri_format = driGLFormatToImageFormat() (to
ex: MESA_FORMAT_R8G8B8A8_UNORM -> __DRI_IMAGE_FORMAT_ABGR8888)
- on query, intel_lookup_fourcc() -> __DRI_IMAGE_FOURCC_ABGR8888 == GBM_FORMAT_ABGR8888.
For some reason, driGLFormatToImageFormat() doesn't map
MESA_FORMAT_A8B8G8R8_UNORM, so I only check the two possible values I
could find.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
the protocol failed to handle larger shaders, this allow
the renderer to reassemble large shaders and recombined
the chunks before passing them to the GLSL translation.
This also enhances the renderer protocol to allow
for some more info in the shader object, and removes
the separate vs/gs/fs variants in favour of a type field
in the shader.
This code ended up in the other file and really wasn't necessary
there.
Remove the transfer code from virglrenderer.c, move into main
renderer file, and match it with the corresponding transfer
reader.
This should at least fix the crash in compressed textures
with ARB_get_texture_sub_image
This might have some fallout but my HSW doesn't expose this due
to some kernel restrictions, so we should handle the situation
and not call TF2 functions