Autotools is deprecated since debb6e6ac4
It's now time to drop it definitively.
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
These formats are supported and required by GLES3. Without these
formats, guest MESA uses uncompressed formats to emulate them
while formats like GL_R16 are not available on GPU like MALI.
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Using testing will need continued updates of the basic build scripts and
sometimes packages might even not be available, so lets switch to buster
and buster-backports.
v2: Fix include directory declaration
Closes: #147
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
In order to keep the changes limited and not go out of sync with Gallium
too much the old PIPE_FORMAT* are replaced with defines to their
VIRGL_FORMAT* counterparts and pipe_format becomes a typedef
of "enum virgl_formats".
v2: Add 'src' to includes in meson.build
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
For this introduce a NDEBUG_UNUSED macro
v2: Replace NDEBUG_UNUSED with MAYBE_UNUSED (Emil)
Silence unused warnings only if NDEBUG is defined
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This patch adds the meson build system as alternative to the
autotools build system.
v2: Thanks to Alexandros for his comments that lead to the following changes:
- Fix logic for platforms so that the ones selected by 'auto' don't
fail if the dependencies are missing, but fail when explicitely
requested
- declare project version differently
- set a minimun meson version
- clean up some braces
- reformat some code
- squesh remaining separate patches
v3: require meson 0.46 (Gurchetan)
v4: set minimum gbm version to 18.0.0
v5: - fix gbm version requirement (Gurchetan)
- don't duplicate glx files (Gurchetan)
Fixes: #129
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
That helps the code checker to see whether all switch cases are used.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
There's no poin t in keeping u_format_pack.py around just to declare
this one function. Let's move it into where it's used.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This makes this code a bit simpler to follow.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This code never gets called from anywhere, so let's get rid of it.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
We already removed the high-level format-conversion code from our
gallium sources, so there's no point in keeping this code around.
It's not included nor compiled, so it's just cruft right now.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
These functions was removed years ago, keeping the prototypes just leads
to confusion. Let's rip them out as well.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Some varying outputs can be directly used for tranform feedback, so don't
emit an additional varying in these cases. This should save a move
instruction and also reduces the possibility of hitting the output varying
limit.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-By: Gurchetan Singh <gurchetansingh@chromium.org>
This is a GLES only extension and the format is also only supported
on a GLES host.
Enables and passes on a host that supports it:
dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8*
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.*
Closes: #49
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
findLSB, findMSB, and countBits always return a signed integer
Fixes:
dEQP-GLES31.functional.shaders.builtin_functions.uniform.findLSBMinusOne.*
dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.*
dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.*
Changes resulting from the discussion on mesa-dev with
Roland Schneidegger:
v2: Set values in infer_(src|dst)_type only
v3: Set values in the common infer_type code path, and only add
the source type for UMSB
Signed-off-by: Gert Wollny gert.wollny@collabora.com
Reviewed-by: Dave Airlie <airlied@redhat.com>
Only decorate function as noreturn when DEBUG is not defined, because
when compiled in DEBUG mode the function actually executes an int3 and
may return, fixes:
u_debug.c: In function '_debug_assert_fail':
u_debug.c:309:1: warning: 'noreturn' function does return
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
tgsi_scan.c:37:0:
tgsi_scan.c: In function 'tgsi_scan_shader':
tgsi_scan.c:212:46: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
assert(src->Register.Index < Elements(info->is_msaa_sampler));
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Change the type of util_cpu_caps::nr_cpus to int because sysconfig
returns a signed value, fixes:
u_cpu_detect.c: In function 'util_cpu_detect':
u_cpu_detect.c:317:30: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (util_cpu_caps.nr_cpus == -1)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
u_debug_describe.c: In function 'debug_describe_reference':
u_debug_describe.c:33:65: warning: unused parameter 'ptr' [-Wunused-
parameter]
debug_describe_reference(char* buf, const struct pipe_reference*ptr)
u_format.c: In function 'util_format_is_float':
u_format.c:57:10: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (i == -1) {
v2: Replace VREND_UNUSED by UNUSED (Erik)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
tgsi_ureg.c: In function 'ureg_DECL_sampler':
tgsi_ureg.c:601:34: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ureg->sampler[i].Index == nr)
^~
tgsi_ureg.c: In function 'validate':
tgsi_ureg.c:908:32: warning: unused parameter 'opcode' [-Wunused-
parameter]
static void validate( unsigned opcode,
^~~~~~
tgsi_ureg.c:909:32: warning: unused parameter 'nr_dst' [-Wunused-
parameter]
unsigned nr_dst,
^~~~~~
tgsi_ureg.c:910:32: warning: unused parameter 'nr_src' [-Wunused-
parameter]
unsigned nr_src )
^~~~~~
tgsi_ureg.c: In function 'emit_decls':
tgsi_ureg.c:1335:31: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ureg->properties[i] != ~0)
^~
tgsi_ureg.c: In function 'ureg_create':
tgsi_ureg.c:1594:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for (i = 0; i < ARRAY_SIZE(ureg->properties); i++)
^
v2: Replace VREND_UNUSED by UNUSED (Erik)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
tgsi_ureg.c: In function 'ureg_DECL_sampler':
tgsi_ureg.c:601:34: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ureg->sampler[i].Index == nr)
^~
tgsi_ureg.c: In function 'validate':
tgsi/tgsi_ureg.c:908:32: warning: unused parameter 'opcode' [-Wunused-
parameter]
static void validate( unsigned opcode,
^~~~~~
tgsi_ureg.c:909:32: warning: unused parameter 'nr_dst' [-Wunused-
parameter]
unsigned nr_dst,
^~~~~~
tgsi_ureg.c:910:32: warning: unused parameter 'nr_src' [-Wunused-
parameter]
unsigned nr_src )
^~~~~~
tgsi_ureg.c: In function 'emit_decls':
tgsi_ureg.c:1335:31: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ureg->properties[i] != ~0)
^~
tgsi_ureg.c: In function 'ureg_create':
tgsi_ureg.c:1594:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for (i = 0; i < ARRAY_SIZE(ureg->properties); i++)
^
CC tgsi/tgsi_util.lo
tgsi_util.c: In function 'tgsi_util_get_full_src_register_sign_mode':
tgsi_util.c:109:13: warning: unused parameter 'component' [-Wunused-
parameter]
unsigned component )
^~~~~~~~~
v2: Eliminate use of VREND_UNUSED (Erik)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
_surface.c: In function 'util_copy_rect':
u_surface.c:101:37: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (width == dst_stride && width == src_stride)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
In function 'parse_identifier':
tgsi_text.c:190:16: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (i == len - 1)
^~
tgsi_text.c: In function 'parse_optional_swizzle':
tgsi_text.c:816:21: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for (i = 0; i < components; i++) {
^
tgsi_text.c: In function 'parse_instruction':
tgsi_text.c:1025:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for (i = 0; i < info->num_dst + info->num_src + info->is_tex; i++) {
^
tgsi_text.c:1040:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
else if (i < info->num_dst + info->num_src) {
^
tgsi_text.c: In function 'parse_immediate':
tgsi/tgsi_text.c:1525:24: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
for (type = 0; type < Elements(tgsi_immediate_type_names); ++type) {
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
tgsi_sanity.c: In function 'iter_instruction':
tgsi_sanity.c:316:29: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ctx->index_of_END != ~0) {
^~
tgsi_sanity.c: In function 'epilog':
tgsi_sanity.c:488:26: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ctx->index_of_END == ~0) {
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
tgsi_parse.c: In function 'tgsi_parse_free':
tgsi_parse.c:54:31: warning: unused parameter 'ctx' [-Wunused-parameter]
struct tgsi_parse_context *ctx )
^~~
tgsi_parse.c: In function 'tgsi_parse_end_of_tokens':
tgsi_parse.c:62:25: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
return ctx->Position >=
v2: Replace VREND_UNUSED by UNUSED (Erik)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
tgsi_dump.c: In function 'iter_property':
tgsi_dump.c:443:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for (i = 0; i < prop->Property.NrTokens - 1; ++i) {
^
tgsi_dump.c:459:13: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (i < prop->Property.NrTokens - 2)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
/tgsi_build.c: In function 'tgsi_build_full_immediate':
tgsi_build.c:599:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for( i = 0; i < full_imm->Immediate.NrTokens - 1; i++ ) {
^
tgsi_build.c: In function 'tgsi_build_instruction_label':
tgsi_build.c:689:24: warning: unused parameter 'prev_token' [-Wunused-
parameter]
struct tgsi_token *prev_token,
^~~~~~~~~~
tgsi_build.c: In function 'tgsi_build_instruction_texture':
tgsi_build.c:720:23: warning: unused parameter 'prev_token' [-Wunused-
parameter]
struct tgsi_token *prev_token,
^~~~~~~~~~
tgsi_build.c: In function 'tgsi_build_texture_offset':
tgsi_build.c:755:23: warning: unused parameter 'prev_token' [-Wunused-
parameter]
struct tgsi_token *prev_token,
^~~~~~~~~~
tgsi_build.c: In function 'tgsi_build_full_property':
tgsi_build.c:1307:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for( i = 0; i < full_prop->Property.NrTokens - 1; i++ ) {
v2: remove the unused prev_token (in sync with mesa)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
This adds the texture barrier support for the texture barriers,
a separate patch would be needed to implement the framebuffer fetch
barriers.
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
[cherry-picked from mesa 1393999541f3956156bf227209ecbf6d814ffc8f]
Signed-off-by: Dave Airlie <airlied@redhat.com>
GL4.2/GLES3.1 adds glMemoryBarrier so make sure we can handle it.
v2: add a cap bit for this for guest
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>