| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
| |
* Resolves missing util_format_linear_to_srgb_8unorm_table symbol.
(cherry picked from commit ad2ffd3bc691fc5049f2043d8c81e1534e78d485)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
llvmpipe disables denorms on purpose (on x86/sse only), because denorms are
generally neither required nor desired for graphic apis (and in case of d3d10,
they are forbidden).
However, this caused some arithmetic tests using denorms to fail on some
systems, because the reference did not generate the same results anymore.
(It did not fail on all systems - behavior of these math functions is sort
of undefined when called with non-standard floating point mode, hence the
result differing depending on implementation and in particular the sse
capabilities.)
So, for the reference, simply flush all (input/output) denorms manually
to zero in this case.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=67672.
Reviewed-by: Jose Fonseca <[email protected]>
(cherry picked from commit 8148a06b8fdb734f7f9a11ce787ee6505939fdaa)
Nominated-by: Matt Turner <[email protected]>
|
|
|
|
|
| |
Cc: 10.2.10.3 10.4 <[email protected]>
(cherry picked from commit ac319d94d38cf3145990002c8216426fe297cd28)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Back to the original commit (8313f444) adding the workaround, we were
enabling it on gens <= 7, even though gens <= 5 can't do multisampling.
I cannot find documentation that says that Sandybridge needs this
workaround but in practice disabling it causes these piglit tests to
fail:
EXT_framebuffer_multisample/interpolation {2,4} centroid-deriv{,-disabled}
On Ironlake:
total instructions in shared programs: 4358478 -> 4349671 (-0.20%)
instructions in affected programs: 117680 -> 108873 (-7.48%)
A bunch of shaders in TF2, Portal 2, and L4D2 are cut by 25~30%.
Cc: "10.4" <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
(cherry picked from commit 1a2de7dce8fcff807a2b42b7197d11b28192fa3e)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On evergreen there are 4 regs, on r600/700 there is only one.
Don't initialise regs and trash someone elses state.
Not sure this fixes anything, but hey one less stupid.
Reviewed-By: Glenn Kennard <[email protected]>
Cc: "10.3 10.4" [email protected]
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 7f21cf71989ba780639594ebb34d6e7345b08436)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nowadays GCC assumes stack pointer is 16-byte aligned even on 32-bits, but that is an assumption OpenGL drivers (or any dynamic library for that matter) can't afford to make as there are many closed- and open- source application binaries out there that only assume 4-byte stack alignment.
V4: fix comment and indentation
V3: move all sse4.1 build flag config to the same location
and add comment as to why we need to do the realign
V2: use $target_cpu rather than $host_cpu
and setup build flags in config rather than makefile
https://bugs.freedesktop.org/show_bug.cgi?id=86788
Signed-off-by: Timothy Arceri <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
CC: "10.4" <[email protected]>
(cherry picked from commit f1b5f2b157a092e93590bd43544fbf2671edab36)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Harvested GPUs have some of their render backends disabled, so
in order to prevent the hardware from trying to render things
with these disabled backends we need to correctly program
the PA_SC_RASTER_CONFIG register.
v2:
- Write RASTER_CONFIG for all SEs.
v3:
- Set GRBM_GFX_INDEX.INSTANCE_BROADCAST_WRITES bit.
- Set GRBM_GFX_INFEX.SH_BROADCAST_WRITES bit when done setting
PA_SC_RASTER_CONFIG.
- Get num_se and num_sh_per_se from kernel.
v4:
- Get correct value for num_se
- Remove loop for setting PA_SC_RASTER_CONFIG
- Only compute raster config when a backend has been disabled.
v5: Michel Dänzer
- Fix computation for chips with multiple SEs
https://bugs.freedesktop.org/show_bug.cgi?id=60879
CC: "10.4 10.3" <[email protected]>
(cherry picked from commit 67dcbcd92cb9877a04747d6cf7fef14c2b8af8b3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes an infinite loop in swrast where the lowering pass unpacks saturate into
clamp but the opt_algebraic pass tries to do the opposite.
v3 (Ian):
This is a revert of commit cfa8c1cb "ir_to_mesa: lower ir_unop_saturate" on
the ir_to_mesa.cpp portion. prog_execute.c can handle saturates in vertex
shaders, so classic swrast shouldn't need this lowering pass.
Cc: "10.4" <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83463
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Abdiel Janulgue <[email protected]>
(cherry picked from commit 39f7b72428d1a55357a24cd26c43880595602090)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was an oversight in the original patch. When PolygonMode is
used, then front faces, back faces, or both may be rendered as
points and are affected by point sprite state.
Note that SNB/IVB can't actually be fully conformant here, for
a legacy context -- we don't have separate sets of pointsprite
enables for front and back faces. Haswell ignores pointsprite
state correctly in hardware for non-point rasterization, so can
do this correctly, but it doesn't seem worth it.
Signed-off-by: Chris Forbes <[email protected]>
Cc: "10.4" <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86764
Reviewed-by: Matt Turner <[email protected]>
(cherry picked from commit ed56c16820aea0e115768d77861fe266380f2595)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GS has an interesting use for mul. Because the GS can emit multiple
vertices per input vertex, and it also has a unique count at the top of the URB
payload, the GS unit needs to be able to dynamically specify URB write offsets
(relative to the global offset). The documentation in the function has a very
good explanation from Paul on the mechanics.
This fixes around 2000 piglit tests on BSW.
v2:
Reworded commit message (Ben) no mention of CHV (Matt)
Change SHRT_MAX to USHRT_MAX (Ken, and Matt)
Update comment in code to reflect the use of UW (Ben)
Add Gen7+ assertion for the relevant GS code, since it won't work on Gen6- (Ken)
Drop the bogus hunk in emit_control_data_bits() (Ken)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84777 (with many dupes)
Cc: "10.4 10.3 10.2" <[email protected]>
Signed-off-by: Ben Widawsky <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
(cherry picked from commit f13870db09d7a10141b5ffc24058bb2abceaa035)
|
|
|
|
|
|
|
| |
Matches what u_vbuf_get_minmax_index() does.
Reviewed-by: Ilia Mirkin <[email protected]>
(cherry picked from commit f9098f09720d9b751e8529b2648971ee7d576b37)
|
|
|
|
|
|
|
|
| |
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.4 10.3" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
(cherry picked from commit c3bed13604fdcd50324f3535ef38d25f1e08245d)
|
|
|
|
|
|
|
|
| |
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.3 10.4" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
(cherry picked from commit fb434e675f4d9e6685eefd11135ff8630b25ed6b)
|
|
|
|
|
|
|
|
|
|
|
| |
The index_bias (aka base_vertex) applies to the downstream draw just as
much, since the actual index values are never modified.
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.3 10.4" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
(cherry picked from commit 1dfa0391689d71a379cc47a7f39b5f8b0318f891)
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nine code to match vertex declaration to vs inputs was limiting
the number of possible combinations.
Some sm3 games have issues with that, because arbitrary (usage/index)
can be used.
This patch does the following changes to fix the problem:
. Change the numbers given to (usage/index) combinations to uint16
. Do not put limits on the indices when it doesn't make sense
. change the conversion rule (usage/index) -> number to fit all combinations
. Instead of having a table usage_map mapping a (usage/index) number to
an input index, usage_map maps input indices to their (usage/index)
Cc: "10.4" <[email protected]>
Tested-by: Yaroslav Andrusyak <[email protected]>
Acked-by: Ilia Mirkin <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit 712a4c5438d0ce257344b5196c20ad7929b54a0e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TGSI_SEMANTIC_GENERIC
With sm3, you can declare an input/output with an usage and an usage index.
Nine code hardcodes the translation usage/index to a corresponding TGSI code.
The translation was limited to a few usage/index combinations that were corresponding
to most of the needs of games, but some games did not work.
This patch rewrites that Nine code to map all possible usage/index combination
to TGSI code. The index associated to TGSI_SEMANTIC_GENERIC doesn't need to be low
for good performance, as the old code was supposing, and is not particularly bounded
(it's UINT16). Given the index is BYTE, we can map all combinations.
Cc: "10.4" <[email protected]>
Tested-by: Yaroslav Andrusyak <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit 5d6d260833e374404f80d1c36bc0e1854369a069)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issuing D3DISSUE_END should:
. reset previous queries if possible
. end the query
Previous behaviour wasn't calling end_query for
queries not needing D3DISSUE_BEGIN, nor resetting
previous queries.
This fixes several applications not launching properly.
Cc: "10.4" <[email protected]>
Tested-by: David Heidelberg <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit eac0b9b68a14719be01bbabd8d3807d81694685b)
Conflicts:
src/gallium/state_trackers/nine/query9.c
|
|
|
|
|
|
|
|
|
| |
height=0 is legal for 1D array textures (as depth=0 is legal for
2D arrays). Fixes new piglit ext_texture_array-errors test.
Cc: "10.3 10.4" <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 4e6244e80f7dd6dad526ff04f5103ed24d61d38a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 73dd50acf6d244979c2a657906aa56d3ac60d550
glsl: implement switch flow control using a loop
The SB backend was falling over in an assert or crashing.
Tracked this down to the loops having no repeats, but requiring
a working break, initial code just called the loop handler for
all non-if statements, but this caused a regression in
tests/shaders/dead-code-break-interaction.shader_test.
So I had to add further code to detect if all the departure
nodes are empty and avoid generating an empty loop for that case.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86089
Cc: "10.4" <[email protected]>
Reviewed-By: Glenn Kennard <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 7b0067d23a6f64cf83c42e7f11b2cd4100c569fe)
|
|
|
|
|
|
|
|
|
| |
We need parenthesis around the expression which computes the number of
blocks per row.
Reviewed-by: Matt Turner <[email protected]>
Cc: "10.3 10.4" <[email protected]>
(cherry picked from commit 991d5cf8ce5c7842801fdb0378bf5aca5a59cc4c)
|
|
|
|
|
|
|
|
|
| |
Looks like none of the mad variants do u16 * u16 + u32, so just add in
the extra value "by hand".
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.3 10.4" <[email protected]>
(cherry picked from commit de83ef677f6d845e63f9e5e790d3078372f752df)
|
|
|
|
|
|
|
|
|
| |
This fixes arb_color_buffer_float-render GL_RGBA16F.
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.3 10.4" <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
(cherry picked from commit 3de9fa8ff47bd6b186f9d57511cb9fe08618f62f)
|
|
|
|
|
|
|
|
| |
This instruction is used by st/nine.
Reviewed-by: Ilia Mirkin <[email protected]>
Cc: "10.4" <[email protected]>
(cherry picked from commit f3b4b263c2f08f641c42a02bf3c57c3da2fc0414)
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is an sint_4, but it was stored in a uint_8...
The code using it was acting as if it was signed.
Problem found thanks to Coverity
Cc: "10.4" <[email protected]>
Tested-by: David Heidelberg <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit d52328fc398aae4c3582172516b0ad98f0677b58)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2efabd9f5a711a7f6cd1846630244b7814bf25b3 removed them as unused.
This caused random memory overwrites (reported by Coverity).
Cc: "10.4" <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
(cherry picked from commit 90fea6b3e0153c12d8d1a0f817c56a3efa0ce99c)
|
|
|
|
|
|
|
|
|
|
| |
Error detected by Coverity (COPY_PASTE_ERROR)
Cc: "10.4" <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
(cherry picked from commit 614d9387c796f384a26c85e156768d71bb17baeb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PIPE_CAP_VIDEO_MEMORY returns the amount of video memory in megabytes,
so need to converted it to bytes.
Fixed Warframe memory detection.
v2: also prepare for cards with more than 4GB memory
Cc: "10.4" <[email protected]>
Tested-by: Yaroslav Andrusyak <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
(cherry picked from commit a99f31bced1ac5dfea9942bb37301a21c9a73189)
|
|
|
|
|
|
|
|
|
|
|
|
| |
D3DPOOL_SCRATCH is disallowed according to spec.
D3DPOOL_SYSTEMMEM should be allowed but we don't handle it right for now.
v2: Fixes segfault in SetTexture when unsetting the texture
Cc: "10.4" <[email protected]>
Tested-by: David Heidelberg <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit 4eea2496bcb573d730f84f34fb76db3e1ec2e733)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes "Error : CONST[20]: Undeclared source register" when running
dx9_alpha_blending_material. Also artifacts on ilo.
v2: also remove unused MISC_CONST
Cc: "10.4" <[email protected]>
Tested-by: David Heidelberg <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit 890f963d649cd85a0b0199f49384a41cc0e3636e)
|
|
|
|
|
|
|
|
|
| |
Cc: "10.4" <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: David Heidelberg <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
Signed-off-by: Stanislaw Halik <[email protected]>
(cherry picked from commit 7f74b9d47928979fdad445db1e0f249688c62991)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves the data field from Resource9 to Surface9 and cleans
D3DPOOL_SYSTEMMEM handling in Texture9. This fixes HL2 lost coast.
It also removes in Texture9 some code written to support importing
and exporting non D3DPOOL_SYSTEMMEM shared buffers. This code hadn't
the design required to support the feature and wasn't used.
Cc: "10.4" <[email protected]>
Tested-by: David Heidelberg <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit 6aeae7442d1d5a8b1ff77b6f50f4ac7333cd22b0)
|
|
|
|
|
|
|
|
|
|
| |
Instead of having parts of the structures initialised by the parents,
have them initialised by the children.
Cc: "10.4" <[email protected]>
Tested-by: David Heidelberg <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit 133b2087c5ba9942527bc1b218a32205fb7a10a6)
|
|
|
|
|
|
|
|
|
|
| |
Pass ex specific parameters as arguments to device9 ctor instead
of passing them by filling the structure.
Cc: "10.4" <[email protected]>
Reviewed-by: David Heidelberg <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
(cherry picked from commit 104b5a81933b7a2f4fa24302a1d972ad3dd0dec6)
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
| |
madsh.m16 can't handle a const in src1, make sure to unconst it
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Cc: "10.3 10.4" <[email protected]>
(cherry picked from commit 37fe347542aad40aac5be9066c21f65f55d0f48c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are using 1 more buffer than we have, although in the future the
driver should just end up using one buffer in total probably, this
is a good first step, it merges the txq cube array and buffer info
constants on r600 and evergreen.
This should in theory fix geom shader tests on r600.
v1.1: fix comments from Glenn.
Reviewed-by: Glenn Kennard <[email protected]>
Cc: "10.4 10.3" <[email protected]
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 07ae69753c6818bcce5d4edaf2cca39c20e37f4c)
Squashed with commit
r600g: fix fallout from last patch
I accidentally rebased from the wrong machine and missed some
fixes that were on my r600 box.
doh.
this fixes a bunch of geom shader textureSize tests on rv635
from gpu reset to pass.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86760
Reported-by: [email protected]
Cc: "10.4 10.3" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit b10ddf962f2ca09073a13ad19817bf7c9b158294)
Squashed with commit
r600g: make llvm code compile this time
Actually compiling the code helps make it compile.
Cc: "10.3 10.4" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 91a827624c01d40613e97322632aaffe319540f1)
|
|
|
|
|
|
|
|
|
|
| |
It's not exported by the official opengl32.dll neither. Applications are
supposed to get it via wglGetProcAddress(), not GetProcAddress().
Cc: "10.4" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
(cherry picked from commit cb009bdd44c41112a52fe643dfd323e351bb40b3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes several MSVC warnings like:
warning C4273: 'glClearColorx' : inconsistent dll linkage
In fact, we should avoid using `declspec(dllexport)` altogether, and use
exclusively the .DEF instead, which gives more precise control of which
symbols must be exported, but all the public GL/GLES headers practically
force us to pick between `declspec(dllexport)` or
`declspec(dllimport)`.
Cc: "10.4" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
(cherry picked from commit 5fdb6d683984ff44fca7d89e6716b1085970e993)
|
|
|
|
|
|
|
|
|
|
| |
We now always guarantee availability of stdint.h on MSVC -- if MSVC
doesn't supply one we use our own.
Cc: "10.4" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
(cherry picked from commit 4b6e93650cfe5f2c285cf601d7f3e8286ce40d3c)
|
|
|
|
|
|
|
|
|
|
| |
The version provided by it should be the same as the one
provided/handled by the module. Add the missing tiny version.
Cc: <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: David Heidelberg <[email protected]>
(cherry picked from commit 9b7037a3696cc9282f209435fc26702998341b5e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes broken rendering in Windows-based QtQuick2 apps run through Wine.
This library sets all texture units' GL_COORD_REPLACE, leaves point
sprite mode enabled, and then draws a triangle fan.
Will need a slightly different fix for Gen4-5, but I don't have my old
machines in a usable state currently.
V2: - Simplify patch -- the real changes are no longer duplicated across
the Gen6 and Gen7 atoms.
- Also don't clobber attr overrides -- which matters on Haswell too,
and fixes the other half of the problem
- Fix newly-introduced warnings
V3: - Use BRW_NEW_GEOMETRY_PROGRAM and brw->geometry_program rather than
core flag and state; keep the state flags in order.
Signed-off-by: Chris Forbes <[email protected]>
Cc: "10.4" <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84651
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 0008d0e59eff365079323918508ffc87355a6bfd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ilia noticed that my lowering pass was converting the constant array
used by textureGatherOffsets' offsets parameter to a uniform. This
broke textureGather for Nouveau, and is generally a horrible plan,
since it violates the GLSL constraint that offsets must be an
immediate constant.
When I wrote this pass, I neglected to consider whole array assignment.
I figured opt_array_splitting would handle constant indexing, so this
pass was really about fixing variable indexing.
textureGatherOffsets is an example of whole array access that we really
don't want to touch. Whole array copies don't appear to benefit from
this either - they're most likely initializers for temporary arrays
which are going to be mutated anyway. Since you're copying, you may
as well copy from immediates, not uniforms.
This patch makes the pass look for ir_dereference_arrays of
ir_constants, rather than looking for any ir_constant directly.
This way, it ignores whole array assignment.
No shader-db changes or Piglit regressions on Haswell. Some Piglit
tests generate different code (fixing textureGatherOffsets on Nouveau).
Signed-off-by: Kenneth Graunke <[email protected]>
Tested-by: Ilia Mirkin <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Cc: "10.4" <[email protected]>
(cherry picked from commit 60f011af1a370004333cbc3fee7fec137ebd9d6a)
|
|
|
|
|
|
|
|
|
|
| |
This was just returning the same value as GL_CURRENT_MATRIX_ARB.
Spotted while investigating something else in apitrace.
Signed-off-by: Chris Forbes <[email protected]>
Cc: "10.3 10.4" <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 2b4fe85f0ea613463b8bba3149183eca97e98e75)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uniform names (even for hidden uniforms) are required to be unique; some
parts of the compiler assume they can be looked up by name.
Fixes the piglit test: tests/spec/glsl-1.20/linker/array-initializers-1
Signed-off-by: Chris Forbes <[email protected]>
Cc: "10.4" <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 129178893b2260df22db96327c5ca9c2ce7db046)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When converting a uniform array reference to a pull constant load, the
`reladdr` expression itself may have its own `reladdr`, arbitrarily
deeply. This arises from expressions like:
a[b[x]] where a, b are uniform arrays (or lowered const arrays),
and x is not a constant.
Just iterate the lowering to pull constants until we stop seeing these
nested. For most shaders, there will be only one pass through this loop.
Fixes the piglit test:
tests/spec/glsl-1.20/linker/double-indirect-1.shader_test
Signed-off-by: Chris Forbes <[email protected]>
Cc: "10.3 10.4" <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit adefccd12a534f0deac7b78db73693fe1dcef2ec)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves all the CUBE section above the gradients section,
so that the gradient emission happens on one block which
is what sb/hardware expect.
v2: avoid changes to bytecode by using spare temps
v2.1: shame gcc, oh the shame. (uninit var warnings)
Cc: "10.4 10.3" <[email protected]>
Reviewed-by: Glenn Kennard <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit c88385603ae8d983314b736a9459bbf7d002cf11)
|