This adds support for tess factors and tess coord semantics
v2: remove no wm settings for some vars, fix int required for
vertices in, fix tessinner/outer building, handle primid/verticesin
as ints.
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Just add clip dist support for tess shaders.
v2: drop create_swizzled changes no need at this point
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
This takes the tgsi shader properties and emits the correct GLSL
layouts.
It also exports the tes prim and point info to the renderer,
for transform feedback
v2: add prim/point for transform feedback
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
This adds the shader key bits, along with a bunch of the
string handling for tess shaders
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
tess will needs this as well
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
This name makes more sense if we have output blocks
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
With tessellation we can have 32 patch varyings on top of the old limit
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
This was missing the emit line.
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
This is a basic step towards GL4.0 and greater,
add support for the FP64 extension.
This requires ARB_gpu_shader5 on the host, to
implement ldexp using bitfieldInsert.
v2: drop fp64_srcs into local var
fix imul regression due to rebase
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Some shaders seem to set this flag when dual-src is enabled,
we don't want to trash the cbuf1 write in that case.
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
This just cleans this out to a separate fn
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Update the GL blit code to emit correct shaders when integer color
formats are involved.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
iter_instruction is a big function. Let's make it smaller
by moving some functionality.
v2: Fix comment
v3: Four sources again
Signed-off-by: Dave Airlie <airlied@redhat.com>
iter_instruction is a big function. Let's make it smaller
by moving some functionality.
v2: In certain cases, FLOAT_BITS_TO_UINT --> FLOAT_BITS_TO_INT (Elie)
Fix commit message
v3: Allow for multiple destinations again.
[airlied: fix missing dtypeprefix->*dtypeprefix regression]
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit uses the get_string() helper to convert various
enums to prefixes / conversion strings.
v2: In certain cases, FLOAT_BITS_TO_UINT --> FLOAT_BITS_TO_INT (Elie)
[airlied: fixup one more incorrect uint->int for interp sample]
Signed-off-by: Dave Airlie <airlied@redhat.com>
This associates the conversions / casts with enums. The idea is
to make conversion into a string the last step in the process.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This makes sure we never accidentally set a lower glsl version
after a higher one (we don't ever, but best to make sure).
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Followup to the previous patch that introduced bit to string table.
Patchset tested using GLES3 dEQP suite.
Reviewed-by: Dave Airlie <airlied@redhat.com>
[addr%d] could in theory be [addr65536] so needs a few more bytes.
Fixes warning:
vrend_shader.c: In function ‘iter_instruction’:
vrend_shader.c:1861:38: warning: ‘%d’ directive writing between 1 and 6 bytes into a region of size 4 [-Wformat-overflow=]
sprintf(arrayname, "[addr%d]", src->DimIndirect.Index);
^~
vrend_shader.c:1861:32: note: directive argument in the range [-32768, 32767]
sprintf(arrayname, "[addr%d]", src->DimIndirect.Index);
^~~~~~~~~~
vrend_shader.c:1861:13: note: ‘sprintf’ output between 8 and 13 bytes into a destination of size 9
sprintf(arrayname, "[addr%d]", src->DimIndirect.Index);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
v2: drop interp_temp, less special case temps
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This adds the bitfield and multiplies and barrier.
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This adds support for the transform feedback vertex streams
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
We will use the scanner to find a few things needed for ARB_gpu_shader5.
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
OpenGL ES didn't support GL_POINT_SPRITE_COORD_ORIGIN.
So when we read from a fbo, the image is upside down.
This is because the guest renders into a window drawable
which is inverted, while the host renders into a FBO.
This patch inverts the y coordinate.
Fixes: dEQP-GLES2.functional.shaders.builtin_variable.pointcoord
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>