| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The alignment can just be copied from the source intrinsic.
Fixes the assertion
nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr)
Reviewed-by: Karol Herbst <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5949>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the two-sided-lighting and vertex-program-two-side piglit tests
on Panfrost.
v2: Use an existing variable for gl_FrontFacing if present.
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Tested-by: Urja Rannikko <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5915>
|
|
|
|
|
|
|
|
|
|
| |
This is needed for handling drivers that use an input for loading the
face, for example Panfrost with Midgard GPUs.
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Tested-by: Urja Rannikko <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5915>
|
|
|
|
|
|
|
|
| |
EXT_shader_framebuffer_fetch requires the fetched value to be per-sample, so we
need to load the sample id when in a fragment shader.
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5930>
|
|
|
|
|
|
|
| |
Signed-off-by: Elie Tournier <[email protected]>
Reviewed-by: Gert Wollny <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix Android-Q build:
- Use AOSP prebuilt bison by specifying $(BISON) variable
- Use AOSP prebuilt flex by specifying $(LEX) variable
Fix Android-R build:
- Add M4 environmet variable for Android R and higher (See [1])
[1] - https://cs.android.com/android/_/android/platform/build/+/2bfffb9f48a78de12faf5da77424c0cecb70d6eb:Changes.md;dlc=997661002af1282d938e88c3c723037e42e5d283
Signed-off-by: Roman Stratiienko <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Tested-by: Mauro Rossi <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5894>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>
|
|
|
|
|
| |
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>
|
|
|
|
|
|
|
|
| |
To allow interop with other scratch ops, append any remaining temp vars
to the end of any already-allocated scratch space.
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>
|
|
|
|
|
| |
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>
|
|
|
|
|
|
|
|
| |
masked_swizzle_amd can be much faster than shuffle.
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5695>
|
|
|
|
|
|
| |
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5695>
|
|
|
|
|
|
|
| |
This is the render target the read instruction uses.
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755>
|
|
|
|
|
|
|
|
|
|
|
| |
Whenever a struct type is decorated Block or BufferBlock we turn that
into a GLSL_TYPE_INTERFACE. Since these decorations can end up random
places, we should allow them for constants.
Closes: #3252
Fixes: 9d0ae777dd6 "spirv: Use interface type for block and buffer..."
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5855>
|
|
|
|
|
|
|
| |
Closes: #3253
Fixes: 22fdb2f8551 "nir/spirv: Update to the latest revision"
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5855>
|
|
|
|
|
|
|
|
| |
the final output of gl_Position needs this transform, and geometry shaders
must write this value for stream 0 if rasterization is enabled
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5851>
|
|
|
|
|
|
|
| |
geometry shaders may need to emit PSIZ as well
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5851>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise a VS doing the following:
out gl_PerVertex {
vec4 gl_Position;
int gl_ViewportIndex;
};
cannot be compiled because of the following error:
"redeclaration of gl_PerVertex must be a subset of the built-in
members of gl_PerVertex"
v2: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in
generate_fs_special_vars.
v3: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in
generate_varyings.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2946
Tested-by: John Galt <[email protected]>
Reviewed-by: Marek Olšák <[email protected]> (v3)
Reviewed-by: Ian Romanick <[email protected]> (v3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5167>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EXT_shader_image_load_store says:
The format of the image unit must be in the "1x32" equivalence class
otherwise the atomic operation is invalid.
ARB_shader_image_load_store says:
We will only support 32-bit atomic operations on images
Fixes: fc0a2e5d017 ("glsl: add EXT_shader_image_load_store new image functions")
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
|
|
|
|
|
|
|
|
|
| |
The spec says that it's only allowed for unsigned ones.
Same from imageAtomicDecWrap.
Fixes: fc0a2e5d017 ("glsl: add EXT_shader_image_load_store new image functions")
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
|
|
|
|
|
|
| |
Fixes: 8d07d66180b ("glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.")
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
|
|
|
|
|
|
|
|
| |
Fixes: 8d62969cfe8 - glsl: validate more stuff
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3245
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5813>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case where SSA use/def chains are broken, NIR prints out a very
cryptic error and then aborts. This abort happens during validation
rather than after the print is complete, hiding any other errors that
may have been found. One might think, "So what? Fix your use/def issue
first." However, what makes this especially bad is that, when use/def
chains are broken, there's usually a much nicer error inline in the
shader that would have been printed had we not aborted early so the
current behavior simply ensures you get the most cryptic error possible
in an already difficult-to-debug case.
While we're at it, we remove the one other case of abort() which is in
the validation of phi instruction sources.
Reviewed-by: Rob Clark <[email protected]>
Tested-by: Marcin Ślusarz <[email protected]>
Reviewed-by: Marcin Ślusarz <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5809>
|
|
|
|
|
|
|
|
| |
this is needed for zink and other drivers which can support fragcolor but
not fragdata and want to correctly handle EXT_multiview_draw_buffers
Reviewed-by: Erik Faye-Lund <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5687>
|
|
|
|
|
|
|
|
|
|
|
| |
Without this, NIR contains non-lowerable 32-bit phis for mediump variables.
Structures are not lowered yet.
v2: add the LowerPrecisionTemporaries option
Reviewed-by: Alyssa Rosenzweig <[email protected]> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
|
|
|
|
|
| |
Fixes crash with mediump lowering in:
dEQP-GLES2.functional.shaders.loops.do_while_constant_iterations.basic_mediump_float_fragment
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
|
|
|
| |
This is not needed for lowering expressions, because they always work with
basic types, but it will be needed for lowering variables.
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
|
|
| |
It's unused.
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
|
|
|
|
|
| |
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5622>
|
|
|
|
|
| |
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5622>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first intrinsic is intended to expose the value set by glLineWidth
to shaders internally. The second intrinsic exposes the value actually
sent to the hardware. This may be wider than the first one in order to
implement anti-aliasing. These will be used in later patches to
implement a line smoothing lowering pass.
v2: Add a second intrinsic for the expanded line width for
anti-aliasing.
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>
|
|
|
|
|
|
|
|
|
| |
The line coord is a coordinate along the axis perpendicular to the line.
It is in the range [0,1] between the two edges of the line. It is
available at least on Broadcom hardware.
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>
|
|
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
|
|
|
|
|
|
|
|
|
|
|
|
| |
No drivers are using this anymore so we can delete it and not keep
maintaining this legacy code-path. If any drivers want this in the
future, they should use nir_lower_varst_to_explicit_types followed by
nir_lower_explicit_io.
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
|
|
|
|
|
|
|
| |
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For turnip, we use the "bindless" model on a6xx. Loads and stores with
the bindless model require a bindless base, which is an immediate field
in the instruction that selects between 5 different 64-bit "bindless
base registers", a 32-bit descriptor index that's added to the base, and
the usual 32-bit offset. The bindless base usually, but not always,
corresponds to the Vulkan descriptor set. We can handle the case where
the base is non-constant by using a bunch of if-statements, to make it a
little easier in core NIR, and this seems to be what Qualcomm's driver
does too. Therefore, the pointer format we need to use in NIR has a vec2
index, for the bindless base and descriptor index. Plumb this format
through core NIR.
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5683>
|