Commit Graph

151793 Commits

Author SHA1 Message Date
Mike Blumenkrantz 4ec71a3429 crocus: assert that 3d samplerview base_array_layer is zero
this codepath will not work on crocus

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15610>
2022-03-29 22:12:30 +00:00
Mike Blumenkrantz 65ec846f77 intel/isl: fix 2d view of 3d textures
according to KHR_gl_texture_3D_image:

    If <target> is EGL_GL_TEXTURE_3D_KHR, <buffer> must be the name of a
    complete, nonzero, GL_TEXTURE_3D (or equivalent in GL extensions) target
    texture object, cast
    into the type EGLClientBuffer.  <attr_list> should specify the mipmap
    level (EGL_GL_TEXTURE_LEVEL_KHR) and z-offset (EGL_GL_TEXTURE_ZOFFSET_KHR)
    which will be used as the EGLImage source; the specified mipmap level must
    be part of <buffer>, and the specified z-offset must be smaller than the
    depth of the specified mipmap level.

thus a 2d view of a 3d surface is not only legal, it's part of the spec and
must be supported when available

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15584>
2022-03-29 21:44:51 +00:00
Pavel Ondračka 806dcf9db7 r300: only output wpos in vertex shaders when needed
Right now we always copy pos to wpos regardless of if the fragment
shader needs it or not. Instead just do it only for the shaders
that really need it.

Shader-db is not able to measure preciselly the effect as we
build only the non-wpos variants, but given that majority of fragment
shaders don't needs the wpos, the real effect should be close:

total instructions in shared programs: 105427 -> 104313 (-1.06%)
instructions in affected programs: 53098 -> 51984 (-2.10%)
total temps in shared programs: 13991 -> 13958 (-0.24%)
temps in affected programs: 114 -> 81 (-28.95%)

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321>
2022-03-29 21:37:24 +00:00
Pavel Ondračka 8c90a5fab7 r300: move r300_init_vs_outputs to r300_translate_vertex_shader
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321>
2022-03-29 21:37:24 +00:00
Pavel Ondračka 882811b1ff r300: restructure r300_vertex_shader
Make the r300_vertex_shader structure resemble the r300_framgment_shader
in order to allow support for shader variants. There is no functional
change, but it will be used in the next commit to only output wpos
when needed from vertex shaders.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321>
2022-03-29 21:37:24 +00:00
Pavel Ondračka d9449c5201 r300: optimize single write scenarios in rc_copy_output
Right now we always write to a temp and than emit movs to both
POS and WPOS.

When the result is trivial, like:

MOV temp[0], in[0]
MOV output[0], temp[0]
MOV output[1], temp[0]

the dataflow analysis passes can take care of it, this is however
one of the last optimizations we need the pass for. Additionally
it fails even for some still trivial cases like:

 MAD temp[2], const[3], temp[0].wwww, temp[1];
 MOV output[0], temp[2];
 MOV output[2], temp[2];

This patch will just duplicate the output instuction when there
is only a single output write.

The long-term plan would be to just trust NIR, do as little in
the backend as possible and optimize the remaining backend passes
to not need any additional cleanups.

total instructions in shared programs: 105862 -> 105427 (-0.41%)
instructions in affected programs: 20527 -> 20092 (-2.12%)
total temps in shared programs: 14029 -> 13991 (-0.27%)
temps in affected programs: 152 -> 114 (-25.00%)

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@zoho.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321>
2022-03-29 21:37:24 +00:00
Pavel Ondračka 5dcef1e7b8 r300: don't move position output to the end when duplicating it for WPOS
Instead just emit both outputs as soon as possible.

If the last write is inside a loop or a branch, emit it after
the ENDLOOP or ENDIF. This saves some temps and also allows us
to potentially benefit from R300_PVS_XYZW_VALID_INST as right
now the position output write is always penultimate with the
WPOS output being the last.

total temps in shared programs: 14101 -> 14029 (-0.51%)
temps in affected programs: 435 -> 363 (-16.55%)
helped: 72
HURT: 0

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@zoho.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321>
2022-03-29 21:37:24 +00:00
Mike Blumenkrantz 8cf10ae144 zink: add in radv passes to baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15654>
2022-03-29 21:24:01 +00:00
Mike Blumenkrantz f3fa085fc6 zink: more radv fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15654>
2022-03-29 21:24:01 +00:00
Mike Blumenkrantz 4e6f1c1478 zink: update radv baseline
it doesn't look like these ever passed?

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15654>
2022-03-29 21:24:01 +00:00
Kenneth Graunke 8831cb38aa anv: Stop updating STATE_BASE_ADDRESS on XeHP
Now that we're using 3DSTATE_BINDING_TABLE_POOL_ALLOC to set the base
address for the binding table pool separately from surface states, we
don't actually need to update surface state base address anymore.

Instead, we can just set STATE_BASE_ADDRESS once at context creation,
and never bother updating it again, saving some heavyweight flushes
and freeing us from the need for address offsetting trickery.

This patch was originally written by Jason Ekstrand, with fixes from
Lionel Landwerlin, but was targeting Icelake.  Doing it there requires
additional changes (15:5 -> 18:8 binding table pointer formats) which
also involve some trade-offs, whereas the XeHP change is purely a win,
so we'll do it here first.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15616>
2022-03-29 20:45:59 +00:00
Kenneth Graunke 1967fd3b10 intel/compiler: Call inst->resize_sources before setting the sources
You should probably resize the sources array before accessing entries
that might be out of bounds.  inst->resize_sources() always allocates
enough space for at least 3 sources, so this is really only an issue
when there are 4+ sources.

Fixes: a920979d4f ("intel/fs: Use split sends for surface writes on gen9+")
Fixes: 4f86a70599 ("intel/fs: Lower DW untyped r/w messages to LSC when available")
Fixes: d372abe397 ("intel/fs: Add surface OWORD BLOCK opcodes")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15632>
2022-03-29 13:06:17 -07:00
Dylan Baker 356f6bb8a5 docs: update calendar and link releases notes for 22.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15653>
2022-03-29 13:01:17 -07:00
Dylan Baker 215ae6b270 docs: add sah256 sum for mesa 22.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15653>
2022-03-29 13:01:12 -07:00
Dylan Baker d85cdcad5d docs: add release notes for 22.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15653>
2022-03-29 13:01:10 -07:00
Filip Gawin 5a459b8f6b r300: fix swizzle handling in transformation of abs
Helps with scalar opcodes like pow.
(which are propagating first used channel)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15222>
2022-03-29 19:49:17 +00:00
Dylan Baker 85ae6598fa docs: Add calendar entries for 22.1 release candidates.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15650>
2022-03-29 19:29:48 +00:00
Mike Blumenkrantz 01f3504e2f zink: remove anv workaround for broken color writes
it's healed!

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15564>
2022-03-29 19:17:10 +00:00
Mike Blumenkrantz 408f114830 zink: break out CmdSetColorWriteEnableEXT to util function
this will otherwise become a no-op, and it's only intended that this
be called if cwrite is actually being used

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15609>
2022-03-29 19:01:01 +00:00
Yonggang Luo a1814067cd nir: Move the define of snprintf to header nir.h
The define of snprintf in nir_lower_atomics_to_ssbo.c is duplicated,
so remove it from this file

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14014>
2022-03-30 00:45:11 +08:00
Yonggang Luo 153cb830c4 vtn: Fixes compiling error for mingw/ucrt by using setjmp/longjmp function instead compiler builtin
The compiling error are:
```
[369/1463] Compiling C object src/compiler/nir/libnir.a.p/.._spirv_gl_spirv.c.obj
FAILED: src/compiler/nir/libnir.a.p/.._spirv_gl_spirv.c.obj
"cc" "-Isrc/compiler/nir/libnir.a.p" "-Isrc/compiler/nir" "-I../../src/compiler/nir" "-Iinclude" "-I../../include" "-Isrc" "-I../../src" "-Isrc/mapi" "-I../../src/mapi" "-Isrc/mesa" "-I../../src/mesa" "-I../../src/gallium/include" "-Isrc/gallium/auxiliary" "-I../../src/gallium/auxiliary" "-Isrc/compiler"
"-I../../src/compiler" "-Isrc/compiler/spirv" "-I../../src/compiler/spirv" "-fvisibility=hidden" "-fcolor-diagnostics" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c11" "-O2" "-g" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DPACKAGE_VERSION=\"22.1.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-DHAVE_WINDOWS_PLATFORM" "-DHAVE_SURFACELESS_PLATFORM" "-DUSE_ELF_TLS" "-DUSE_TLS_BEHIND_FUNCTIONS" "-DENABLE_ST_OMX_BELLAGIO=0" "-DENABLE_ST_OMX_TIZONIA=0" "-DEGL_NO_X11" "-DHAVE___BUILTIN_BSWAP32" "-DHAVE___BUILTIN_BSWAP64" "-DHAVE___BUILTIN_CLZ" "-DHAVE___BUILTIN_CLZLL" "-DHAVE___BUILTIN_CTZ" "-DHAVE___BUILTIN_EXPECT" "-DHAVE___BUILTIN_FFS" "-DHAVE___BUILTIN_FFSLL" "-DHAVE___BUILTIN_POPCOUNT" "-DHAVE___BUILTIN_POPCOUNTLL" "-DHAVE___BUILTIN_UNREACHABLE" "-DHAVE___BUILTIN_TYPES_COMPATIBLE_P" "-DHAVE_FUNC_ATTRIBUTE_CONST" "-DHAVE_FUNC_ATTRIBUTE_FLATTEN" "-DHAVE_FUNC_ATTRIBUTE_MALLOC" "-DHAVE_FUNC_ATTRIBUTE_PURE" "-DHAVE_FUNC_ATTRIBUTE_UNUSED" "-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-DHAVE_FUNC_ATTRIBUTE_WEAK" "-DHAVE_FUNC_ATTRIBUTE_FORMAT" "-DHAVE_FUNC_ATTRIBUTE_PACKED" "-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" "-DHAVE_FUNC_ATTRIBUTE_ALIAS" "-DHAVE_FUNC_ATTRIBUTE_NORETURN" "-DHAVE_FUNC_ATTRIBUTE_VISIBILITY" "-DHAVE_UINT128" "-D_WINDOWS" "-D_WIN32_WINNT=0x0A00" "-DWINVER=0x0A00" "-DPIPE_SUBSYSTEM_WINDOWS_USER" "-D_USE_MATH_DEFINES" "-DUSE_SSE41" "-DUSE_GCC_ATOMIC_BUILTINS" "-DHAS_SCHED_H" "-DHAVE_CET_H" "-DHAVE_STRTOF" "-DHAVE_TIMESPEC_GET" "-DHAVE_STRTOK_R" "-DHAVE_QSORT_S" "-DHAVE_ZLIB" "-DHAVE_ZSTD" "-DHAVE_COMPRESSION" "-DLLVM_AVAILABLE" "-DMESA_LLVM_VERSION_STRING=\"13.0.1\"" "-DLLVM_IS_SHARED=1" "-DDRAW_LLVM_AVAILABLE" "-DMESA_EXECMEM" "-DVK_USE_PLATFORM_WIN32_KHR" "-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-Werror=return-type" "-Werror=empty-body" "-Werror=incompatible-pointer-types" "-Werror=int-conversion" "-Wimplicit-fallthrough" "-Wno-missing-field-initializers" "-fno-math-errno" "-fno-trapping-math" "-Qunused-arguments" "-fno-common" "-Wno-microsoft-enum-value" "-Werror=format" "-Wformat-security" "-Werror=thread-safety" "-ffunction-sections" "-fdata-sections" "-Werror=pointer-arith" "-Werror=gnu-empty-initializer" "-Wno-override-init" "-Wno-initializer-overrides" -MD -MQ src/compiler/nir/libnir.a.p/.._spirv_gl_spirv.c.obj -MF "src/compiler/nir/libnir.a.p/.._spirv_gl_spirv.c.obj.d" -o src/compiler/nir/libnir.a.p/.._spirv_gl_spirv.c.obj "-c" ../../src/compiler/spirv/gl_spirv.c
../../src/compiler/spirv/gl_spirv.c:241:19: error: incompatible pointer types passing 'jmp_buf' (aka '_JBTYPE [16]') to parameter of type 'void **' [-Werror,-Wincompatible-pointer-types]
   if (vtn_setjmp(b->fail_jump)) {
                  ^~~~~~~~~~~~
1 error generated.
[376/1463] Compiling C object src/compiler/nir/libnir.a.p/.._spirv_spirv_to_nir.c.obj
FAILED: src/compiler/nir/libnir.a.p/.._spirv_spirv_to_nir.c.obj
"cc" "-Isrc/compiler/nir/libnir.a.p" "-Isrc/compiler/nir" "-I../../src/compiler/nir" "-Iinclude" "-I../../include" "-Isrc" "-I../../src" "-Isrc/mapi" "-I../../src/mapi" "-Isrc/mesa" "-I../../src/mesa" "-I../../src/gallium/include" "-Isrc/gallium/auxiliary" "-I../../src/gallium/auxiliary" "-Isrc/compiler"
"-I../../src/compiler" "-Isrc/compiler/spirv" "-I../../src/compiler/spirv" "-fvisibility=hidden" "-fcolor-diagnostics" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c11" "-O2" "-g" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DPACKAGE_VERSION=\"22.1.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-DHAVE_WINDOWS_PLATFORM" "-DHAVE_SURFACELESS_PLATFORM" "-DUSE_ELF_TLS" "-DUSE_TLS_BEHIND_FUNCTIONS" "-DENABLE_ST_OMX_BELLAGIO=0" "-DENABLE_ST_OMX_TIZONIA=0" "-DEGL_NO_X11" "-DHAVE___BUILTIN_BSWAP32" "-DHAVE___BUILTIN_BSWAP64" "-DHAVE___BUILTIN_CLZ" "-DHAVE___BUILTIN_CLZLL" "-DHAVE___BUILTIN_CTZ" "-DHAVE___BUILTIN_EXPECT" "-DHAVE___BUILTIN_FFS" "-DHAVE___BUILTIN_FFSLL" "-DHAVE___BUILTIN_POPCOUNT" "-DHAVE___BUILTIN_POPCOUNTLL" "-DHAVE___BUILTIN_UNREACHABLE" "-DHAVE___BUILTIN_TYPES_COMPATIBLE_P" "-DHAVE_FUNC_ATTRIBUTE_CONST" "-DHAVE_FUNC_ATTRIBUTE_FLATTEN" "-DHAVE_FUNC_ATTRIBUTE_MALLOC" "-DHAVE_FUNC_ATTRIBUTE_PURE" "-DHAVE_FUNC_ATTRIBUTE_UNUSED" "-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-DHAVE_FUNC_ATTRIBUTE_WEAK" "-DHAVE_FUNC_ATTRIBUTE_FORMAT" "-DHAVE_FUNC_ATTRIBUTE_PACKED" "-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" "-DHAVE_FUNC_ATTRIBUTE_ALIAS" "-DHAVE_FUNC_ATTRIBUTE_NORETURN" "-DHAVE_FUNC_ATTRIBUTE_VISIBILITY" "-DHAVE_UINT128" "-D_WINDOWS" "-D_WIN32_WINNT=0x0A00" "-DWINVER=0x0A00" "-DPIPE_SUBSYSTEM_WINDOWS_USER" "-D_USE_MATH_DEFINES" "-DUSE_SSE41" "-DUSE_GCC_ATOMIC_BUILTINS" "-DHAS_SCHED_H" "-DHAVE_CET_H" "-DHAVE_STRTOF" "-DHAVE_TIMESPEC_GET" "-DHAVE_STRTOK_R" "-DHAVE_QSORT_S" "-DHAVE_ZLIB" "-DHAVE_ZSTD" "-DHAVE_COMPRESSION" "-DLLVM_AVAILABLE" "-DMESA_LLVM_VERSION_STRING=\"13.0.1\"" "-DLLVM_IS_SHARED=1" "-DDRAW_LLVM_AVAILABLE" "-DMESA_EXECMEM" "-DVK_USE_PLATFORM_WIN32_KHR" "-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-Werror=return-type" "-Werror=empty-body" "-Werror=incompatible-pointer-types" "-Werror=int-conversion" "-Wimplicit-fallthrough" "-Wno-missing-field-initializers" "-fno-math-errno" "-fno-trapping-math" "-Qunused-arguments" "-fno-common" "-Wno-microsoft-enum-value" "-Werror=format" "-Wformat-security" "-Werror=thread-safety" "-ffunction-sections" "-fdata-sections" "-Werror=pointer-arith" "-Werror=gnu-empty-initializer" "-Wno-override-init" "-Wno-initializer-overrides" -MD -MQ src/compiler/nir/libnir.a.p/.._spirv_spirv_to_nir.c.obj -MF "src/compiler/nir/libnir.a.p/.._spirv_spirv_to_nir.c.obj.d" -o
src/compiler/nir/libnir.a.p/.._spirv_spirv_to_nir.c.obj "-c" ../../src/compiler/spirv/spirv_to_nir.c
../../src/compiler/spirv/spirv_to_nir.c:196:16: error: incompatible pointer types passing 'jmp_buf' (aka '_JBTYPE [16]') to parameter of type 'void **' [-Werror,-Wincompatible-pointer-types]
   vtn_longjmp(b->fail_jump, 1);
               ^~~~~~~~~~~~
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14014>
2022-03-30 00:45:08 +08:00
Yonggang Luo 887d74dd2f meson: Add predefined macro -D__MSVCRT_VERSION__=0x0700 only in mingw environment without _UCRT
Fixed the following error:
```

1 error generated.
[18/1468] Compiling C object src/util/libmesa_util.a.p/half_float.c.obj
FAILED: src/util/libmesa_util.a.p/half_float.c.obj
"cc" "-Isrc/util/libmesa_util.a.p" "-Isrc/util" "-I../../src/util" "-Iinclude" "-I../../include" "-Isrc" "-I../../src" "-Isrc/mapi" "-I../../src/mapi" "-Isrc/mesa" "-I../../src/mesa" "-I../../src/gallium/include" "-Isrc/gallium/auxiliary" "-I../../src/gallium/auxiliary" "-IC:/CI-Tools/msys64/clang64/include" "-fvisibility=hidden" "-fcolor-diagnostics" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c11" "-O2" "-g" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DPACKAGE_VERSION=\"22.1.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-DHAVE_WINDOWS_PLATFORM" "-DHAVE_SURFACELESS_PLATFORM" "-DUSE_ELF_TLS" "-DUSE_TLS_BEHIND_FUNCTIONS" "-DENABLE_ST_OMX_BELLAGIO=0" "-DENABLE_ST_OMX_TIZONIA=0" "-DEGL_NO_X11" "-DHAVE___BUILTIN_BSWAP32" "-DHAVE___BUILTIN_BSWAP64" "-DHAVE___BUILTIN_CLZ" "-DHAVE___BUILTIN_CLZLL" "-DHAVE___BUILTIN_CTZ" "-DHAVE___BUILTIN_EXPECT" "-DHAVE___BUILTIN_FFS" "-DHAVE___BUILTIN_FFSLL" "-DHAVE___BUILTIN_POPCOUNT" "-DHAVE___BUILTIN_POPCOUNTLL" "-DHAVE___BUILTIN_UNREACHABLE" "-DHAVE___BUILTIN_TYPES_COMPATIBLE_P" "-DHAVE_FUNC_ATTRIBUTE_CONST" "-DHAVE_FUNC_ATTRIBUTE_FLATTEN" "-DHAVE_FUNC_ATTRIBUTE_MALLOC" "-DHAVE_FUNC_ATTRIBUTE_PURE" "-DHAVE_FUNC_ATTRIBUTE_UNUSED" "-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-DHAVE_FUNC_ATTRIBUTE_WEAK" "-DHAVE_FUNC_ATTRIBUTE_FORMAT" "-DHAVE_FUNC_ATTRIBUTE_PACKED" "-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" "-DHAVE_FUNC_ATTRIBUTE_ALIAS" "-DHAVE_FUNC_ATTRIBUTE_NORETURN" "-DHAVE_FUNC_ATTRIBUTE_VISIBILITY" "-DHAVE_UINT128" "-D_WINDOWS" "-D_WIN32_WINNT=0x0A00" "-DWINVER=0x0A00" "-DPIPE_SUBSYSTEM_WINDOWS_USER" "-D_USE_MATH_DEFINES" "-D__MSVCRT_VERSION__=0x0700" "-DUSE_SSE41" "-DUSE_GCC_ATOMIC_BUILTINS" "-DHAS_SCHED_H" "-DHAVE_CET_H" "-DHAVE_STRTOF" "-DHAVE_TIMESPEC_GET" "-DHAVE_STRTOK_R" "-DHAVE_QSORT_S" "-DHAVE_ZLIB" "-DHAVE_ZSTD" "-DHAVE_COMPRESSION" "-DLLVM_AVAILABLE" "-DMESA_LLVM_VERSION_STRING=\"13.0.1\"" "-DLLVM_IS_SHARED=1" "-DDRAW_LLVM_AVAILABLE" "-DMESA_EXECMEM" "-DVK_USE_PLATFORM_WIN32_KHR"
"-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-Werror=return-type" "-Werror=empty-body" "-Werror=incompatible-pointer-types" "-Werror=int-conversion" "-Wimplicit-fallthrough" "-Wno-missing-field-initializers" "-fno-math-errno" "-fno-trapping-math" "-Qunused-arguments" "-fno-common" "-Wno-microsoft-enum-value" "-Werror=format" "-Wformat-security" "-Werror=thread-safety" "-ffunction-sections" "-fdata-sections" "-pthread" "-Werror=pointer-arith" "-Werror=gnu-empty-initializer" -MD -MQ src/util/libmesa_util.a.p/half_float.c.obj -MF "src/util/libmesa_util.a.p/half_float.c.obj.d" -o src/util/libmesa_util.a.p/half_float.c.obj "-c" ../../src/util/half_float.c
In file included from ../../src/util/half_float.c:30:
In file included from ../../src/util/half_float.h:32:
In file included from ../../src/util/u_cpu_detect.h:41:
In file included from ../../src/util/u_thread.h:35:
In file included from ../../include/c11/threads.h:64:
../../include/c11/threads_win32.h:136:5: error: implicit declaration of function 'timespec_get' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    timespec_get(&now, TIME_UTC);
    ^
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14014>
2022-03-30 00:45:03 +08:00
Mike Blumenkrantz 0bef8bc054 zink: fix error logging for 2d z/s checking
this is expected to fail and so is not an error

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15643>
2022-03-29 15:48:27 +00:00
Jason Ekstrand 4a08ee7ecf spirv/libclc: Add generic versions of arithmetic functions
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15622>
2022-03-29 15:02:07 +00:00
Jason Ekstrand 688d478045 v3dv/queue: Rework multisync_free
Thix fixes two bugs.  First, we stop leaking in/out fences with
multisync.  Because the in_syncs and out_syncs parameters to
set_multisync were arrays and not pointers to arrays, the caller's
in_syncs and out_syncs pointers never got set and remained NULL so
multisync_free() always sees to NULL pointers and does nothing, leaking
both arrays.  Not sure how this isn't showing up in the dEQP leak check
tests.

Second, the struct drm_v3d_multi_sync was in the scope of the then
clause of the `if (device->pdevice->caps.multisync)` so it goes out of
scope before the ioctl.  This is, effectively, a use-after-free and,
depending on stack allocation details, may result in the multisync
extension struct getting stompped before the ioctl.

Fixes: ff8586c345 ("v3dv: enable multiple semaphores on cl submission")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15512>
2022-03-29 14:38:41 +00:00
Mike Blumenkrantz d001150d0c doc: update extensions for lavapipe
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Mike Blumenkrantz aed49c89a5 lavapipe: display EXT_graphics_pipeline_library
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Mike Blumenkrantz d4d5a7abba lavapipe: implement EXT_graphics_pipeline_library
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Mike Blumenkrantz 22fd70ca81 lavapipe: support KHR_pipeline_library
this is basically a no-op since raytracing isn't supported

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Mike Blumenkrantz 0918095b9a lavapipe: EXT_primitives_generated_query
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Mike Blumenkrantz 8c3b4dd996 vulkan: update spec to 1.3.210
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15635>
2022-03-29 07:59:23 -04:00
Iago Toral Quiroga 7f6ecb8667 v3dv: add reference counting for descriptor set layouts
The spec states that descriptor set layouts can be destroyed almost
at any time:

   "VkDescriptorSetLayout objects may be accessed by commands that
    operate on descriptor sets allocated using that layout, and those
    descriptor sets must not be updated with vkUpdateDescriptorSets
    after the descriptor set layout has been destroyed. Otherwise,
    descriptor set layouts can be destroyed any time they are not in
    use by an API command."

Based on a similar fix for RADV.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5893
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15634>
2022-03-29 11:28:39 +00:00
Iago Toral Quiroga ca861bd6f4 v3dv: drop unnecessary memset
We are already zeroing when we allocate the descriptor set layout
memory with vk_object_zalloc.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15634>
2022-03-29 11:28:39 +00:00
Iago Toral Quiroga 591eed30b2 v3dv: fix sampler array addressing in v3dv_descriptor_set_layout
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15634>
2022-03-29 11:28:39 +00:00
Samuel Pitoiset 00cc52b282 radv: remove now unused radv_nir_compiler_options::layout
Descriptors are lowered in NIR and the layout is no longer used in the
backend compilers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15630>
2022-03-29 10:39:07 +00:00
Kenneth Graunke 50467aa558 iris: Properly tell the decoder about inherited binder addresses
iris may rely on 3DSTATE_BINDING_TABLE_POOL_ALLOC's address being
inherited from a previous batch.  So, we need to tell the decoder
about the address in case it sees binding tables to decode before
it encounters such a command in the batch.

We used to update surface_base, now we update bt_pool_base instead.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15625>
2022-03-29 02:35:54 -07:00
Kenneth Graunke 9bc97e4fc1 intel/decoder: Fix decoder handling of binding table pool alloc on XeHP
3DSTATE_BINDING_TABLE_POOL_ALLOC no longer has a "Binding Table Pool
Enable" bit.  It is always enabled.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15625>
2022-03-29 02:35:54 -07:00
Mihai Preda 08f74e7185 radeonsi: merge the copy_image shader generators
Use a unified si_create_copy_image_cs() to generate both the 1D and 2D
copy shaders; the shaders themselves remain separate.

Also:
- add a helper deref_ssa() for nir deref
- add a helper set_work_size() for setting workgroup and grid sizes
- pass si_context (instead of pipe_context) to the copy_image generator

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15268>
2022-03-29 09:06:57 +00:00
Mihai Preda c0ef40bbce radeonsi: convert copy_image_1d_array shader to NIR
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15268>
2022-03-29 09:06:57 +00:00
Mihai Preda 18722af9d2 radeonsi: convert copy_image shader to NIR
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15268>
2022-03-29 09:06:57 +00:00
Vinson Lee 79ba1962ac pvr: Remove duplicate variable queue_create.
Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In queue_create = queue_create = &pCreateInfo->pQueueCreateInfos[0], queue_create is written twice with the same value.

Fixes: 8991e64641 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15604>
2022-03-29 08:56:27 +00:00
Danylo Piliaiev 10734fb748 turnip: enable has_ccu_flush_bug workaround for a660
It seems that a660 has the same bug. Without the workaround there
are a lot of flakes with depth-stencil tests, e.g. in:
 dEQP-VK.pipeline.extended_dynamic_state.*
 dEQP-VK.renderpass.depth_stencil_write_conditions.*
 dEQP-VK.pipeline.stencil.format.d24_unorm_s8_uint.states.*

Or guaranteed failures like of:
 dEQP-VK.pipeline.render_to_image.core.2d.huge.width.r8g8b8a8_unorm_d32_sfloat_s8_uint

Enabling the workaround fixes all of them.

cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15548>
2022-03-29 08:34:18 +00:00
Tales Lelo da Aparecida fe66cff411 zink: validate and log errors on vulkan calls
This commit also replaces debug_printf with mesa_loge

Signed-off-by: Tales Lelo da Aparecida <tales.aparecida@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15601>
2022-03-28 21:46:59 -03:00
Mihai Preda 1f92c30170 radeonsi/tests: update baseline and flakes on vega20
The piglit suite was run on vega20, 10 times, on a 'debugoptimized' mesa build
at commit 582e7f15 . The inconsistent failures were added to the flakes file.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15487>
2022-03-28 22:48:16 +00:00
Mihai Preda a6d7c5aa31 radeonsi/tests: add flakes option to radeonsi-run-tests.py
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15487>
2022-03-28 22:48:16 +00:00
Mihai Preda 88c14ed1da radeonsi/tests: fix file left open in radeonsi-run-tests.py
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15487>
2022-03-28 22:48:16 +00:00
Mike Blumenkrantz e54fb81151 zink: run piglit's gpu profile
increase coverage

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15606>
2022-03-28 22:35:32 +00:00
Konstantin Seurer a8c7e8fef8 venus: Use trivial common entrypoints
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15613>
2022-03-28 22:15:45 +00:00
Konstantin Seurer 87b65af43e radv: Use common GetPhysicalDeviceMemoryProperties
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15613>
2022-03-28 22:15:45 +00:00
Mike Blumenkrantz 3b39e4d913 lavapipe: run optimize loop before krangling pipeline layout
in scenarios like:

vec1 32 ssa_151 = deref_var &shadow_map (uniform sampler2D)
vec1 32 ssa_152 = deref_var &shadow_map (uniform sampler2D)
vec2 32 ssa_153 = vec2 ssa_151, ssa_152
vec1 32 ssa_154 = deref_var &param@4 (function_temp uvec2)
intrinsic store_deref (ssa_154, ssa_153) (wrmask=xy /*3*/, access=0)
vec1 32 ssa_160 = deref_var &param@4 (function_temp uvec2)
vec2 32 ssa_164 = intrinsic load_deref (ssa_160) (access=0)
vec1 32 ssa_167 = mov ssa_164.x
vec1 32 ssa_168 = deref_cast (texture2D *)ssa_167 (uniform texture2D)  /* ptr_stride=0, align_mul=0, align_offset=0 */
vec1 32 ssa_169 = mov ssa_164.y
vec1 32 ssa_170 = deref_cast (sampler *)ssa_169 (uniform sampler)  /* ptr_stride=0, align_mul=0, align_offset=0 */
vec1 32 ssa_172 = (float32)tex ssa_168 (texture_deref), ssa_170 (sampler_deref), ssa_171 (coord), ssa_166 (comparator)

the real variable is stored to a function_temp and then loaded back again,
which means it isn't a direct deref and lower_vri_instr_tex_deref() will
crash because the variable can't be found

BUT running only the passes needed to eliminate derefs will break other tests,
so just run the whole optimize loop again here to avoid such issues

for #5945

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15511>
2022-03-28 22:01:49 +00:00