| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apps can know if the window is occluded by checking for
specific error messages. The behaviour is different
for Device9 and Device9Ex.
This allow games to release the mouse and stop rendering
until the focus is restored.
In case of multiple swapchain we do care only of the device one.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
| |
To keep compatible with older ID3DPresent interfaces (used to talk
with Wine), store the minor version num accessible to all
statetracker functions (in the NineDevice9 structure).
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
flush_resource needs to be called before flush (for
fast clear resolve, etc).
Removes useless computation of resource (it is
already set correctly).
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return D3DERR_INVALIDCALL instead of E_POINTER.
On error set ppBackBuffer to NULL.
Multiple swapchains can only be created in windowed mode as
windowed swapchain.
Set backbuffer to NULL in NineDevice9_GetBackBuffer, but not
in NineSwapChain9_GetBackBuffer.
This fixes all WINE's device.c test_swapchain() tests.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When no window is specified, we should revert to the focus window.
This deserves more tests however (what if the device swapchain is
already using the focus window ?)
Fixes crash for FFXIV
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
| |
In case swapchain creation fails This->swapchains[i] might be NULL and
causes a crash.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
Return errors in case of invalid presentation parameters.
Fixes failing WINE tests device.c test_swapchain_parameters().
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Store a copy of GUID in the header that is under our control and use it
as key for the hashtable instead of using the application provided pointer.
The application might change the memory after leaving the function.
Fixes a crash for issue https://github.com/iXit/Mesa-3D/issues/130
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
To ease debugging print the GUID instead of the pointer to it.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
The values of box.z and box.depth weren't set and lead to a crash.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Tests show in case of multisample mismatch between the depth-stencil
buffer and the render target, then it is not cleared.
Fixes failing WINE test visual.c test_multisample_mismatch().
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Check for valid locked box dimensions.
Fixes failing wine tests device.c test_lockbox_invalid.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Fixes crash for non-square textures.
We were using the height instead of the
width for some calculations.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for D3DFMT_R8G8B8. It allows format conversion for
surfaces of pool scratch.
Usually gallium formats equivalents for d3d9 formats
have their names reversed.
The gallium format PIPE_FORMAT_R8G8B8_UNORM is the right
equivalent here, and its name is likely wrong (reversed).
Fixes a crash in TmNationsForever.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Use CSO to catch redundant viewport changes.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Shade mode flat is only working if pixelshaders have interpolate
set to TGSI_INTERPOLATE_COLOR on color inputs.
Fixes failing WINE tests visual.c test_shademode().
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
Clear every rendertarget on creation.
Fixes https://github.com/iXit/Mesa-3D/issues/139
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
Report success instead of failing as there's no resource for those surfaces.
Fixes a crash in Crysis: Warhead.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous vertex elements code update
was protected by
'if ((group & (NINE_STATE_VDECL | NINE_STATE_VS)) ||
state->changed.stream_freq & ~1)'
itself protected by
'if (group & (NINE_STATE_COMMON | NINE_STATE_VS))'
If no state is changed except the stream frequency,
no update would happen.
This patch solves the problem by adding a new
NINE_STATE_STREAMFREQ state.
Another way would be to add state->changed.stream_freq & ~1
check to the main test.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
| |
Some apps do redundant SetStreamSourceFreq calls.
Catch them to improve performance.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
|
| |
The indexbuffer9 codebase was lagging behind the one of vertexbuffer9.
Add buffer9 as common code base for indexbuffer9 and vertexbuffer9.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
We forgot to reset vtxbuf.
This fixes some crashes.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
| |
This seems cleaner to actually reference the resources for vtxbuf,
rather than relying on the fact the bound d3d streams do.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an application sets a vertex shader, we are supposed
to use it, and when no vertex shader are set, we are supposed
to revert to fixed function vertex shader.
It seems there is an exception: when the vertex declaration
has a position_t index, we should revert to fixed function
vertex shader.
Up to know we were checking if device->state.vs is set
to know whether to use programmable shader or not.
With this commit we determine whether we use programmable shader
or not when vertex shader/declaration are set, but
stateblocks do complicate things a bit.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
|
| |
NineUnknown_ctor increments the refcount even in case of an error.
Restructure the code to prevent refcount increments.
Fixes a couple of wine tests.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Textures in SYSTEMMEM don't have resources attached.
Instead of returning an error for them, StretchRect
was crashing.
This changes the check order to fix that case.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
| |
This fixes a crash.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
| |
The last weighted element is one minus the sum of all previous weights.
Fixes WINE test visual.c test_vertex_blending.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Replace r[0] with tmp to ease code reading.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
In case of non local viewer the value has to be subtracted.
Fixes failing WINE tests in test_specular_lighting() (visual.c)
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
Implement fixed function D3DRS_SPECULARENABLE.
Fixes failing WINE tests in test_specular_lighting() (visual.c)
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Set key->localviewer to D3DRS_LOCALVIEWER.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vs1.1 rounds a0 to lowest integer, while
other versions do round to closest.
To use the same path as the other versions (with ARR),
we were substracting 0.5 for vs1.1 to get round to lowest.
This gives wrong result if a0 is set to 0:
round(0 - 0.5) = -1
Instead just use ARL for vs1.1
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation of the flag doesn't make sense.
To sum up the doc, if not set, specular alpha contains fog,
and if set specular alpha contains 0 (except for ff).
However in practice when the flag is there, apps do use specular alpha
as if it could be used normally, which makes much more sense than the doc.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
|
|
|
| |
AlphaCmpCaps should advertise D3DPCMPCAPS_NEVER as well.
Fixes https://github.com/iXit/Mesa-3D/issues/142
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Based on a gallivm patch by Ilia Mirkin.
+8 piglit regressions due to precision issues (I blame the tests)
The benefit is that we'll get v_cvt_f32_f16 and v_cvt_f16_f32 instead
of emulation with integer instructions. They are GLSL 4.00 intrinsics.
Reviewed-by: Michel Dänzer <[email protected]>
|
|
|
|
|
|
|
| |
Reported-by: Jan Ziak <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93989
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No instruction counts changed, but:
total cycles in shared programs: 64834502 -> 64781530 (-0.08%)
cycles in affected programs: 16331544 -> 16278572 (-0.32%)
helped: 4757
HURT: 4288
GAINED: 66
LOST: 20
I remember trying this when I first wrote the pass, but it wasn't
helpful at the time.
Reviewed-by: Francisco Jerez <[email protected]>
|
|
|
|
|
| |
Cc: 11.0 11.1 <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
64-bit Pentium 4 CPUs don't have the 3DNow prefetch instructions
which results in an Illegal instruction crash.
Cc: "11.0 11.1" <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Tested-by: Timothy Arceri <[email protected]>
https://bugs.freedesktop.org/show_bug.cgi?id=27512
|
|
|
|
|
|
|
|
|
| |
We must fetch all sources into the instruction stream before generating
the instruction that uses them. Otherwise we'll define values after
using them, which won't work so well.
Signed-off-by: Ilia Mirkin <[email protected]>
Tested-by: Samuel Pitoiset <[email protected]>
|
|
|
|
|
|
|
| |
Spotted by Coverity
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
|
|
|
|
|
|
|
| |
Spotted by Coverity
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EXT spec has been updated to:
- logically combine the es2_profile and es_profile exts
- allow any legal version to be requested
dEQP tests request a specific ES version when using GLX, so this allows
dEQP upstream to run against GLX with the appropriate X server patch
(which had similar disabling logic).
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Matt Turner <[email protected]> (v1)
Reviewed-by: Adam Jackson <[email protected]> (v3)
v1 -> v2:
- distinguish between DRI_API_GLES{,2,3}
- add GLX_EXT_create_context_es_profile client-side support
v2 -> v3:
- fix error in computing mask
|
|
|
|
|
|
|
|
| |
While this is the default, private .emacs files might have it set to
something else. No harm in forcing it to 0.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To prevent build failures when a large patch series is committed, like
happened in https://ci.appveyor.com/project/jrfonseca-fdo/mesa/build/322
due to 10 commits between dac2964f3ebd96d5ac227984ab0cd79c2c3b2a1a and
6f428328d34bed16edb8709e4a117eb710d7893d where submitted before the
build slave started the git clone.
100 commits should be bigger than any patch series seen in practice, and
it takes practically the same time to download as 5 commits.
Reviewed-by: Roland Scheidegger <[email protected]>
|
|
|
|
|
|
| |
Whoops, didn't mean to push this one.
This reverts commit 78f4c555b93eb0951dcd9c5812109d506dd03023.
|
|
|
|
| |
Signed-off-by: Rob Clark <[email protected]>
|
|
|
|
|
|
|
| |
We seem to end up w/ duplication between compiler/Makefile.sources and
compiler/glsl/Makefile.sources. The latter appears unused. Delete it.
Signed-off-by: Rob Clark <[email protected]>
|