| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This is an unneeded diff between the vulkan and master branches
|
|
|
|
|
|
| |
While it does rely on NIR, it's not really part of the NIR core. At the
moment, it still builds as part of libnir but that can be changed later if
desired.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The old version of the pass only worked on globals and locals and always
left inputs, outputs, uniforms, etc. alone.
Reviewed-by: Kenneth Graunke <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The algorithm used is different from both the naive suggestion from the
GLSL spec and the one used in GLSL IR today. Unfortunately, the GLSL IR
implementation that we have today doesn't handle denormals (for those that
care) or the case where the float source is +-inf.
Reviewed-by: Matt Turner <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
These are all needed for SPIR-V
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
|
| |
| |
| |
| |
| |
| | |
Acked-by: Eric Anholt <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
|
| |
| |
| |
| |
| |
| | |
Acked-by: Eric Anholt <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are several passes where we need to specify some set of variable
modes that the pass needs top operate on. This lets us easily do that.
Acked-by: Eric Anholt <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
vertex_input_slots would be an appropriate name for an integer, but not
a bool.
Also remove a cond ? true : false from a count_attribute_slots() call
site, noticed during the rename.
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
|
| |
| |
| |
| |
| | |
Reported-by: Mark Janes <[email protected]>
Reviewed-by: Eduardo Lima Mitev <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is kind of a hack. We currently track precise requirements
by decorating ir_variables. Propagating or grafting the RHS of an
assignment to a precise value into some other expression tree can
lose those decorations.
In the long run, it might be better to replace these ir_variable
decorations with an "exact" decoration on ir_expression nodes,
similar to what NIR does.
In the short run, this is probably good enough. It preserves
enough information for glsl_to_nir to generate "exact" decorations,
and NIR will then handle optimizing these expressions reasonably.
Fixes ES31-CTS.gpu_shader5.precise_qualifier.
v2: Drop invariant handling, as it shouldn't be necessary (caught
by Jason Ekstrand).
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ARB_program_interface_query requires that we add struct fields
recursively down to basic types.
Fixes 52 struct test cases in dEQP-GLES31.functional.program_interface_query.*
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
No functional change here, but this now lets us recurse throught structs
in add_shader_variable().
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This lets us pass in the absolution location of a variable instead of
computing it in add_shader_variable() based on variable location and
bias. This is in preparation for recursing into struct variables.
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This consolidates the combination of create_shader_variable() and
add_program_resource() into a new helper function. No functional
difference, but we'll expand add_shader_variable() in the next few
commits.
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes
dEQP-GLES31.functional.uniform_location.negative.atomic_fragment
dEQP-GLES31.functional.uniform_location.negative.atomic_vertex
Both of which have lines like
layout(location = 3, binding = 0, offset = 0) uniform atomic_uint uni0;
The ARB_explicit_uniform_location spec makes a very tangential mention
regarding atomic counters, but location isn't something that makes sense
with them.
Signed-off-by: Ilia Mirkin <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Suggested by Timothy Arceri a while back on mesa-dev:
https://lists.freedesktop.org/archives/mesa-dev/2016-February/107735.html
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Acked-by: Matt Turner <[email protected]>
|
| |
| |
| |
| |
| | |
Signed-off-by: Rhys Kidd <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
| |
| |
| |
| |
| |
| | |
Trivial.
Signed-off-by: Ian Romanick <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Dolphin uses them a lot. Range tracking would be better in the long term,
but this two lines works fine for now.
Signed-off-by: Markus Wick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some passes may not refer to options->..., at which point the compiler
will warn about an unused variable. Just cast to void unconditionally
to shut it up.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eduardo Lima Mitev <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many shaders contain expression trees of the form:
const_1 * (value * const_2)
Reorganizing these to
(const_1 * const_2) * value
will allow constant folding to combine the constants. Sometimes, these
constants are 2 and 0.5, so we can remove a multiply altogether. Other
times, it can create more immediate constants, which can actually hurt.
Finding a good balance here is tricky. While much more could be done,
this simple patch seems to have a lot of positive benefit while having
a low downside.
shader-db results on Broadwell:
total instructions in shared programs: 8963768 -> 8961369 (-0.03%)
instructions in affected programs: 438318 -> 435919 (-0.55%)
helped: 1502
HURT: 245
total cycles in shared programs: 71527354 -> 71421516 (-0.15%)
cycles in affected programs: 11541788 -> 11435950 (-0.92%)
helped: 3445
HURT: 1224
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eduardo Lima Mitev <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
|
| |
| |
| |
| | |
Reviewed-by: Rob Clark <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
These weren't added before because they are actually calculated values that
are computed from other inputs. However, in order to handle them in
nir_lower_system_values, it's nice for them to have a cannonical locaiton.
Reviewed-by: Rob Clark <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
In Vulkan, you have InstanceIndex which begins at the base instance value
rather than the zero-based InstanceID of GL.
Reviewed-by: Rob Clark <[email protected]>
|
| |
| |
| |
| |
| | |
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Analogous to previous commit - improved readability at the expense of
an extra file.
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Preserve the functionality while keeping the files smaller and
more readable.
v2: Do not include Makefile.sources from the GLSL makefile (silences
automake warnings)
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Jason Ekstrand <[email protected]> (v1)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
No longer used as of last commit.
v2: Rebase.
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Jason Ekstrand <[email protected]> (v1)
|
| |
| |
| |
| |
| |
| |
| | |
Analogous to previous commit.
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
It will allow us to remove the duplicate glsl/Makefile.sources.
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
v2: Undo unintended change to the signature of
nir_normalize_cubemap_coords (Iago).
v3: Move to compiler/nir (Iago)
v4: Remove Authors from copyright header (Michael Schellenberger)
v5 (Sam):
- Use nir_channel() and nir_ssa_for_alu_src() helpers (Jason)
- Inline lower_double_pack_instr() code into lower_double_pack_block()
(Jason).
- Initialize nir_builder at lower_double_pack_impl() (Jason).
Signed-off-by: Iago Toral Quiroga <[email protected]>
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
v2 (Sam):
- Use uint64 instead of float64 for sources and destinations. (Connor)
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| | |
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
v2 (Sam):
- Use uint64 instead of float64 for sources and destinations. (Connor)
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
v2:
- Assert supports_int and don't fallback to nir_fmov (Jason)
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| | |
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| | |
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
v2 (Sam):
- Add missing bit_size assignment when ssbo_load destination is a boolean.
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| | |
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| | |
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
v2: Revert spurious change in nir_opt_cse.c (Iago)
Signed-off-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
v2 (Sam):
- Use proper bitsize value when calling to nir_load_const_instr_create()
(Jason).
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
v2:
- Squash the printing doubles related patches into one patch (Sam).
v3:
- Print using PRIx64 format: long is 32-bit on some 32-bit platforms but long
long is basically always 64-bit (Jason).
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
v2:
- Don't set sized types to the destination of texture related opcodes.
(Jason)
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
v2 (Sam):
- Add assert to detect bitsizes differents than 32 and 64 (Jason).
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
v2 (Sam):
- Use helper to get base type from nir_alu_type.
Reviewed-by: Jason Ekstrand <[email protected]>
|
| |
| |
| |
| | |
Reviewed-by: Jason Ekstrand <[email protected]>
|