Commit Graph

68079 Commits

Author SHA1 Message Date
Jason Ekstrand dd110cdfd8 nir: Make gl_FrontFacing a system_value
GLSL IR labels gl_FrontFacing as an input variable and not a system value.
This commit makes NIR silently translate gl_FrontFacing to a system value
so that it properly gets translated into a load_system_value intrinsic.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-14 13:47:16 -08:00
Jason Ekstrand 785b22caee i965/nir: Add support for nir_intrinsic_load_front_face
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-14 13:47:16 -08:00
Jason Ekstrand 929f43851e nir/lower_phis_to_scalar: Fix some logic in is_phi_scalarizable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-14 13:46:59 -08:00
Shawn Starr 7df256add2 clover: Use Legacy PassManager for LLVM trunk (3.7)
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Shawn Starr <shawn.starr@rogers.com>
2015-02-14 01:31:57 +00:00
Chia-I Wu 8323796840 ilo: fix JIP/UIP on Gen8
UIP is in DW2 and JIP is in DW3 on Gen8.  Also, the units are in bytes.
2015-02-14 06:52:36 +08:00
Chia-I Wu c62507f42c ilo: do not set GEN6_THREADCTRL_SWITCH
It is not needed on Gen6+, and it appears to be broken on Gen8.
2015-02-14 06:52:36 +08:00
Chia-I Wu 7504b357d4 ilo: correct ISA UIP/JIP decoding for Gen8
JIP is int32_t and UIP is in DW2 on Gen8.
2015-02-14 06:52:36 +08:00
Chia-I Wu f8126fed95 ilo: prepare for 64-bit immediates decoding
Replace imm32 by imm64.  Add more ways (UD, D, etc) to access the immediate.
2015-02-14 06:52:36 +08:00
Chia-I Wu 9ed376a76c ilo: cleanup ISA DW1 decoding
Decode the higher and lower 16 bits separately.
2015-02-14 06:52:36 +08:00
Chia-I Wu db362983d1 ilo: cleanup ISA DW0 decoding
Add disasm_inst_decode_dw0_opcode_gen6() to decode the opcode.  Simplify
branch_ctrl/acc_wr_ctrl decoding.
2015-02-14 06:52:36 +08:00
Chia-I Wu 5fc0dd8953 ilo: update some outdated gen checks
Update gen checks for 3DSTATE_POLY_STIPPLE_OFFSET,
3DSTATE_POLY_STIPPLE_PATTERN, 3DSTATE_LINE_STIPPLE, and
3DSTATE_AA_LINE_PARAMETERS.
2015-02-14 06:52:36 +08:00
Chia-I Wu 8b9446dbeb ilo: fix rectlist length on Gen8
5 PIPE_CONTROLs, 2 3DSTATE_WM_HZ_OP, and depth buffer setup require 65 DWords.
2015-02-14 06:52:36 +08:00
Chia-I Wu baba8b2745 ilo: fix 3DSTATE_VF_TOPOLOGY
The pipe primitive type was wrongly translated twice.
2015-02-14 06:52:36 +08:00
Jose Fonseca c944b91190 os,llvmpipe: Set rasterizer thread names on Linux.
To help identify llvmpipe rasterizer threads -- especially when there
can be so many.

We can eventually generalize this to other OSes, but for that we must
restrict the function to be called from the current thread.  See also
http://stackoverflow.com/a/7989973

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-02-13 19:42:21 +00:00
Jose Fonseca b09f25428f uti/u_atomic: Don't test p_atomic_add with booleans.
Add another class of tests.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=89112

I failed to spot this in my previous change, because bool was a typedef
for char on the system I tested.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-02-13 19:39:27 +00:00
Tapani Pälli e333035c47 mesa: fix OES_texture_float texture render target behavior
Current implementation allowed usage of unsized type texture GL_FLOAT
and GL_HALF_FLOAT as a render target as this was 'expected behavior' by
WEBGL_oes_texture_float and is also allowed by the oes-texture-float
WebGL test. However this broke some ES3 conformance tests that do not
accept such behavior. Patch sets such an fbo incomplete as expected by
the ES3 conformance tests. Textures with sized types like RGBA32F will
still continue to work as render targets.

v2: code style cleanups (Ian Romanick, Matt Turner)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88905
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
2015-02-13 07:51:13 +02:00
Eric Anholt 3f1e1287fd vc4: Make SF be a flag on the QIR instructions.
Right now the places that used to emit a mov.sf just put the SF on the
previous instruction when it generated the source of the SF value.  Even
without optimization to push the sf up further (and kill thus potentially
kill more MOVs), this gets us:

total uniforms in shared programs: 13455 -> 13457 (0.01%)
uniforms in affected programs:     3 -> 5 (66.67%)
total instructions in shared programs: 40296 -> 40198 (-0.24%)
instructions in affected programs:     12595 -> 12497 (-0.78%)
2015-02-12 16:33:16 -08:00
Eric Anholt 4413861dd8 r200: Drop unused variable.
Quiets compiler warning since e7f2f2dea5.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-02-12 16:33:16 -08:00
Eric Anholt 55de910f90 i965: Quiet another compiler warning about uninitialized values.
The compiler can't tell that we're always going to hit the first if block
on the first time through the loop.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-12 16:33:16 -08:00
Eric Anholt f65e26478b i965: Move some asserts to unreachable.
If execution was supposed to be supported in this case, we'd run into
trouble from completely uninitialized sat_imm values.

v2: Drop the '!' before the string.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-12 16:32:10 -08:00
Eric Anholt 6489cb1ae6 i965: Shut up a compiler warning about uninitialized var.
We always pass this argument, even if it won't be used by the particular
texture op.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-12 16:29:53 -08:00
Carl Worth 55a57834bf Revert use of Mesa IR optimizer for ARB_fragment_programs
Commit f82f2fb3dc added use of the Mesa
IR optimizer for both ARB_fragment_program and ARB_vertex_program, but
only justified the vertex-program portions with measured performance
improvements.

Meanwhile, the optimizer was seen to generate hundreds of unused
immediates without discarding them, causing failures.

Discard the use of the optimizer for now to fix the regression. (In
the future, we anticpate things moving from Mesa IR to NIR for better
optimization anyway.)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82477

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

CC: "10.3 10.4 10.5" <mesa-stable@lists.freedesktop.org>
2015-02-12 13:33:12 -08:00
Jose Fonseca 1ba9f9e62c util/u_atomic: Use lower-case variables in _Interlocked* helpers. 2015-02-12 19:32:21 +00:00
Jose Fonseca 531d47baa8 util/u_atomic: Add _InterlockedExchangeAdd8/16 for older MSVC.
We need to build certain parts of Mesa (namely gallium, llvmpipe, and
therefore util) with Windows SDK 7.0.7600, which includes MSVC 2008.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-02-12 19:32:21 +00:00
Jose Fonseca d2438f5920 util/u_atomic: Test p_atomic_add() for 8bit integers.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-02-12 19:32:21 +00:00
Ilia Mirkin b1e70f2423 docs: add ARB_draw_indirect to ES 3.1 list
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-12 11:12:29 -05:00
Axel Davy 63986f9580 egl: Soften several HAVE_DRM_PLATFORM to HAVE_LIBDRM
To fix build when libdrm is not found,
commit a594cec7e3 did put several
parts of egl code under #ifdef HAVE_DRM_PLATFORM.

HAVE_DRM_PLATFORM means the egl drm platform is being built.
What should have been used instead is HAVE_LIBDRM.

At a few locations, the HAVE_DRM_PLATFORM introduced
have already been replaced by HAVE_LIBDRM, this patch
replaces the remaining occurences.

This patch makes for example EGL_EXT_image_dma_buf_import
be advertised by egl under x11 when the drm egl platform
is not built, whereas previously it required the drm egl
platform to be built.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-12 13:20:22 +00:00
Emil Velikov c39dbfdd0f auxiliary/vl: bring back the VL code for the dri targets
With commit c642e87d9f4(auxiliary/vl: rework the build of the VL code)
we split out the VL code into a separate static library that was meant
to be used by the VL targets alone - va, vdpau, xvmc.

The commit failed to consider the way we handle vdpau-gl interop and
broke it. Bring back the functionality by keeping the vl <> vl_stub
separation as requrested by Christian.

v2: Update the omx target as well. Update mesa-stable email address.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86837
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Andy Furniss <adf.lists@gmail.com>
2015-02-12 13:19:26 +00:00
Emil Velikov 153539bd9d configure: rework wayland_scanner handling(fix make distcheck)
Currently having the wayland-scanner is optional, which causes problems
when autotools parses through the makefiles, and tries to generate all
the BUILT_SOURCES.

As the config option --with-egl-platform=wayland is not the default, we
won't end up setting the WAYLAND_SCANNER variable, which in turn will
cause some files to not get generated.

There has been a wayland-scanner package as of wayland 1.2 which
provides a variable for the scanner binary, so let's use that one and
fall back to manually searching via AC_PATH_PROG when needed.

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-12 13:19:20 +00:00
Emil Velikov 72e602905d nir: add missing header to the sources list
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-12 13:19:13 +00:00
Emil Velikov 556fc4b84d nir: resolve nir.h dependency list (fix make distcheck)
Use nir/nir_opcodes.h as is (w/o the absolute path), as it is the target
name used to generate the actual file. Otherwise the target is missing,
the file won't get generated and the build will fail.

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-12 13:18:52 +00:00
Martin Peres 9f7efa78a8 docs: update GL3.txt to state my current work on the dsa extension
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
2015-02-12 11:24:37 +02:00
Ben Widawsky e93566a15c i965/vs/skl: Use vec4 datatypes for message header
We're using a SIMD4x2 sampler message, which has execsize 4, and so the
register width must be <= 4.  Use <4,4,1> regioning instead of <8,8,1>
regioning to access the same data but avoid tripping the assert.

Fixes the following piglit tests:
spec/glsl-1.20/compiler/structure-and-array-operations/array-selection.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-basic.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-field-clashes-with-struct.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-field-clashes-with-function.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-array.vert
glslparsertest/glsl2/condition-07.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-field-clashes-with-variable.vert

v2: Better commit message courtesy of Ken.
I had a discussion with Ken, and we both question how we end up with a mov and
execsize 4. For now though, this fixes the piglit tests, so we can worry about
it later.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-11 21:41:58 -08:00
Chia-I Wu cba6a4a129 ilo: update screen init for Gen8
This is very preliminary and is only tested with glxgears.  All information
about Gen8 is derived from i965 and beignet.
2015-02-12 08:05:07 +08:00
Chia-I Wu cb1cdecf64 ilo: update outdated render command emissions for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 9ab4fc4e63 ilo: update rectlist command emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 4caf8d9761 ilo: update draw command emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu d8927ab02f ilo: update surface state emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 7832a3013b ilo: update dynamic state emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 8682cbab3e ilo: update outdated gen assertions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu c173a5288f ilo: add new WM related helpers for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 8c2cbc8955 ilo: update VS related functions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 0e3381154c ilo: update VF related functions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu a57805cb75 ilo: update SAMPLER_STATE for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 7e7e45db65 ilo: update SAMPLER_BORDER_COLOR_STATE for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 8976a190b2 ilo: update depth clear value for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 0b7fdce4f5 ilo: update ilo_zs_surface for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu aa7109f059 ilo: update ilo_view_surface for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 7922982d4f ilo: update texture layout for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 47dc2ae6e2 ilo: update ilo_blend_state and related functions for Gen8 2015-02-12 07:56:12 +08:00