platform/upstream/mesa.git
11 years agohaiku: add swrast driver
Alexander von Gluck IV [Wed, 13 Nov 2013 05:39:19 +0000 (05:39 +0000)]
haiku: add swrast driver

* This is pretty small and upkeep should be minimal.
* Currently fully working.
* Cannidate for 10.0.0 branch

Acked-by: Brian Paul <brianp@vmware.com>
11 years agodocs: Import 9.2.3 release notes, add news item.
Carl Worth [Wed, 13 Nov 2013 15:31:42 +0000 (07:31 -0800)]
docs: Import 9.2.3 release notes, add news item.

11 years agodri: Remove redundant createNewContext function from __DRIimageDriverExtension
Kristian Høgsberg [Tue, 12 Nov 2013 00:35:35 +0000 (16:35 -0800)]
dri: Remove redundant createNewContext function from __DRIimageDriverExtension

createContextAttribs is a superset of what createNewContext provides.
Also remove the function typedef, since createNewContext is deprecated
and no longer used in  multiple interfaces.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agowayland: Use __DRIimage based getBuffers implementation when available
Kristian Høgsberg [Sat, 9 Nov 2013 06:10:36 +0000 (22:10 -0800)]
wayland: Use __DRIimage based getBuffers implementation when available

This lets us allocate color buffers as __DRIimages and pass them into
the driver instead of having to create a __DRIbuffer with the flink
that requires.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agogbm: Add support for __DRIimage based getBuffers when available
Kristian Høgsberg [Sat, 9 Nov 2013 06:06:51 +0000 (22:06 -0800)]
gbm: Add support for __DRIimage based getBuffers when available

This lets us allocate color buffers as __DRIimages and pass them into
the driver instead of having to create a __DRIbuffer with the flink
that requires.

With this patch, we can now run gbm on render-nodes.  A render-node is a
drm device that doesn't support modesetting and all the legacy DRI ioctls.
flink is also not supported, but now that gbm doesn't need flink, we can
run piglit on head-less gbm or head-less GPGPU.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agodri/i915, dri/i965: Fix support for planar images
Ander Conselvan de Oliveira [Tue, 12 Nov 2013 12:47:08 +0000 (14:47 +0200)]
dri/i915, dri/i965: Fix support for planar images

Planar images have format __DRI_IMAGE_FORMAT_NONE, but the patch that
moved the conversion from dri_format to the mesa format made it
impossible to allocate a image with that format.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agoi965/fs: Try a different pre-scheduling heuristic if the first spills.
Eric Anholt [Thu, 7 Nov 2013 01:38:23 +0000 (17:38 -0800)]
i965/fs: Try a different pre-scheduling heuristic if the first spills.

Since LIFO fails on some shaders in one particular way, and non-LIFO
systematically fails in another way on different kinds of shaders, try
them both, and pick whichever one successfully register allocates first.
Slightly prefer non-LIFO in case we produce extra dependencies in register
allocation, since it should start out with fewer stalls than LIFO.

This is madness, but I haven't come up with another way to get unigine
tropics to not spill while keeping other programs from not spilling and
retaining the non-unigine performance wins from texture-grf.

total instructions in shared programs: 1626728 -> 1626288 (-0.03%)
instructions in affected programs:     1015 -> 575 (-43.35%)
GAINED:                                50
LOST:                                  0

Improves Unigine Tropics performance by 14.5257% +/- 0.241838% (n=38)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70445
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoi965/fs: Do instruction pre-scheduling just before register allocation.
Eric Anholt [Thu, 7 Nov 2013 01:43:25 +0000 (17:43 -0800)]
i965/fs: Do instruction pre-scheduling just before register allocation.

Long ago, the HW_REG usage in assign_curb/urb_setup() were scheduling
barriers, so we had to run scheduler before them in order for it to be
able to do basically anything.  Now that that's fixed, we can delay the
scheduling until we go to allocate (which will make the next change less
scary).

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoi965/fs: Ignore actual latency pre-reg-alloc.
Eric Anholt [Wed, 6 Nov 2013 07:30:33 +0000 (23:30 -0800)]
i965/fs: Ignore actual latency pre-reg-alloc.

We care about depth-until-program-end, as a proxy for "make sure I
schedule those early instructions that open up the other things that can
make progress while keeping register pressure low", not actual latency
(since we're relying on the post-register-alloc scheduling to actually
schedule for the hardware).

total instructions in shared programs: 1609931 -> 1609931 (0.00%)
instructions in affected programs:     0 -> 0
GAINED:                                55
LOST:                                  43

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoi965/fs: Fix message setup for SIMD8 spills.
Eric Anholt [Tue, 5 Nov 2013 06:56:33 +0000 (22:56 -0800)]
i965/fs: Fix message setup for SIMD8 spills.

In the SIMD16 spilling changes, I replaced a "1" in the spill path with
"mlen", but obviously it wasn't mlen before because spills have the g0
header along with the payload. The interface I was trying to use was
asking for how many physical regs we're writing, so we're looking for "1"
or "2".

I'm guessing this actually passed piglit because the high 8 bits of the
execution mask in SIMD8 mode are all 0s.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
11 years agoi965/fs: Prefer things we know reduce reg pressure when pre-scheduling.
Eric Anholt [Mon, 14 Oct 2013 18:38:09 +0000 (11:38 -0700)]
i965/fs: Prefer things we know reduce reg pressure when pre-scheduling.

Previously, the best thing we had was to schedule the things unblocked by
the last chosen instruction, on the hope that it would be consuming two
values at the end of their live intervals while only producing one new
value.  But that's just a guess, and we can do counting of usage of
registers to know when an instruction would (almost surely) reduce
register pressure.

The only failure mode I know of in this new dominant heuristic is that
inside of a loop when scheduling the iterator (for example), choosing the
last use of the iterator doesn't actually reduce the live interval of the
iterator.  But it doesn't seem to matter in shader-db:

total instructions in shared programs: 1618700 -> 1618700 (0.00%)
instructions in affected programs:     0 -> 0
GAINED:                                13
LOST:                                  0

Note: The new functions are made virtual because I expect we'll soon lift
the pre-regalloc scheduling heuristic over to the vec4 backend.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoi965: Fix undefined value usage in ABO setup.
Eric Anholt [Wed, 6 Nov 2013 00:24:58 +0000 (16:24 -0800)]
i965: Fix undefined value usage in ABO setup.

Fixes a compiler warning.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoi965: Add a warning if something ever hits a bug I noticed.
Eric Anholt [Thu, 31 Oct 2013 17:14:17 +0000 (10:14 -0700)]
i965: Add a warning if something ever hits a bug I noticed.

We'd have to map the VBO and rewrite things to a lower stride to fix it.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agonvc0: release 3d bufctx after drawing
Ben Skeggs [Tue, 12 Nov 2013 07:58:18 +0000 (17:58 +1000)]
nvc0: release 3d bufctx after drawing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agoclover: Fix the const variant of adaptor_range::end to deal with mismatching range...
Francisco Jerez [Tue, 12 Nov 2013 19:14:20 +0000 (11:14 -0800)]
clover: Fix the const variant of adaptor_range::end to deal with mismatching range sizes.

Fixes infinite loop in find_grid_optimal_factor() in cases where the
user specifies a grid size with less dimensions than the device
supports.

Reported-by: Tom Stellard <thomas.stellard@amd.com>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agodraw,llvmpipe: use exponent manipulation instead of exp2 for polygon offset
Roland Scheidegger [Mon, 11 Nov 2013 15:11:59 +0000 (15:11 +0000)]
draw,llvmpipe: use exponent manipulation instead of exp2 for polygon offset

Since we explicitly require a integer input we should avoid using exp2 math
(even if we were using optimized versions), which turns the exp2 into a int
sub (plus some casts).

v2: fix bogus uint (needs to be int) math spotted by Matthew, fix comments

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
11 years agogallium: fix build on GNU/Hurd due to missing PIPE_OS_HURD detection
Cyril Brulebois [Tue, 12 Nov 2013 09:51:00 +0000 (02:51 -0700)]
gallium: fix build on GNU/Hurd due to missing PIPE_OS_HURD detection

Thanks to Pino Toscano.  Patch from Debian package.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agometa: enable vertex attributes in the context of the newly created array object
Petr Sebor [Mon, 11 Nov 2013 23:19:00 +0000 (16:19 -0700)]
meta: enable vertex attributes in the context of the newly created array object

Otherwise, the function would enable generic vertex attributes 0
and 1 of the array object it does not own. This was causing crashes
in Euro Truck Simulator 2, since the incorrectly enabled generic
attribute 0 in the foreign context got precedence before vertex
position attribute at later time, leading to NULL pointer dereference.

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Petr Sebor <petr@scssoft.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: 80-column wrapping, remove trailing whitespace in arrayobj.c
Brian Paul [Mon, 11 Nov 2013 20:52:45 +0000 (13:52 -0700)]
mesa: 80-column wrapping, remove trailing whitespace in arrayobj.c

11 years agomesa: add comment for struct gl_vertex_buffer_binding
Brian Paul [Mon, 11 Nov 2013 18:51:55 +0000 (11:51 -0700)]
mesa: add comment for struct gl_vertex_buffer_binding

11 years agomesa: call update_array_format() after error checking
Brian Paul [Mon, 11 Nov 2013 22:06:13 +0000 (15:06 -0700)]
mesa: call update_array_format() after error checking

We try to do all error checking before changing any GL state.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Jordan Justen <jordan.l.justen@intel.com>

11 years agomesa: use _mesa_is_bufferobj() helper in _mesa_vertex_attrib_address()
Brian Paul [Mon, 11 Nov 2013 17:57:23 +0000 (10:57 -0700)]
mesa: use _mesa_is_bufferobj() helper in _mesa_vertex_attrib_address()

And use a regular if statment to slightly improve readability.

Jordan Justen <jordan.l.justen@intel.com>

11 years agomesa: add const qualifiers to vertex array helper functions
Brian Paul [Mon, 11 Nov 2013 17:56:09 +0000 (10:56 -0700)]
mesa: add const qualifiers to vertex array helper functions

Jordan Justen <jordan.l.justen@intel.com>

11 years agonouveau/video: mark bitstream-level acceleration as unsupported
Ilia Mirkin [Sat, 9 Nov 2013 18:29:35 +0000 (13:29 -0500)]
nouveau/video: mark bitstream-level acceleration as unsupported

Adding a vl_mpeg-based helper didn't seem to work, as it produced data
that the card couldn't handle. (And I didn't investigate further.) This
makes the decoding functionality only accessible via XvMC and avoids
crashes when attempting to use VDPAU.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agonouveau/video: don't try on nv3x
Ilia Mirkin [Sat, 9 Nov 2013 18:29:34 +0000 (13:29 -0500)]
nouveau/video: don't try on nv3x

It doesn't work, I don't know why, but no point in hanging people's
displays until it gets figured out.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agoegl-static: Only export necessary symbols v3
Tom Stellard [Wed, 23 Oct 2013 20:02:16 +0000 (16:02 -0400)]
egl-static:  Only export necessary symbols v3

This fixes a crash in glamor when mesa links against static LLVM.

v2:
  - Inline LINKER_SCRIPT variable

v3: Kai Wasserbäch
  - Fix out out-of-tree-builds

Tested-by: Kai Wasserbäch <kai@dev.carbon-project.or>
11 years agoconfigure.ac: Don't require shared LLVM when building OpenCL
Tom Stellard [Wed, 23 Oct 2013 19:36:41 +0000 (15:36 -0400)]
configure.ac: Don't require shared LLVM when building OpenCL

This works now that pipe_*.so is no longer exporting LLVM symbols.

Tested-by: Kai Wasserbäch <kai@dev.carbon-project.or>
11 years agopipe-loader: Only export necessary symbols v3
Tom Stellard [Wed, 23 Oct 2013 19:35:45 +0000 (15:35 -0400)]
pipe-loader: Only export necessary symbols v3

This makes it possible to use clover with statically linked LLVM.

v2:
  - Inline LINKER_SCRIPT variable

v3: Kai Wasserbäch
  - Fix out out-of-tree-builds

Tested-by: Kai Wasserbäch <kai@dev.carbon-project.or>
11 years agoradeonsi/compute: Add Sea Islands support
Tom Stellard [Wed, 16 Oct 2013 17:43:08 +0000 (13:43 -0400)]
radeonsi/compute: Add Sea Islands support

11 years agor600/llvm: Store inputs in function arguments
Vincent Lejeune [Wed, 30 Oct 2013 17:35:58 +0000 (18:35 +0100)]
r600/llvm: Store inputs in function arguments

11 years agotests: Fix make check for out of tree builds.
Rico Schüller [Mon, 11 Nov 2013 20:18:27 +0000 (21:18 +0100)]
tests: Fix make check for out of tree builds.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Rico Schüller <kgbricola@web.de>
11 years agoi965: Move #define's inside function as local variables
Anuj Phogat [Fri, 8 Nov 2013 00:27:25 +0000 (16:27 -0800)]
i965: Move #define's inside function as local variables

X_f, Y_f, Xp_f, Yp_f variables are used just inside
translate_dst_to_src().So, they can be defined just
as local variables.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoi915, i965: Fix memory leak in intel_miptree_create_for_bo.
Vinson Lee [Sat, 28 Sep 2013 05:20:04 +0000 (22:20 -0700)]
i915, i965: Fix memory leak in intel_miptree_create_for_bo.

Fixes "Resource leak" defects reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoosmesa: assorted code clean-ups
Brian Paul [Fri, 8 Nov 2013 02:47:13 +0000 (19:47 -0700)]
osmesa: assorted code clean-ups

11 years agoosmesa: fix broken triangle/line drawing when using float color buffer
Brian Paul [Fri, 8 Nov 2013 02:01:39 +0000 (19:01 -0700)]
osmesa: fix broken triangle/line drawing when using float color buffer

Doesn't seem to help with bug 71363 but it fixed a failure I found in
my testing.

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
11 years agosvga: improve loops over color buffers
Brian Paul [Fri, 8 Nov 2013 00:28:33 +0000 (17:28 -0700)]
svga: improve loops over color buffers

Only loop over the actual number of color buffers supported, not
PIPE_MAX_COLOR_BUFS.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agosvga: document magic number of 8 render targets per batch
Brian Paul [Thu, 7 Nov 2013 23:57:23 +0000 (16:57 -0700)]
svga: document magic number of 8 render targets per batch

Grab the comments from commit message b84b7f19dfdc0 to explain
what the code is doing.

11 years agoutil: set all unused cbufs to NULL in util_copy_framebuffer_state()
Brian Paul [Thu, 7 Nov 2013 23:59:40 +0000 (16:59 -0700)]
util: set all unused cbufs to NULL in util_copy_framebuffer_state()

This helps fix an issue in the svga driver, and is just safer all-around.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agoglx: declare glx_screen struct to silence warning
Brian Paul [Mon, 11 Nov 2013 15:12:05 +0000 (08:12 -0700)]
glx: declare glx_screen struct to silence warning

11 years agoglx: change query_renderer_integer() value param to unsigned
Brian Paul [Fri, 8 Nov 2013 16:00:46 +0000 (09:00 -0700)]
glx: change query_renderer_integer() value param to unsigned

When this function was added, the returned value was signed in some
places, unsigned in others.

v2: also add unsigned in the unit test, per Ian.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoglx: Fix scons build.
José Fonseca [Fri, 8 Nov 2013 17:55:14 +0000 (17:55 +0000)]
glx: Fix scons build.

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agoEGL: fix build without libdrm
Samuel Thibault [Sun, 10 Nov 2013 18:32:01 +0000 (19:32 +0100)]
EGL: fix build without libdrm

This fixes building EGL without libdrm support.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
11 years agoi965: convert brw_lower_offset_array_visitor to ir_rvalue_visitor
Chris Forbes [Sat, 9 Nov 2013 20:15:13 +0000 (09:15 +1300)]
i965: convert brw_lower_offset_array_visitor to ir_rvalue_visitor

Previously, we would bogusly replace the entire statement containing the
ir_texture node with an ir_dereference_variable.

Correct this to just replace the ir_texture node itself as intended.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglsl: fix missing breaks in equals(ir_texture,..)
Chris Forbes [Sat, 9 Nov 2013 09:26:08 +0000 (22:26 +1300)]
glsl: fix missing breaks in equals(ir_texture,..)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Make the driver compile until a proper libdrm can be released.
Eric Anholt [Fri, 8 Nov 2013 18:49:47 +0000 (10:49 -0800)]
i965: Make the driver compile until a proper libdrm can be released.

No depending on unreleased code.

11 years agoglx: conditionaly build dri3 and present loader (v3)
Armin K [Fri, 8 Nov 2013 23:06:45 +0000 (00:06 +0100)]
glx: conditionaly build dri3 and present loader (v3)

This patch makes it possible to disable DRI3 if desired.

Tested with:

./configure --disable-dri3 --with-dri-drivers=i965 \
--with-gallium-drivers= --disable-vdpau --disable-egl \
--disable-gbm --disable-xvmc

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71397
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
11 years agoi965/fs: Don't perform CSE on inst HW_REG dests (unless it's null)
Matt Turner [Thu, 7 Nov 2013 23:09:33 +0000 (15:09 -0800)]
i965/fs: Don't perform CSE on inst HW_REG dests (unless it's null)

Commit b16b3c87 began performing CSE on CMP instructions with null
destinations. I relaxed the restrictions a bit too much, thereby
allowing CSE to be performed on instructions with, for instance, an
explicit accumulator destination.

This broke the arb_gpu_shader5/fs-imulExtended shader tests because
they emit MUL instructions with the accumulator as the destination. CSE
would instead cause the MUL to write to a GRF, which is lower precision
than the accumulator.

Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
11 years agoi965: Remove some tiny dead code from intel_miptree_map_movntdqa
Chad Versace [Fri, 8 Nov 2013 19:35:25 +0000 (11:35 -0800)]
i965: Remove some tiny dead code from intel_miptree_map_movntdqa

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoswrast: add missing notify_reset parameter to dri_create_context()
Brian Paul [Fri, 8 Nov 2013 15:33:47 +0000 (08:33 -0700)]
swrast: add missing notify_reset parameter to dri_create_context()

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
11 years agovl: use a separate context for shader based decode v2
Christian König [Sun, 3 Nov 2013 14:19:00 +0000 (15:19 +0100)]
vl: use a separate context for shader based decode v2

This makes VDPAU thread save again.

v2: fix some memory leaks reported by Aaron Watry.

Signed-off-by: Christian König <christian.koenig@amd.com>
11 years agoscons: Add dri2_query_renderer.c to sources.
José Fonseca [Fri, 8 Nov 2013 12:22:22 +0000 (12:22 +0000)]
scons: Add dri2_query_renderer.c to sources.

11 years agost/dri: Fix dri_create_context declaration prototype.
José Fonseca [Fri, 8 Nov 2013 12:20:00 +0000 (12:20 +0000)]
st/dri: Fix dri_create_context declaration prototype.

11 years agodri3: Fix pixmap buf_id computation
Keith Packard [Fri, 8 Nov 2013 03:01:48 +0000 (19:01 -0800)]
dri3: Fix pixmap buf_id computation

Looks like some kind of rebase damage to me...

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agoglx: Add a more informative debug message in a DRI3 error path.
Eric Anholt [Thu, 7 Nov 2013 23:44:57 +0000 (15:44 -0800)]
glx: Add a more informative debug message in a DRI3 error path.

11 years agoAdd DRI3+Present loader
Keith Packard [Tue, 5 Nov 2013 02:15:51 +0000 (18:15 -0800)]
Add DRI3+Present loader

Uses the __DRIimage loader interfaces.

v2: Fix _XIOErrors when DRI3 isn't present (change by anholt).  Apparently
    XCB just terminates your connection if you don't check for extensions
    before using them, instead of returning an error like you'd expect.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agodri: add __DRIimageLoaderExtension and __DRIimageDriverExtension
Keith Packard [Tue, 5 Nov 2013 02:09:51 +0000 (18:09 -0800)]
dri: add __DRIimageLoaderExtension and __DRIimageDriverExtension

These provide an interface between the driver and the loader to allocate
color buffers through the DRIimage extension interface rather than through a
loader-specific extension (as is used by DRI2, for instance).

The driver uses the loader 'getBuffers' interface to allocate color buffers.

The loader uses the createNewScreen2, createNewDrawable, createNewContext,
getAPIMask and createContextAttribs APIS (mostly shared with DRI2).

This interface will work with the DRI3 loader, and should also work with GBM
and other loaders so that drivers need not be customized for each new loader
interface, as long as they provide this image interface.

v2: Fix build of i915 and i965 together (by anholt)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agodri/i915,dri/i965: Use driGLFormatToImageFormat and driImageFormatToGLFormat
Keith Packard [Tue, 5 Nov 2013 01:33:34 +0000 (17:33 -0800)]
dri/i915,dri/i965: Use driGLFormatToImageFormat and driImageFormatToGLFormat

Remove private versions of these functions

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
11 years agodri/common: Add functions mapping MESA_FORMAT_* <-> __DRI_IMAGE_FORMAT_*
Keith Packard [Tue, 5 Nov 2013 01:29:08 +0000 (17:29 -0800)]
dri/common: Add functions mapping MESA_FORMAT_* <-> __DRI_IMAGE_FORMAT_*

The __DRI_IMAGE_FORMAT codes are used by the image extension, drivers need to
be able to translate between them. Instead of duplicating this translation in
each driver, create a shared version.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
11 years agoDefine __DRI_IMAGE_FORMAT_SARGB8
Keith Packard [Tue, 5 Nov 2013 01:27:43 +0000 (17:27 -0800)]
Define __DRI_IMAGE_FORMAT_SARGB8

This format will be used by the i965 driver

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agodri/intel: Add explicit size parameter to intel_region_alloc_for_fd
Keith Packard [Tue, 4 Jun 2013 03:59:31 +0000 (20:59 -0700)]
dri/intel: Add explicit size parameter to intel_region_alloc_for_fd

Instead of assuming that the size will be height * pitch, have the caller pass
in the size explicitly.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
11 years agodri/intel: Split out DRI2 buffer update code to separate function
Keith Packard [Tue, 4 Jun 2013 03:56:41 +0000 (20:56 -0700)]
dri/intel: Split out DRI2 buffer update code to separate function

Make an easy place to splice in a DRI3 version of this function

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agodrivers/dri/common: A few dri2 functions are not actually DRI2 specific
Keith Packard [Tue, 4 Jun 2013 03:49:25 +0000 (20:49 -0700)]
drivers/dri/common: A few dri2 functions are not actually DRI2 specific

This just renames them so that they can be used with the DRI3 extension
without causing too much confusion.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agogallivm: deduplicate some indirect register address code
Roland Scheidegger [Wed, 6 Nov 2013 19:35:51 +0000 (20:35 +0100)]
gallivm: deduplicate some indirect register address code

There's only one minor functional change, for immediates the pixel offsets
are no longer added since the values are all the same for all elements in
any case (it might be better if those weren't stored as soa vectors in the
first place maybe).

Reviewed-by: Zack Rusin <zackr@vmware.com>
11 years agoglx/tests: Add unit tests for the DRI2 part of GLX_MESA_query_renderer
Ian Romanick [Sat, 23 Feb 2013 00:45:27 +0000 (16:45 -0800)]
glx/tests: Add unit tests for the DRI2 part of GLX_MESA_query_renderer

After adding $(DEFINES) to AM_CPPFLAGS, the __glXGetCurrentContext
wrapper function is no longer needed and causes compile errors.  Using
the correct defines causes it to be a macro!

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoglx/tests: Add unit tests for the GLX part of GLX_MESA_query_renderer
Ian Romanick [Sun, 17 Feb 2013 21:53:19 +0000 (13:53 -0800)]
glx/tests: Add unit tests for the GLX part of GLX_MESA_query_renderer

These tests primarilly ensure that the functions added by this extension
don't abuse other interfaces (e.g., glx_screen::query_renderer_integer)
when provided bad data.

These tests helped me find a couple small bugs in the initial
implementation.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoglx/tests: Add GetGLXScreenConfigs_called flag
Ian Romanick [Fri, 22 Feb 2013 23:35:27 +0000 (15:35 -0800)]
glx/tests: Add GetGLXScreenConfigs_called flag

Tests for the GLX_MESA_query_context extension will use this flag.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agodocs: Import extension spec for GLX_MESA_query_renderer
Ian Romanick [Sat, 16 Feb 2013 06:38:23 +0000 (22:38 -0800)]
docs: Import extension spec for GLX_MESA_query_renderer

The enumerated values are currently allocated from Intel's range.

v2: Fix a typo.  Update the list of functions to which the new enums can
be passed.  The "Current" versions were previously missing.  Both things
noticed by Marek.

v3: Fix typo in return type of glXQueryRendererIntegerMESA in the spec
body (noticed by Ken).  Fix typo in issue #14 referencing itself instead
of issue #13 (noticed by Dave).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Dave Airlie <airlied@redhat.com>
11 years agoglx/dri2: Add DRI2 support for GLX_MESA_query_renderer
Ian Romanick [Sat, 16 Feb 2013 06:35:55 +0000 (22:35 -0800)]
glx/dri2: Add DRI2 support for GLX_MESA_query_renderer

The new functions for this extension were added to a separate file
(dri2_query_renderer.c) to facilitate unit testing.  I tried putting
them in dri2_glx.c, and it resulting in an unending chain of
dependencies.  It was the proverbial threading hanging from a sweater.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglx/dri2: Pull some internal structures out to a separate header file
Ian Romanick [Sat, 23 Feb 2013 00:43:02 +0000 (16:43 -0800)]
glx/dri2: Pull some internal structures out to a separate header file

This structures will be accessed by internal functions that will be
added in a file separate from dri2_glx.c.  The new code will be added to
a new file to facilitate unit testing.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglx/tests: Silence warnings after adding fields to glx_screen_vtable
Ian Romanick [Sat, 23 Feb 2013 01:13:10 +0000 (17:13 -0800)]
glx/tests: Silence warnings after adding fields to glx_screen_vtable

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoglx: Add functions and GLX plumbing for GLX_MESA_query_renderer
Ian Romanick [Sat, 16 Feb 2013 06:35:24 +0000 (22:35 -0800)]
glx: Add functions and GLX plumbing for GLX_MESA_query_renderer

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglx: Add GLX_MESA_query_renderer
Ian Romanick [Sat, 16 Feb 2013 06:33:04 +0000 (22:33 -0800)]
glx: Add GLX_MESA_query_renderer

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglx: Add extension tracking GLX_MESA_query_renderer
Ian Romanick [Fri, 15 Feb 2013 01:05:08 +0000 (17:05 -0800)]
glx: Add extension tracking GLX_MESA_query_renderer

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Wire up initial support for DRI_RENDERER_QUERY extension
Ian Romanick [Fri, 15 Feb 2013 00:50:28 +0000 (16:50 -0800)]
i965: Wire up initial support for DRI_RENDERER_QUERY extension

v2: Use sysconf instead of sysinfo for improved portability.  Suggested
by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Wire up initial support for DRI_RENDERER_QUERY extension
Ian Romanick [Fri, 11 Oct 2013 19:26:57 +0000 (12:26 -0700)]
i915: Wire up initial support for DRI_RENDERER_QUERY extension

v2: Use sysconf instead of sysinfo for improved portability.  Suggested
by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agodri: Add function to implement queries common to all Mesa drivers
Ian Romanick [Fri, 11 Oct 2013 20:28:21 +0000 (13:28 -0700)]
dri: Add function to implement queries common to all Mesa drivers

v2: Add assertions that the version string has the expected format.
This will catch build errors (or changes to the version string format)
in debug build without exposing release builds to buffer over-runs.
Suggested by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Refactor the renderer string creation out of intelGetString
Ian Romanick [Fri, 11 Oct 2013 19:20:57 +0000 (12:20 -0700)]
i965: Refactor the renderer string creation out of intelGetString

This will soon be used in intel_screen.c from a function that doesn't
have a gl_context.

v2: Delete local variables that are now unused.  This matches v1 of the
changes to the i915 driver.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Refactor the renderer string creation out of intelGetString
Ian Romanick [Fri, 15 Feb 2013 00:27:01 +0000 (16:27 -0800)]
i915: Refactor the renderer string creation out of intelGetString

This will soon be used in intel_screen.c from a function that doesn't
have a gl_context.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Refactor the vendor string out of intelGetString
Ian Romanick [Fri, 11 Oct 2013 19:16:39 +0000 (12:16 -0700)]
i965: Refactor the vendor string out of intelGetString

This will soon be used in intel_screen.c from a function that doesn't
have a gl_context.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Refactor the vendor string out of intelGetString
Ian Romanick [Fri, 15 Feb 2013 00:25:44 +0000 (16:25 -0800)]
i915: Refactor the vendor string out of intelGetString

This will soon be used in intel_screen.c from a function that doesn't
have a gl_context.

v2: Remove spurious break after return.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agodri: Add interface definition for DRI_RENDERER_QUERY extension
Ian Romanick [Thu, 14 Feb 2013 23:51:52 +0000 (15:51 -0800)]
dri: Add interface definition for DRI_RENDERER_QUERY extension

This will be used to let apps query hardware and driver limits before
creating a GL context.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Enable DRI_Robustness extension
Ian Romanick [Tue, 11 Sep 2012 08:08:44 +0000 (11:08 +0300)]
i965: Enable DRI_Robustness extension

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Propagate the GPU reset notifiction strategy down into the driver
Ian Romanick [Tue, 11 Sep 2012 08:07:25 +0000 (11:07 +0300)]
i965: Propagate the GPU reset notifiction strategy down into the driver

If the application requests reset notifiction, connect up the reset
status query method and set gl_context::ResetStrategy.

v2: Update based on kernel interface / libdrm changes.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Add function to query the GPU reset status for a context
Ian Romanick [Tue, 11 Sep 2012 08:05:57 +0000 (11:05 +0300)]
i965: Add function to query the GPU reset status for a context

v2: Update based on kernel interface / libdrm changes.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Handle __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag
Ian Romanick [Tue, 11 Sep 2012 07:31:13 +0000 (10:31 +0300)]
i965: Handle __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa/dri: Move context flag validation down into the drivers
Ian Romanick [Mon, 10 Sep 2012 14:31:24 +0000 (17:31 +0300)]
mesa/dri: Move context flag validation down into the drivers

Soon some drivers will support a different set of flags than other
drivers.  If some flags have to be filtered in the driver, we might as
well filter all of them in the driver.

The changes in nouveau use tabs because nouveau seems to have it's own
indentation rules.

v2: Fix some rebase failures noticed by Ken (returning the wrong types,
etc.).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa/dri: Add basic plumbing for GLX_ARB_robustness reset notification strategy
Ian Romanick [Mon, 10 Sep 2012 14:11:33 +0000 (17:11 +0300)]
mesa/dri: Add basic plumbing for GLX_ARB_robustness reset notification strategy

No drivers advertise the DRI2 extension yet, so no driver should ever
see a value other than false for notify_reset.

The changes in nouveau use tabs because nouveau seems to have it's own
indentation rules.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: Implement proper tracking logic for glGetGraphicsResetStatusARB
Ian Romanick [Thu, 6 Sep 2012 05:31:59 +0000 (22:31 -0700)]
mesa: Implement proper tracking logic for glGetGraphicsResetStatusARB

Drivers still have to implement dd_function_table::GetGraphicsResetStatus.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: Add gl_shared_state::ShareGroupReset and gl_context::ShareGroupReset
Ian Romanick [Thu, 6 Sep 2012 05:30:43 +0000 (22:30 -0700)]
mesa: Add gl_shared_state::ShareGroupReset and gl_context::ShareGroupReset

These will be used to determine whether to signal a GPU reset after
another context in the share group has observed a reset.

v2: Change ShareGroupReset from GLboolean to bool.  Suggested by Brian.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: Add dd_function_table::GetGraphicsResetStatus
Ian Romanick [Thu, 6 Sep 2012 05:26:01 +0000 (22:26 -0700)]
mesa: Add dd_function_table::GetGraphicsResetStatus

This allows drivers to determine whether a GPU reset has occured.  It
should return non-zero status if a reset was observed by the specified
context.  Another mechanism will be used to observe resets occuring in
other contexts in the share group.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: Remove gl_context::ResetStatus
Ian Romanick [Thu, 6 Sep 2012 05:21:36 +0000 (22:21 -0700)]
mesa: Remove gl_context::ResetStatus

This isn't going to be used in the actual implemenation of
glGetGraphicsResetStatus.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agost/xorg: Delete.
Matt Turner [Sun, 27 Oct 2013 00:25:11 +0000 (17:25 -0700)]
st/xorg: Delete.

Acked-by: Lucas Stach <l.stach@pengutronix.de>
11 years agoxorg-nouveau: Delete.
Matt Turner [Thu, 7 Nov 2013 05:40:05 +0000 (21:40 -0800)]
xorg-nouveau: Delete.

11 years agoxorg-i915: Delete.
Matt Turner [Thu, 7 Nov 2013 05:38:39 +0000 (21:38 -0800)]
xorg-i915: Delete.

Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Acked-by: Stéphane Marchesin <stephane.marchesin@gmail.com>
11 years agodocs: Mark off ARB_shader_atomic_counters for i965
Ian Romanick [Fri, 8 Nov 2013 00:02:03 +0000 (16:02 -0800)]
docs: Mark off ARB_shader_atomic_counters for i965

...and update relnotes.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoi965/gen7: Expose ARB_shader_atomic_counters.
Francisco Jerez [Sun, 20 Oct 2013 21:11:27 +0000 (14:11 -0700)]
i965/gen7: Expose ARB_shader_atomic_counters.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoglsl: Linker support for ARB_shader_atomic_counters.
Francisco Jerez [Wed, 11 Sep 2013 19:14:46 +0000 (12:14 -0700)]
glsl: Linker support for ARB_shader_atomic_counters.

v2: Add comments on the purpose of the auxiliary data structures.
    Check for atomic counter overlaps.  Use the contains_atomic()
    convenience method.  Add static assert with the number of expected
    shader stages.
v3: Don't resize atomic arrays.
v4: Add comment on the reason why we don't resize atomic counter
    arrays.  Use 'strcmp(...) == 0' instead of '!strcmp(...)'.
v5 (idr):  Don't use STL in the linker.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoglsl: Implement parser support for atomic counters.
Francisco Jerez [Sun, 20 Oct 2013 19:38:07 +0000 (12:38 -0700)]
glsl: Implement parser support for atomic counters.

v2: Mark atomic counters as read-only variables.  Move offset overlap
    code to the linker.  Use the contains_atomic() convenience method.
v3: Use pointer to integer instead of non-const reference.  Add
    comment so we remember to add a spec quotation from the next GLSL
    release once the issue of atomic counter aggregation within
    structures is clarified.
v4 (idr): Don't use std::map because it's overkill.  Add an assertion
    that ctx->Const.MaxAtomicBufferBindings <= MAX_COMBINED_ATOMIC_BUFFERS.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoRevert "i965: Add support for GL_AMD_performance_monitor on Ironlake."
Kenneth Graunke [Wed, 23 Oct 2013 05:55:33 +0000 (22:55 -0700)]
Revert "i965: Add support for GL_AMD_performance_monitor on Ironlake."

This reverts most of commit 0f2da773070c06b6d20ad264d3abb19c4dfd9761.
(I chose to leave the additions to brw_defines.h.)

My previous Ironlake implementation was somewhat broken: counter data
was global, rather than per-context.  This meant that performance
monitors captured data from your compositor, 2D driver, and other 3D
programs.

Originally, I believed that Sandybridge and later had an easy way to
avoid this problem (setting per-context flags in OACONTROL), while
Ironlake did not.  So I'd intended to leave it as a known limitation of
performance monitoring support on Ironlake.  However, this turned out
not to be true.

Unfortunately, our hardware only has one set of aggregating performance
counters shared between all 3D programs, and their values are not saved
or restored by hardware contexts.  Also, at least on Sandybridge and
Ivybridge, the counters lose their values if the GPU goes to sleep.

To work around both of these problems, we have to snapshot the
performance counters at the beginning and end of each batch, similar to
how we handle query objects on platforms that don't support hardware
contexts.

For occlusion queries, this batch bookending approach is fairly simple:
only one occlusion query can be active at a time, and the result is a
single integer.  Performance monitors are more complex: an arbitrary
number of monitors can be active at a time, each monitoring some subset
of our ~30 observability counters.  Individual monitors can be started
and stopped at any point during the batch.  Tracking where each monitor
started/ended relative to batch flushes ends up being a pain.  And you
can run out of space in the buffer.

Properly supporting this required some serious rearchitecting of the
code.  Rather than writing patches to try and morph a broken system into
a working one (which operates quite differently), I decided it would be
simplest to revert the old code and start fresh.  Parts will look
familiar, but other parts are new.

I also decided it would be best to include Sandybridge and Ivybridge
support from the start, since the newer platforms have added complexity
that I wanted to make sure worked.  They're also what most people care
about these days.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglsl: Enable dFdx, dFdy, and fwidth by default in GLSL ES 3.00.
Kenneth Graunke [Thu, 7 Nov 2013 22:39:23 +0000 (14:39 -0800)]
glsl: Enable dFdx, dFdy, and fwidth by default in GLSL ES 3.00.

Previously, we only exposed them in desktop GL or with:

   #extension GL_OES_standard_derivatives : enable

GLSL ES 3.00 includes these without an extension, so we need to expose
them by default.

Note that the above #extension line results in an error or desktop GL,
so we don't need to worry about this.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>