Commit graph

81589 commits

Author SHA1 Message Date
Tim Rowley
c969ef2d42 swr: [rasterizer core] clang override for _mm_undefined*
Not supported in older xcode versions.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:49 -05:00
Tim Rowley
da75160039 swr: [rasterizer common] add OSX to unix portability sections
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:44 -05:00
Tim Rowley
4997169779 swr: [rasterizer] rename _aligned_malloc to AlignedMalloc
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:38 -05:00
Tim Rowley
2e4ef23523 swr: [rasterizer jitter] rename MEMCPY function to MEMCOPY
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:30 -05:00
Tim Rowley
aebbd2f7dd swr: [rasterizer common] guard definition of __cdecl/__stdcall
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:24 -05:00
Tim Rowley
82e335ce67 swr: [rasterizer common] include cstddef for offsetof
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:19 -05:00
Tim Rowley
759d8cf3a3 swr: [rasterizer core] removed tabs that snuck in
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:14 -05:00
Tim Rowley
8e39d410f1 swr: [rasterizer core] code style cleanup
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:08 -05:00
Tim Rowley
b914217c25 swr: [rasterizer core] add dummy code for cygwin build
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:26:02 -05:00
Tim Rowley
a0747c4ce3 swr: [rasterizer core] move variable query outside loop
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:25:54 -05:00
Tim Rowley
f2a1f894ba swr: [rasterizer core] utility function for getenv
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:25:48 -05:00
Tim Rowley
4a58b21ef7 swr: [rasterizer common] portable threadviz buckets
Output with slashes instead of backslashes for unix/linux.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:25:30 -05:00
Tim Rowley
2031baffb5 swr: [rasterizer common] foreground win32 assert dialog
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:25:24 -05:00
Tim Rowley
33d4c2c798 swr: [rasterizer core] use parens to disambiguate operator precedence
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 16:25:06 -05:00
Tim Rowley
9475251145 swr: standardize linkage and check for unresolved symbols
Acked-by: Emil Velikov <emil.velikov@collabora.com>
2016-05-19 13:27:33 -05:00
Tim Rowley
6423004d85 swr: fix swr linkage so that static llvm works
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-05-19 13:27:33 -05:00
Tim Rowley
8987460b9e swr: PIPE_CAP_CULL_DISTANCE cap request response
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 13:27:33 -05:00
Tim Rowley
78572c9b0b docs: add swr to GL3.txt
v2: not on gl3.3 list until gl3.2 is complete

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-05-19 13:27:17 -05:00
Leo Liu
2f90d11d86 st/va: use drm render node for wayland display type
With xwayland, vainfo use VA_DISPLAY_WAYLAND as default and it fails
and fails when specify display with  `vainfo --display wayland`.
In fact wayland support for libva uses drm path to connect device,
and should use drm pipe loader to create screen.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-05-19 09:40:33 -04:00
Marek Olšák
f6742859b7 gallium/radeon: small cleanups in r600_texture_transfer_map
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-19 12:35:50 +02:00
Marek Olšák
54737aabb9 gallium/radeon: don't set PB_USAGE in winsyses
There is no point.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-19 12:35:50 +02:00
Marek Olšák
f330b7a14f gallium/radeon: handle VRAM_GTT placements as having slow CPU reads
not sure if we should include GTT WC too

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-19 12:35:50 +02:00
Marek Olšák
5e14d0ac2c gallium/radeon: ignore PIPE_TRANSFER_MAP_DIRECTLY
Only st/xa is using this, which is irrelevant to us.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-19 12:35:50 +02:00
Marek Olšák
51cf04cf0e radeonsi: add a workaround for a bug in LLVM <= 3.8
This is not directly applicable to stable and needs to be backported.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-19 12:35:50 +02:00
Eduardo Lima Mitev
7671687713 i965/fs: Silence warnings related to use of uninitialized values
brw_fs.cpp: In function ‘const unsigned int* brw_compile_fs(const [...]
brw_fs.cpp:6093:64: warning: ‘simd16_grf_start’ may be used uninitialized [...]
       prog_data->base.dispatch_grf_start_reg = simd16_grf_start;

brw_fs.cpp:5996:29: note: ‘simd16_grf_start’ was declared here
    uint8_t simd8_grf_start, simd16_grf_start;

brw_fs.cpp:6094:52: warning: ‘simd16_grf_used’ may be used uninitialized [...]
       prog_data->reg_blocks_0 = brw_register_blocks(simd16_grf_used);

brw_fs.cpp:5997:29: note: ‘simd16_grf_used’ was declared here
    unsigned simd8_grf_used, simd16_grf_used;

(and more)

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-05-19 09:05:18 +02:00
Eric Anholt
a507dcc160 vc4: Size transfer temporary mappings appropriately for full maps of 3D.
We don't really support reading/writing of 3D textures since the hardware
doesn't do 3D, but we do need to make sure that a pipe_transfer for them
has enough space to store the image.  This was previously not a problem
because the state tracker only mapped a slice at a time until
fb9fe352ea.  Fixes glean glsl1 tests, which
all have setup of a 3D texture at the start.
2016-05-18 17:30:07 -07:00
Nanley Chery
7ac08adfb4 anv/device: Fix viewportBoundsRange
Align with the spec requirement that the range must be at least
[−2 × maxViewportDimensions, 2 × maxViewportDimensions − 1]. Our
hardware supports this.

Fixes dEQP-VK.api.info.device.properties

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94896
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-05-18 16:01:50 -07:00
Dave Airlie
61b6789252 glsl/linker: attempt to match anonymous structures at link
This is my attempt at fixing at least one of the UE4 bugs with GL4.3.

If we are doing intrastage matching and hit anonymous structs, then
we should do a record comparison instead of using the names.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95005
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-05-19 08:16:50 +10:00
Mark Janes
4dfa89e33c anv/batch_chain: free pointers for error cases
Trivial fix to improperly handled cleanup during
VK_ERROR_OUT_OF_HOST_MEMORY.

Identified by Coverity: CID 1358908 and 1358909
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-18 15:14:22 -07:00
Wang He
f21b7d1e5c st/nine: Minor change to support musl libc
A few changes to support musl libc as well.

In particular fpu_control.h is glibc specific.
fenv.h doesn't enable to do exactly what we want either,
so instead use assembly directly.

Signed-off-by: Wang He <xw897002528@gmail.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Patrick Rudolph
de39231134 st/nine: Enable D3DPMISCCAPS_PERSTAGECONSTANT
Nine already supports the feature.
There are no failing WINE tests for per stage constants.
Enabling D3DPMISCCAPS_PERSTAGECONSTANT as it fixes
https://github.com/iXit/Mesa-3D/issues/205

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
839f417634 st/nine: Turn on thread_submit by default when on different device
The last remaining issues with thread_submit have been resolved,
thus turn it when on a different device (the case where is is
beneficial).

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
9cae3cdc89 st/nine: Fix usage of rasterizer multisample bit.
pipe_rasterizer multisample bit should be enabled only when really
wanting to do multisampling, thus we should disable when not having
msaa render target.
This fixes some depth calculation precision issues on radeon.
Also disable it when depth and stencil tests are disabled, since in that
case multisampling is same as not multisampled.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
f297e7de0f st/nine: ATOC has effect only with ALPHATESTENABLE
ATOC extension does something only when alpha test is enabled.
Use a second bit to encode the difference with ATIATOC.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
edc5cdced5 st/nine: Add debug string for ATOC
We were missing a debug string for this format.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
4e89dcf0c4 st/nine: Add asserts for output/input packing
Nine doesn't support vs output/ps input packing.
We haven't found any application requiring that,
and implementing it properly is complex.

Add asserts for now.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
aeddda0c3a st/nine: Use correct PIPE_HANDLE_USAGE flag for frontbuffer copy
When taking screenshots we do a copy from the frontbuffer
to an allocated buffer (which we then copy to a ram buffer).

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
ca7c78a88e st/nine: Fix output shift calculation
We were getting it wrong for negative values.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
b8d95d4087 st/nine: Fix CheckDeviceFormat advertising for surfaces
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
6ef231c80f st/nine: Improve buffer placement
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
7639033973 st/nine: Fix buffer bind flags
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
0f6e31823d st/nine: Fix buffer locking flags handling
Our behaviour was not entirely similar to what
the docs and our tests describe.

Drop d3dlock_buffer_to_pipe_transfer_usage.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Patrick Rudolph
f45b9894e5 st/nine: Improve logging
Add missing DBG calls in dtors.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Patrick Rudolph
f3fa7e3068 st/nine: Use WINE thread for threadpool
Use present interface 1.2 function ID3DPresent_CreateThread
to create the thread for threadpool.
Creating the thread with WINE prevents some rarely occuring crashes.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Patrick Rudolph
72be473ad1 st/nine: Don't present if window is occluded
The problem is that if one d3d present call fails,
because of our occlusion check in present method,
the next presentation call will send the same pixmap to the Xserver again,
without waiting it is released, which is wrong.

Move the present call after occlusion check to return and prevent
Xpixmaps errors.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Patrick Rudolph
c673c46ccf st/nine: Use new function to query for resolution mismatch
Any third party app might change the current screen resolution.
Poll for resolution mismatch to force a device reset.
Required for non ex devices only.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Patrick Rudolph
dae9a91727 st/nine: Implement IPresent version 1.2
Implement presentation interface version 1.2:
* ID3DPresent_ResolutionMismatch
    Poll for resolution mismatch.
    A third party app might have changed resolution,
    which requires a device reset.
* ID3DPresent_CreateThread
    Create a thread in WINE to allow nine to use Windows API
    functions. Required for multi-threaded presentation.
    In single-threaded presentation mode the calling thread is
    already known to WINE.
* ID3DPresent_WaitForThread
    Wait for a wine thread to terminate.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
2e149a2bf0 st/nine: Implement BumpEnvMap for ff
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
c4e85202cb st/nine: Format conversion for volumes in UpdateTexture
We were doing the conversion for surfaces, but not yet
volumes. Now that volumes can do conversion, use it.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy
23e2a235dc st/nine: Remove one useless function output
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00