Commit graph

72246 commits

Author SHA1 Message Date
Emil Velikov
fa52cf0ccf docs: add release notes for 10.6.5
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit a43b3dd99b)
2015-08-22 11:02:08 +01:00
Chris Wilson
6817e0f1ce i965: Move control flush into pipelined conditional render
The nv_conditional_render piglits were sporadically failing. Moving
the control flush from the write and placing it just before the read
was sufficient to make the piglits pass a 1000/1000 times. The bspec
says that the flush enable bit "waits until all previous writes of
immediate data from post sync circles are complete before executing the
next command" - the operative word being previous!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90691
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Neil Roberts <neil@linux.intel.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-08-22 09:11:18 +01:00
Eric Anholt
eb2776504a vc4: Actually allow math results to allocate into r4.
I switched us to tracking whether the results *could* go to r4, but then
didn't make a separate register class for the class bits that included r4.
Switch the "any" class to actually be "any", and name the "any but r4"
class more appropriately.

total instructions in shared programs: 96798 -> 94680 (-2.19%)
instructions in affected programs:     62736 -> 60618 (-3.38%)
2015-08-21 13:29:26 -07:00
Eric Anholt
89b1b33f44 vc4: Fold the 16-bit integer pack into the instructions generating it.
total instructions in shared programs: 97580 -> 96798 (-0.80%)
instructions in affected programs:     52826 -> 52044 (-1.48%)
2015-08-21 13:29:26 -07:00
Eric Anholt
7e0b868cf3 vc4: Reuse QPU dumping for packing bits in QIR. 2015-08-21 13:29:26 -07:00
Eric Anholt
4ae137534a vc4: Make _dest variants of qir ALU helpers to provide an explicit dest. 2015-08-21 13:29:26 -07:00
Eric Anholt
2002438c91 vc4: Use the SSA defs list for figuring out eligible MOVs for copy prop.
I thought I'd converted this over previously.  It was copy propagating
MOVs badly with the new destination packing flags.
2015-08-21 13:29:26 -07:00
Krzysztof Sobiecki
20746c2e7d st/nine: Always use user constant buffers
We had several reports of users hitting bugs
with the other path to upload constants,
and switching to the user constant buffer
path solves the bugs.

User constant buffers are expected to be slower
for Nvidia cards, so ideally this patch should be
reverted when the path is fixed.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Krzysztof Sobiecki <sobkas@gmail.com>
2015-08-21 22:21:48 +02:00
Axel Davy
f57e9c77e3 st/nine: Silent warning in nine_ff
release build was complaining

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
3cc205bbeb st/nine: Silent warning in sm1_declusage_to_tgsi
release build was complaining

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
d48cab9fa6 st/nine: Silent warning in NineCubeTexture9_ctor
The compiler was complaining the value may be uninitialised
when it is used (which is wrong). Initialize to NULL to silent
the warning.
2015-08-21 22:21:48 +02:00
Axel Davy
2f02d5e814 st/nine: Silent warning in update_vertex_buffer
There was an unused variable
2015-08-21 22:21:48 +02:00
Axel Davy
719f124620 st/nine: Catch setting the same shader
This is quite rare that an app does set again
the same shaders, but it isn't an expensive check
either.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
eba3c390a3 st/nine: Avoid Constant upload when there is no change
It is very common for d3d9 apps to set again the constants
they need before every draw call, even if nothing changed.

Since we are mostly gpu bound, it is better to check
for change, and upload constants again (and thus use
gpu bandwith) only if the constants changed.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
1a747094ed st/nine: Fix the number of texture stages
The number of texture stages is 8.

'tex_stage' array was too big, and thus
the checks with 'Elements(state->ff.tex_stage)' were passing,
causing some invalid API calls to pass, and crash because of
out of bounds write since bumpmap_vars was just the correct size.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
f15ff98e2c st/nine: Use CSO cache for sampler views
The CSO cache unbinds views that are not needed anymore,
which we don't do.
It checks for change before committing the views.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
98f786b270 st/nine: Calculate dummy sampler state only once
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
f5effeb8ea st/nine: Better check shader constant limits
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
bae2c7c154 st/nine: Remove NINED3DRS_ZBIASSCALE
It wasn't giving the expected result.

This fixes some object being transparents
in games like FEAR.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
6379a28aa7 st/nine: Implement special DOTPRODUCT3 behaviour
Taken from wine tests

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
791b794a84 st/nine: Implement ff vertex data passthrough
Fixes Wine tests

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
fb6c76f1ba st/nine: Change nine_state_update order
nine_update_state called every draw call.

This patch attemps to change the order
of the checks to have better control flow

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
4a00e4cdc9 st/nine: Programmable ps D3DTTSS_PROJECTED support
The implementation used Wine tests for conformance

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
b7261528ea st/nine: Complete ff texture transform implementation
Wine tests were used to get it right.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:48 +02:00
Axel Davy
dcb6f764cf st/nine: Change a few advertised caps
There were flags all sm3 cards do advertise,
and we weren't.
Some games can trigger buggy rendering path
if the caps are not what they expect.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
c2480bbab1 st/nine: Advertise Fog flags
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
fcca7ff38a st/nine: Revert to userbuf path when needed
Automatically switch to userbuf path when
we would need to upload fog or bumpmat
constants

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
8f39ffc11e st/nine: Finish Fog implementation
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
69de5d626f st/nine: Rework shader states
Separate state setting and commit
Changes how the shader key is computed

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
854778ea0f st/nine: Remove some useless variables
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: David Heidelberg <david@ixit.cz>
2015-08-21 22:21:47 +02:00
Axel Davy
cb0816c0f6 st/nine: Fix nine_ff_ps_key padding
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
dd4802c8de st/nine: Begin programmable shader fog support
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
2dd59a2d28 st/nine: Fix fixed function fog support
Previous code had only a subcase of fog working right.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
87ec6b56b2 st/nine: Rework ff constant buffers
Always use a user constant buffer for ff.
It means we have to:
. commit the user constant buffer for ff when we use it
. commit back the non-ff constant buffer when we stop using it

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
993e68fa6a st/nine: Rework constant buffer state handling
We have two paths:
. One that uses a fixed constant buffer, and updates it when needed
. One that uses a user constant buffer, and uploads it when needed.

This patch separates the preparation of the constant buffer
and the commit.

It also removes NineDevice9_RestoreNonCSOState, which was
used to restore all states. Instead the commit of the constant
buffer is moved to nine_state, and the other field settings
moved to other functions where more appropriate.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
a3f0d21da9 st/nine: Rework blend states
Separate state preparation and state commit

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
b06f3ee6f4 st/nine: Improve fallback when driver doesn't support user buffers.
For now the path updated is only used by Amd drivers, but a later
patch will make it used by all drivers. Some drivers like llvmpipe
doesn't support the uploading of constants from user buffers, so improve
the path to work for all drivers

Inspired from the gl state tracker.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
a7ce3cd0d3 st/nine: Avoid useless updates in SetSamplerState
Check for redundant settings

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: David Heidelberg <david@ixit.cz>
2015-08-21 22:21:47 +02:00
Axel Davy
5a2302b5ec st/nine: Rework rasterizer states
Separate state preparation and state commit

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
71616d0c50 st/nine: Reorder DSA state settings
Separate state preparation and state commit

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
0628553056 st/nine: Reorder nine_state.
Instead of mixing state preparation (filling pipe_****)
and state commit (pipe->set_*****),
begin doing so in two separate functions.

This will allow to implement efficient Stateblocks,
and eventually lead to optimisation where the complete
pipe_*** structure is only partially updated.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:47 +02:00
Axel Davy
99537f68db st/nine: Remove group_mask argument from nine_update_state
It was only used to discriminate update framebuffer vs update
everything. Instead use two functions.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:46 +02:00
Tiziano Bacocco
360ba5b748 st/nine: Implement TEXBEM,TEXBEML and BEM
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
2015-08-21 22:21:46 +02:00
Patrick Rudolph
620f3e9bfe st/nine: Fix use of uninitialized values
Set all values to 0 after allocation. Found using valgrind.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2015-08-21 22:21:46 +02:00
Patrick Rudolph
248833ff40 st/nine: Prevent possible crash
In case NineBaseTexture9_ctor returns an error
This->surfaces[l] might be NULL.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2015-08-21 22:21:46 +02:00
Patrick Rudolph
bc6c80e547 st/nine: Return correct error codes in NineDevice9_Reset
Allow more than two errors, and return D3DERR_INVALIDCALL
for failed display resolution changes.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2015-08-21 22:21:46 +02:00
Patrick Rudolph
d0a4374e1a st/nine: Fail on D3DUSAGE_DYNAMIC for D3DPOOL_SCRATCH textures
Texture with pool D3DPOOL_SCRATCH and D3DPOOL_MANAGED
cannot be used with flag D3DUSAGE_DYNAMIC.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2015-08-21 22:21:46 +02:00
Axel Davy
f396cd43ab st/nine: Fix Lock Checks for Compressed textures
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-08-21 22:21:46 +02:00
Axel Davy
d0daec1797 st/nine: Impose restrictions on DXTN texture sizes
This is the expected behaviour.

Fixes wine tests.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: David Heidelberg <david@ixit.cz>
2015-08-21 22:21:46 +02:00
Patrick Rudolph
48d895aa4b st/nine: Return NULL pointer in lock error cases
Tests showed, that in case of errors, the pBits pointer is set to NULL.
The pBits field isn't set to NULL in case of an already locked object.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2015-08-21 22:21:46 +02:00