Commit Graph

82585 Commits

Author SHA1 Message Date
Ilia Mirkin 194bcb49d1 nv50: add support for GL_EXT_window_rectangles
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-06-18 13:38:30 -04:00
Ilia Mirkin b21a00d129 nvc0: add support for GL_EXT_window_rectangles
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-06-18 13:38:30 -04:00
Ilia Mirkin d1bdc1238a st/mesa: add support for GL_EXT_window_rectangles
Make sure to pass the requisite information in draws, blits, and clears
that work on the context's draw buffer.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-06-18 13:38:30 -04:00
Ilia Mirkin 07fcb06fe0 gallium: add PIPE_CAP_MAX_WINDOW_RECTANGLES to all drivers
This says how many window rectangles are supported by the
implementation, although it may not exceed PIPE_MAX_WINDOW_RECTANGLES.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-06-18 13:38:29 -04:00
Ilia Mirkin 82fab73246 gallium: add API for setting window rectangles
Window rectangles apply to all framebuffer operations, either in
inclusive or exclusive mode. They may also be specified as part of a
blit operation.

In exclusive mode, any fragment inside any of the specified rectangles
will be discarded.

In inclusive mode, any fragment outside every rectangle will be
discarded.

The no-op state is to have 0 rectangles in exclusive mode.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-06-18 12:59:12 -04:00
Ilia Mirkin d68c1e2ac2 mesa: add GL_EXT_window_rectangles state storage/retrieval functionality
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-06-18 12:51:55 -04:00
Ilia Mirkin 78506ad246 glapi: add GL_EXT_window_rectangles entrypoints
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-06-18 12:51:55 -04:00
Samuel Pitoiset b214e0d2fb nv50/ir: add missing strings for some recent sysvals
This is pretty useful for debugging purposes and those should
not be omitted.

Fixes: 517a93b3 ("nvc0: add ARB_shader_draw_parameters support")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-06-18 18:34:50 +02:00
Bruce Cherniak 6b0ac95c28 swr: Update screen->context pointer with multiple contexts.
A pipe pointer in the screen allows for access to current device context
 in flush_frontbuffer and resource_destroy.  This wasn't tracking current
context in multi-context situations.

v2: More caffeine.  Corrected compare, removed unnecessary set of
screen-pipe in create_context, and added a few comments.
2016-06-17 13:56:03 -05:00
Brian Paul ace3124f22 scons: put the generated git_sha1.h file in top-level src/ directory
To match what's done in the automake build.

v2: Use git rev-parse to get a 10-character hash ID
    Fix Python imports

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2016-06-17 10:33:00 -06:00
Tim Rowley 5a64549f54 swr: switch from overriding -march to selecting features
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Tested-by: Chuck Atkins <chuck.atkins@kitware.com>
2016-06-17 10:34:17 -05:00
Timothy Arceri 481e924951 mesa: remove remaining tabs in api_validate.c
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-06-17 22:07:21 +10:00
Samuel Iglesias Gonsálvez bdab572a86 i965/fs: indirect addressing with doubles is not supported in CHV/BSW/BXT
From the Cherryview's PRM, Volume 7, 3D Media GPGPU Engine, Register Region
Restrictions, page 844:

  "When source or destination datatype is 64b or operation is integer DWord
   multiply, indirect addressing must not be used."

v2:
- Fix it for Broxton too.

v3:
- Simplify code by using subscript() and not creating a new num_components
variable (Kenneth).

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95462
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-06-17 11:33:18 +02:00
Iago Toral Quiroga 0177dbb6c2 i965/fs: Fix single-precision to double-precision conversions for CHV/BSW/BXT
From the Cherryview PRM, Volume 7, 3D Media GPGPU Engine,
Register Region Restrictions:

   "When source or destination is 64b (...), regioning in Align1
    must follow these rules:

    1. Source and destination horizontal stride must be aligned to
       the same qword.
    (...)"

v2:
- Fix it for Broxton too.

v3:
- Remove inst->regs_written change as it is not necessary (Ken)

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95462
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-06-17 08:46:02 +02:00
Kenneth Graunke 48593eaf2d docs: Mention GL_ARB_ES3_1_compatibility in release notes.
Ilia reminded me that I forgot this.
2016-06-16 17:10:35 -07:00
Kenneth Graunke a08a16541b i965: Fix comment about CS scratch space encodings on Broadwell+.
I typo'd this.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2016-06-16 16:11:35 -07:00
Kenneth Graunke 93d8f80a9a docs: Update ARB_ES3_1_compatibility status for i965. 2016-06-16 14:39:44 -07:00
Kenneth Graunke 1f9445ff57 i965: Drop perf_debug about rasterizer discard in SOL vs. clipper.
I recently experimented with performing rasterizer discard in the SOL
unit instead of the clipper, and as far as I can tell, it's basically
the same performance.  The clipper comes directly after SOL anyway,
and setting the clipper to REJECT_ALL should be pretty darn cheap.

Keep the perf_debug on Sandybridge, where the GS actually does work.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2016-06-16 14:37:07 -07:00
Kenneth Graunke 32b1c0b694 i965: Enable GL_ARB_ES3_1_compatibility on Gen8+ if CS are available.
There are almost no tests in any test suite, but what little I've found
seems to work.  Ilia believes everything is in place.

v2: Predicate the enable on ES 3.1 being available (Gen8+) and also
    ARB_compute_shader being available (requested by Ilia).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-06-16 14:33:24 -07:00
Ian Romanick 6bec55a780 mesa: If validation fails in a debug context just emit a debug message
There are quite a few pipelines that desktop applications (including a
bunch of piglit test) can expect to have run but don't meet the GLES
requirements.  Instead of failing validation, just emit a debug message.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96358
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Gregory Hainaut <gregory.hainaut@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-06-16 09:33:54 -07:00
Ian Romanick 9c87282041 glsl: Always strip arrayness in precision_qualifier_allowed
Previously some callers of precision_qualifier_allowed would strip the
arrayness from the type and some would not.  As a result, some places
would not notice that float[6], for example, needed a precision
qualifier.

Fixes the new piglit test no-default-float-array-precision.frag.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96358
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Gregory Hainaut <gregory.hainaut@gmail.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-06-16 09:33:53 -07:00
Jose Fonseca d04f652b75 mesa/main: Update _mesa_new_shader.
Left over from 31dee99e05.  It should fix
Clang Windows build.

Trivial.
2016-06-16 15:22:37 +01:00
Christian König 6d877d7121 st/vdpau: we support lumakeying now
Signed-off-by: Christian König <christian.koenig@amd.com>
2016-06-16 09:41:13 +02:00
Christian König bf89e672cf vl: support luma keying for interlaced surfaces as well
We had the CSC code twice in there, factor it out into a separate function.

Signed-off-by: Christian König <christian.koenig@amd.com>
2016-06-16 09:41:12 +02:00
Timothy Arceri 456b5d9ac9 i965: remove remaining tabs in brw_link.cpp
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2016-06-16 16:24:19 +10:00
Mathias Fröhlich 0e73d9454d vbo: Use a bitmask to track the active arrays in vbo_save*.
The use of a bitmask makes functions iterating only active
attributes less visible in profiles.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich bc4e0c4868 vbo: Use a bitmask to track the active arrays in vbo_exec*.
The use of a bitmask makes functions iterating only active
attributes less visible in profiles.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich 22e5d4a1ee mesa: Use bitmask/ffs to iterate the active_samplers bitmask.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich 34f741b080 mesa: Use bitmask/ffs to iterate the enabled textures.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich 11a5b776c2 mesa: Use designated bool value to check texture unit completeness.
The change helps to use the bitmask/ffs in the next change.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich c14ec9aafa mesa: Use bitmask/ffs to iterate SamplersUsed
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich 53691b7cb1 i965: Use bitmask/ffs to iterate used vertex attributes.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich b670f0d1d7 i965: Use bitmask/ffs to iterate enabled clip planes.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:55 +02:00
Mathias Fröhlich a0fe569e53 radeon/r200: Use bitmask/ffs to iterate enabled clip planes.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich dc9e604ef1 mesa: Use bitmask/ffs to iterate enabled clip planes.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich d8a3ac90df mesa: Use bitmask/ffs to iterate color material attributes.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich d4eb2f9cda mesa: Use bitmask/ffs to build ff fragment shader keys.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.
The bitmask used here for iteration is a combination
of different enabled masks present for texture units.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich 3ee409bebf mesa: Use bitmask/ffs to build ff vertex shader keys.
Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the bitmask.
The bitmask used here for iteration is a combination
of different enabled masks present for texture units.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich b5820759de mesa: Remove the linked list of enabled lights
Clean up after conversion to bitmasks.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich 21f7f67685 mesa: Switch to bitmask based enabled lights in gen_matypes.c
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich f0391ba6c1 radeon/r200: Use bitmask/ffs to iterate enabled lights
Replaces a loop that iterates all lights and test
which of them is enabled by a loop only iterating over
the bits set in the enabled bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich f69a400513 nouveau: Use bitmask/ffs to iterate enabled lights
Replaces a loop that iterates all lights and test
which of them is enabled by a loop only iterating over
the bits set in the enabled bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:54 +02:00
Mathias Fröhlich 9a3fcb010c tnl: Use bitmask/ffs to iterate enabled lights
Replaces loops that iterate all lights and test
which of them is enabled by a loop only iterating over
the bits set in the enabled bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:53 +02:00
Mathias Fröhlich 664aec4370 mesa: Use bitmask/ffs to iterate enabled lights for ff shader keys.
Replaces a loop that iterates all lights and test
which of them is enabled by a loop only iterating over
the bits set in the enabled bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:53 +02:00
Mathias Fröhlich ccb1be2fab mesa: Use bitmask/ffs to iterate enabled lights
Replaces loops that iterate all lights and test
which of them is enabled by a loop only iterating over
the bits set in the enabled bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:53 +02:00
Mathias Fröhlich b60c730235 mesa: Track enabled lights in a bitmask
This enables some optimizations afterwards.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:53 +02:00
Mathias Fröhlich 6749d77c69 mesa: Rename CoordReplaceBits back to CoordReplace.
It used to be called like that and fits better with 80 columns.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:53 +02:00
Mathias Fröhlich 291f00fa12 mesa: Remove the now unused CoordsReplace array.
Now that all users are converted, remove the array.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:53 +02:00
Mathias Fröhlich d19c69659a i965: Convert i965 to use CoordsReplaceBits.
Switch over to use the CoordsReplaceBits bitmask.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:53 +02:00
Mathias Fröhlich 97f67be0a7 i915: Convert i915 to use CoordsReplaceBits.
Switch over to use the CoordsReplaceBits bitmask.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-16 05:50:52 +02:00