platform/upstream/mesa.git
10 years agoi965: Implement GL_PRIMITIVES_GENERATED with non-zero streams.
Iago Toral Quiroga [Tue, 17 Jun 2014 11:45:18 +0000 (13:45 +0200)]
i965: Implement GL_PRIMITIVES_GENERATED with non-zero streams.

So far we have been using CL_INVOCATION_COUNT to resolve this query but this
is no good with streams, as only stream 0 reaches the clipping stage. Instead
we will use SO_PRIM_STORAGE_NEEDED which can keep track of the primitives sent
to each individual stream.

Since SO_PRIM_STORAGE_NEEDED is related to the SOL stage and according to
ARB_transform_feedback3 we need to be able to query primitives generated in
each stream whether transform feedback is active or not what we do is to
enable the SOL unit even if transform feedback is not active but disable all
output buffers in that case. This effectively disables transform feedback
but permits activation of statistics enabling SO_PRIM_STORAGE_NEEDED even
when transform feedback is not active.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965: Implement GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN with non-zero streams.
Iago Toral Quiroga [Tue, 10 Jun 2014 11:29:40 +0000 (13:29 +0200)]
i965: Implement GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN with non-zero streams.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agomesa: Include stream information in indexed queries.
Iago Toral Quiroga [Tue, 10 Jun 2014 11:28:38 +0000 (13:28 +0200)]
mesa: Include stream information in indexed queries.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: include streamId when reading/printing ir_variable IR.
Samuel Iglesias Gonsalvez [Tue, 10 Jun 2014 06:45:44 +0000 (08:45 +0200)]
glsl: include streamId when reading/printing ir_variable IR.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: include streamId when reading/printing emit-vertex and end-primitive IR.
Iago Toral Quiroga [Sun, 8 Jun 2014 11:16:26 +0000 (13:16 +0200)]
glsl: include streamId when reading/printing emit-vertex and end-primitive IR.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoi965/gs: Set control data bits for vertices emitted in stream mode.
Iago Toral Quiroga [Tue, 3 Jun 2014 14:38:44 +0000 (16:38 +0200)]
i965/gs: Set control data bits for vertices emitted in stream mode.

In stream mode we have to set control data bits with the StreamID
information for every vertex.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoglsl: Validate vertex emission in geometry shaders.
Iago Toral Quiroga [Mon, 16 Jun 2014 14:09:53 +0000 (16:09 +0200)]
glsl: Validate vertex emission in geometry shaders.

Check if non-zero streams are used. Fail to link if emitting to unsupported
streams or emitting to non-zero streams with output type other than GL_POINTS.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoglsl: Add support for EmitStreamVertex() and EndStreamPrimitive().
Iago Toral Quiroga [Fri, 20 Jun 2014 08:43:57 +0000 (10:43 +0200)]
glsl: Add support for EmitStreamVertex() and EndStreamPrimitive().

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoglsl: Modify ir_end_primitive to have a stream.
Iago Toral Quiroga [Fri, 20 Jun 2014 08:38:53 +0000 (10:38 +0200)]
glsl: Modify ir_end_primitive to have a stream.

This will be necessary to implement EndStreamPrimitive().
EndPrimitive() will produce an ir_end_primitive with the default stream 0.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoglsl: Modify ir_emit_vertex to have a stream.
Iago Toral Quiroga [Fri, 20 Jun 2014 08:26:29 +0000 (10:26 +0200)]
glsl: Modify ir_emit_vertex to have a stream.

This will be necessary to implement EmitStreamVertex().
EmitVertex() will produce an ir_emit_vertex with the default stream 0.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965/gs: Set number of control data bits for stream mode.
Iago Toral Quiroga [Tue, 3 Jun 2014 10:25:08 +0000 (12:25 +0200)]
i965/gs: Set number of control data bits for stream mode.

If the geometry shader is indeed using streams then we need 2 control data
bits per vertex for the StreamID. If the shader is not using streams then
we don't need control data bits.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Store info about geometry shaders that emit vertices to non-zero streams.
Iago Toral Quiroga [Fri, 6 Jun 2014 10:31:30 +0000 (12:31 +0200)]
glsl: Store info about geometry shaders that emit vertices to non-zero streams.

On Intel hardware when a geometry shader outputs GL_POINTS primitives we
only need to emit vertex control bits if it emits vertices to non-zero
streams, so use a flag to track this.

This flag will be set to TRUE when a geometry shader calls EmitStreamVertex()
or EndStreamPrimitive() with a non-zero stream parameter in a later patch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Only geometry shader outputs can be associated with non-zero streams.
Iago Toral Quiroga [Fri, 6 Jun 2014 11:28:32 +0000 (13:28 +0200)]
glsl: Only geometry shader outputs can be associated with non-zero streams.

This should be ensured by the parser, so assert on that.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Two varyings can't write to the same buffer from different streams.
Iago Toral Quiroga [Fri, 6 Jun 2014 07:44:34 +0000 (09:44 +0200)]
glsl: Two varyings can't write to the same buffer from different streams.

If this is detected, fail to link.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Add methods to retrive a varying's name and streamId.
Iago Toral Quiroga [Fri, 6 Jun 2014 07:43:04 +0000 (09:43 +0200)]
glsl: Add methods to retrive a varying's name and streamId.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Fail to link if inter-stage input/outputs are not assigned to stream 0
Iago Toral Quiroga [Thu, 5 Jun 2014 09:36:56 +0000 (11:36 +0200)]
glsl: Fail to link if inter-stage input/outputs are not assigned to stream 0

Outputs that are linked to inputs in the next stage must be output to stream 0,
otherwise we should fail to link.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Assign GLSL StreamIds to transform feedback outputs.
Iago Toral Quiroga [Thu, 5 Jun 2014 08:47:01 +0000 (10:47 +0200)]
glsl: Assign GLSL StreamIds to transform feedback outputs.

Inter-shader outputs must be on stream 0, which is the default.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agoi965: Enable transform feedback for streams > 0
Iago Toral Quiroga [Thu, 5 Jun 2014 06:33:59 +0000 (08:33 +0200)]
i965: Enable transform feedback for streams > 0

Configure hardware to read vertex data for all streams and have all streams
write their varyings to the corresponsing output buffers.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agomesa: add StreamId information to transform feedback outputs.
Iago Toral Quiroga [Thu, 5 Jun 2014 06:31:40 +0000 (08:31 +0200)]
mesa: add StreamId information to transform feedback outputs.

For now initialized to the default stream 0.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Add parsing support for multi-stream output in geometry shaders.
Samuel Iglesias Gonsalvez [Tue, 10 Jun 2014 06:45:43 +0000 (08:45 +0200)]
glsl: Add parsing support for multi-stream output in geometry shaders.

This implements parsing requirements for multi-stream support in
geometry shaders as defined in ARB_gpu_shader5.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agost/omx: strcpy the string into the allocated buffer
Emil Velikov [Sat, 28 Jun 2014 14:24:43 +0000 (15:24 +0100)]
st/omx: strcpy the string into the allocated buffer

This fixes commit a001ca98e15(st/omx: keep the name,
(name|role)_specific strings dynamically allocated) in which we
dynamically allocated the buffers for name and (name|role)_specific
yet forgot to copy the encoder strings into them.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80614
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
10 years agomesa: expose ARB_seamless_cubemap_per_texture when supported
Ilia Mirkin [Sun, 22 Jun 2014 17:47:19 +0000 (13:47 -0400)]
mesa: expose ARB_seamless_cubemap_per_texture when supported

All of the bits appear to already be in place to support this in the
sampler (which the original AMD version didn't allow).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agost/omx: keep the name, (name|role)_specific strings dynamically allocated
Emil Velikov [Thu, 26 Jun 2014 16:43:46 +0000 (17:43 +0100)]
st/omx: keep the name, (name|role)_specific strings dynamically allocated

... as it's caller (the external program omxregister-bellagio) is the one
who frees all of the allocated memory.

Reported-by: Pedretti Fabio <pedretti.fabio@gmail.com>
Tested-by: Fabio Pedretti <pedretti.fabio@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
10 years agodocs: Update the status of a few things in GL3.txt
Chris Forbes [Fri, 27 Jun 2014 10:13:21 +0000 (22:13 +1200)]
docs: Update the status of a few things in GL3.txt

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
10 years agonv50: fix dri3 prime buffer creation
Axel Davy [Fri, 27 Jun 2014 00:53:43 +0000 (20:53 -0400)]
nv50: fix dri3 prime buffer creation

This is the same fix than
"nvc0: fix dri3 prime buffer creation"

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agonvc0: fix dri3 prime buffer creation
Dave Airlie [Mon, 16 Jun 2014 05:39:02 +0000 (05:39 +0000)]
nvc0: fix dri3 prime buffer creation

We need to place shared buffers into GART.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agogallium/dri2: implement blitImage
Axel Davy [Thu, 19 Jun 2014 03:27:36 +0000 (23:27 -0400)]
gallium/dri2: implement blitImage

V3: call flush_resource before flush
V4: Add new flags

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodri/image: add blitImage to the specification
Axel Davy [Thu, 19 Jun 2014 03:27:35 +0000 (23:27 -0400)]
dri/image: add blitImage to the specification

It allows to blit two __DRIimages.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agogallium: Add __DRIimageDriverExtension support to gallium
Axel Davy [Thu, 19 Jun 2014 03:27:30 +0000 (23:27 -0400)]
gallium: Add __DRIimageDriverExtension support to gallium

__DRIimageDriverExtension is used by GLX DRI3 and Wayland.

This patch is a rewrite of
http://lists.freedesktop.org/archives/mesa-dev/2014-May/060318.html
and
http://lists.freedesktop.org/archives/mesa-dev/2014-May/060317.html

Previous patches were:
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodri3: use invalidate.
Axel Davy [Thu, 19 Jun 2014 03:27:31 +0000 (23:27 -0400)]
dri3: use invalidate.

This doesn't change anything to the intel DRI3 implementation,
but enables the gallium implementation to use dri2.stamp instead
of relying on the stamp shared with the st backend.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodri3: fix image extension checking.
Dave Airlie [Fri, 27 Jun 2014 01:38:21 +0000 (11:38 +1000)]
dri3: fix image extension checking.

Move the image extension setup in with all the others in
bind_extensions, and improve the check to both version
and function pointer.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agoglxext: Send the Drawable's ID in the GLX_BufferSwapComplete event
Jasper St. Pierre [Tue, 24 Jun 2014 17:43:53 +0000 (13:43 -0400)]
glxext: Send the Drawable's ID in the GLX_BufferSwapComplete event

While the official INTEL_swap_event specification says that the drawable
field should contain the GLXDrawable, not the Drawable, the existing
DRI2 code in dri2.c that translates from DRI2_BufferSwapComplete sends out
GLX_BufferSwapComplete with the Drawable's ID, so existing codebases
like Clutter/Cogl rely on getting the Drawable.

Match DRI2's error here and stuff the event with the X Drawable, not
the GLX drawable.

This fixes apps seeing wrong drawables through an indirect GLX context
or with DRI3, which uses the GLX_BufferSwapComplete event directly on
the wire instead of translates Present in mesa.

At the same time, also modify the structure for the event to make sure
that clients don't make the same mistake. This is not an API or ABI
break, as GLXDrawable and Drawable are both typedefs for XID.

Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agoi965: Enable compressed multisample support (CMS) on Broadwell.
Kenneth Graunke [Tue, 24 Jun 2014 23:34:49 +0000 (16:34 -0700)]
i965: Enable compressed multisample support (CMS) on Broadwell.

Everything is in place and appears to be working.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
10 years agoi965: Add 2x MSAA support to the MCS allocation function.
Kenneth Graunke [Tue, 24 Jun 2014 23:33:56 +0000 (16:33 -0700)]
i965: Add 2x MSAA support to the MCS allocation function.

2x MSAA also uses 8 bits, just like 4x.  More bits are unused.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
10 years agoi965: Hook up the MCS buffers in SURFACE_STATE on Broadwell.
Kenneth Graunke [Sat, 10 May 2014 08:59:10 +0000 (01:59 -0700)]
i965: Hook up the MCS buffers in SURFACE_STATE on Broadwell.

MCS buffers are never allocated on Broadwell, so this does nothing for
now, but puts the infrastructure in place for when they do exist.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoi965: Drop SINT workaround for CMS layout on Broadwell.
Kenneth Graunke [Sat, 10 May 2014 05:22:24 +0000 (22:22 -0700)]
i965: Drop SINT workaround for CMS layout on Broadwell.

According to the documentation, we don't need this SINT workaround on
Broadwell.  (Or at least, it doesn't mention that we need it.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoi965: Add plumbing for Broadwell's auxiliary surface support.
Kenneth Graunke [Sat, 10 May 2014 08:42:15 +0000 (01:42 -0700)]
i965: Add plumbing for Broadwell's auxiliary surface support.

Broadwell generalizes the MCS fields to allow for multiple kinds of
auxiliary surfaces.  This patch adds the plumbing to set those values,
but doesn't yet hook any up.

v2: (by Jordan Justen) Use mt for qpitch; pitch is tiles - 1.
v3: Don't forget to subtract 1 from aux_mt->pitch.
v4: Drop unnecessary aux_mt->offset (caught by Jordan Justen).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoi965: Add auxiliary surface field #defines for Broadwell.
Jordan Justen [Thu, 6 Mar 2014 17:18:14 +0000 (09:18 -0800)]
i965: Add auxiliary surface field #defines for Broadwell.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoi965: Disassemble all of DP write message control bits on Gen6.
Kenneth Graunke [Thu, 26 Jun 2014 18:19:15 +0000 (11:19 -0700)]
i965: Disassemble all of DP write message control bits on Gen6.

Prior to the new brw_inst API, the brw_instruction structure split off
bits 4 and 5 of msg_control for specific fields, and we failed to
disassemble them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Pass brw to brw_try_compact_instruction().
Matt Turner [Mon, 16 Jun 2014 23:34:57 +0000 (16:34 -0700)]
i965: Pass brw to brw_try_compact_instruction().

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Add is_cherryview flag to brw_context.
Matt Turner [Sun, 15 Jun 2014 18:15:30 +0000 (11:15 -0700)]
i965: Add is_cherryview flag to brw_context.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Add CSEL opcode definition for Gen8.
Matt Turner [Mon, 16 Jun 2014 01:58:28 +0000 (18:58 -0700)]
i965: Add CSEL opcode definition for Gen8.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Document which instructions are generation specific.
Matt Turner [Sat, 14 Jun 2014 03:50:45 +0000 (20:50 -0700)]
i965: Document which instructions are generation specific.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Don't set UIP for ENDIF/WHILE.
Matt Turner [Tue, 17 Jun 2014 19:14:05 +0000 (12:14 -0700)]
i965: Don't set UIP for ENDIF/WHILE.

They don't have a UIP. We used UIP in an array dereference, which never
caused problems on Gen < 8, since UIP was a small integer (number of
instructions). On Gen 8 UIP is in bytes, so it's large enough that it
caused us to read out of bounds of the array.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Replace struct brw_compact_instruction with brw_compact_inst.
Matt Turner [Fri, 13 Jun 2014 23:16:28 +0000 (16:16 -0700)]
i965: Replace struct brw_compact_instruction with brw_compact_inst.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Convert brw_eu_compact.c to the new brw_compact_inst API.
Matt Turner [Sat, 14 Jun 2014 00:30:05 +0000 (17:30 -0700)]
i965: Convert brw_eu_compact.c to the new brw_compact_inst API.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Introduce a new brw_compact_inst API.
Matt Turner [Fri, 13 Jun 2014 22:09:12 +0000 (15:09 -0700)]
i965: Introduce a new brw_compact_inst API.

For now nothing uses this, but we can incrementally convert.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Replace 'struct brw_instruction' with 'brw_inst'.
Matt Turner [Fri, 13 Jun 2014 21:29:25 +0000 (14:29 -0700)]
i965: Replace 'struct brw_instruction' with 'brw_inst'.

Use this an an opportunity to clean up the formatting of some old code
(brw_ADD, for instance).

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Throw out guts of struct brw_instruction.
Matt Turner [Fri, 13 Jun 2014 19:19:29 +0000 (12:19 -0700)]
i965: Throw out guts of struct brw_instruction.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Convert brw_gs_emit.c to the new brw_inst API.
Matt Turner [Fri, 13 Jun 2014 19:18:24 +0000 (12:18 -0700)]
i965: Convert brw_gs_emit.c to the new brw_inst API.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Convert brw_disasm.c to the new brw_inst API.
Matt Turner [Thu, 12 Jun 2014 23:26:22 +0000 (16:26 -0700)]
i965: Convert brw_disasm.c to the new brw_inst API.

v2: (by Kenneth Graunke)
 - Fix disassembly of Gen4-5 SEND messages to print base MRF correctly.
 - Only print URB opcode on Gen5+, to match previous output (besides,
   there is only one opcode AFAICT.)
 - Only print the low 3 bits of msg_control, to match previous output.
   (We probably should decode all the fields, but hadn't previously due
   to the brw_instruction structure definition splitting out bits 4/5
   for last_render_target and slot_group_select.)
 - Fix 3-source MRF/GRF file decoding on Sandybridge.
 - Fix compression code to use qtr_control rather than cmpt_control
   (which is compaction, not compression).

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> [v2]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Pass brw rather than gen to brw_disassemble_inst().
Matt Turner [Thu, 12 Jun 2014 23:08:02 +0000 (16:08 -0700)]
i965: Pass brw rather than gen to brw_disassemble_inst().

We will need it in order to use the new brw_inst API.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Convert brw_eu_compact.c to the new brw_inst API.
Matt Turner [Thu, 12 Jun 2014 06:10:19 +0000 (23:10 -0700)]
i965: Convert brw_eu_compact.c to the new brw_inst API.

v2: Use brw_inst_bits rather than pulling out individual fields and
    reassembling them.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Extend is_haswell checks to gen >= 8 in Gen4-7 generators.
Kenneth Graunke [Sun, 8 Jun 2014 06:52:37 +0000 (23:52 -0700)]
i965: Extend is_haswell checks to gen >= 8 in Gen4-7 generators.

We're going to use fs_generator/vec4_generator for Gen8+ code soon,
thanks to the new brw_instruction API.  When we do, we'll generally
want to take the Haswell paths on Gen8+ as well.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Convert test_eu_compact.c to the new brw_inst API.
Kenneth Graunke [Sun, 8 Jun 2014 05:58:26 +0000 (22:58 -0700)]
i965: Convert test_eu_compact.c to the new brw_inst API.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Convert vec4_generator to the new brw_inst API.
Kenneth Graunke [Sun, 8 Jun 2014 05:46:59 +0000 (22:46 -0700)]
i965: Convert vec4_generator to the new brw_inst API.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Convert fs_generator to the new brw_inst API.
Kenneth Graunke [Sun, 8 Jun 2014 05:44:24 +0000 (22:44 -0700)]
i965: Convert fs_generator to the new brw_inst API.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Convert Gen4-5 clipping code to the new brw_inst API.
Kenneth Graunke [Sun, 8 Jun 2014 05:22:41 +0000 (22:22 -0700)]
i965: Convert Gen4-5 clipping code to the new brw_inst API.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Convert brw_sf_emit.c to the new brw_inst API.
Kenneth Graunke [Sun, 8 Jun 2014 04:29:47 +0000 (21:29 -0700)]
i965: Convert brw_sf_emit.c to the new brw_inst API.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Convert brw_eu_emit.c to the new brw_inst API.
Kenneth Graunke [Thu, 5 Jun 2014 00:08:57 +0000 (17:08 -0700)]
i965: Convert brw_eu_emit.c to the new brw_inst API.

v2:
 - Fix IF -> ELSE patching on Sandybridge.
 - Don't set base_mrf on Gen6+ in OWord Block Read functions.  (Although
 - the old code did this universally, it shouldn't have - the field
 - doesn't exist on Gen6+ and just got overwritten by the SFID anyway.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Convert brw_eu.[ch] to use the new brw_inst API.
Kenneth Graunke [Sun, 8 Jun 2014 04:24:41 +0000 (21:24 -0700)]
i965: Convert brw_eu.[ch] to use the new brw_inst API.

v2: Don't set flag_reg_nr prior to Gen7 (as it doesn't exist).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Introduce a new brw_inst API.
Kenneth Graunke [Thu, 5 Jun 2014 00:07:30 +0000 (17:07 -0700)]
i965: Introduce a new brw_inst API.

This is similar to gen8_instruction, and will eventually replace it.

For now nothing uses this, but we can incrementally convert.
The new API takes the existing brw_instruction pointers to ease
conversion; when done, we can simply drop the old structure and rename
struct brw_instruction -> brw_inst.

v2: (by Matt Turner) Make JIP/UIP functions take a signed argument.
v3: (by Kenneth Graunke)
 - Make Gen4-6 jump target functions take a signed argument.
 - Fix indirect align1 AddrImm bits on Gen4-7.
 - Fix SFID on Sandybridge to use bits 27:24.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> [v1, v3+]
Signed-off-by: Matt Turner <mattst88@gmail.com> [v2]
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Pass brw into next_offset().
Kenneth Graunke [Sun, 8 Jun 2014 04:15:59 +0000 (21:15 -0700)]
i965: Pass brw into next_offset().

The new brw_inst API is going to require a brw pointer in order
to access fields (so it can do generation checks).  Plumb it in now.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
10 years agoi965: Remove unneeded VS workaround stalls on Baytrail.
Greg Hunt [Wed, 25 Jun 2014 13:42:24 +0000 (14:42 +0100)]
i965: Remove unneeded VS workaround stalls on Baytrail.

According to the workarounds list, these stalls aren't needed on
production Baytrail systems.  Piglit confirms that as well.

These cause a small slowdown when we are sending a large number of small
batches to the GPU.  Removing these improves performance by up to 5% on
some CPU bound SynMark tests (Batch[4-7], DrvState1, HdrBloom,
Multithread, ShMapPcf).

Signed-off-by: Gregory Hunt <greg.hunt@mobica.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Include marketing names for Broadwell GPUs.
Kenneth Graunke [Tue, 24 Jun 2014 23:18:11 +0000 (16:18 -0700)]
i965: Include marketing names for Broadwell GPUs.

Intel would like us to include the marketing names.  Developers
additionally want "Broadwell GT1/2/3" because it makes it easier
to identify what hardware users have when they request assistance
or report issues.

Including both makes it easy for everyone to map between the names.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
10 years agosoftpipe: use last_level from sampler view, not from the resource
Roland Scheidegger [Thu, 26 Jun 2014 00:37:44 +0000 (02:37 +0200)]
softpipe: use last_level from sampler view, not from the resource

The last_level from the sampler view may be limited by the state tracker
to a value lower than what the base texture provides.

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

Reviewed-by: Brian Paul <brianp@vmware.com>
10 years agotargets/automake.inc: s/GALLIUM_VIDEO_CFLAGS/GALLIUM_TARGET_CFLAGS/
Emil Velikov [Thu, 12 Jun 2014 16:10:52 +0000 (17:10 +0100)]
targets/automake.inc: s/GALLIUM_VIDEO_CFLAGS/GALLIUM_TARGET_CFLAGS/

The flags are not specific to the video targets plus
we can reuse them for targets/xa and targets/gbm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
10 years agoauxiliary/vl: Remove no longer used SPLIT_TARGETS
Emil Velikov [Thu, 12 Jun 2014 16:03:50 +0000 (17:03 +0100)]
auxiliary/vl: Remove no longer used SPLIT_TARGETS

Required for the conversion stage of all VL targets to
a single library per API (static/shared pipe-drivers).

No longer required as per last commit.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
10 years agotargets/radeonsi/omx: convert to static/shared pipe-drivers
Emil Velikov [Sat, 21 Jun 2014 11:38:30 +0000 (12:38 +0100)]
targets/radeonsi/omx: convert to static/shared pipe-drivers

The radeonsi counterpart of previous commit - now libomx-radeonsi is
built into the libomx-mesa library. Providing a single library per API.

v2: Include the radeon winsys only when there is a user for it.
v3: Correcly include the winsys. Now with extra brown bag :\

Note: Make sure to rebuild the .omxregister file, by executing
   $ omxregister-bellagio

This patch concludes the unification. Now libomx-mesa will be used
for all hardware - r600, radeonsi and nouveau.

Cc: Leo Liu <leo.liu@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
10 years agotargets/r600/omx: convert to static/shared pipe-drivers
Emil Velikov [Thu, 12 Jun 2014 15:38:54 +0000 (16:38 +0100)]
targets/r600/omx: convert to static/shared pipe-drivers

The r600 counterpart of previous commit - now the libomx-r600 is
built into the libomx-mesa library. Providing a single library per API.

v2: Include the radeon winsys only when there is a user for it.
v3: Correcly include the winsys. Now with extra brown bag :\

Note: Make sure to rebuild the .omxregister file, by executing
   $ omxregister-bellagio

If you have more than one omx library (libomx-radeonsi, libomx-r600),
make sure to temporary move the unused one. By the end of the series
there will be only one library that will be used for all hardware -
r600, radeonsi and nouveau.

Cc: Leo Liu <leo.liu@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
10 years agotargets/omx-nouveau: convert to static/shared pipe-drivers
Emil Velikov [Thu, 12 Jun 2014 15:33:58 +0000 (16:33 +0100)]
targets/omx-nouveau: convert to static/shared pipe-drivers

Similar to the vdpau/xvmc targets, we're going to convert the
multiple target libraries into a single one.

The library can be built with the relevant pipe-drivers
statically linked in, or loaded as shared modules.
Currently we default to static.

Note: Make sure to rebuild the .omxregister file, by executing
   $ omxregister-bellagio

If you have more than one omx library (libomx-radeonsi, libomx-r600),
make sure to temporary move the unused one. By the end of the series
there will be only one library that will be used for all hardware -
r600, radeonsi and nouveau.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
10 years agost/omx: avoid using dynamic vid_(enc|dec)_base and avc_(name|role)
Emil Velikov [Tue, 10 Jun 2014 01:14:18 +0000 (02:14 +0100)]
st/omx: avoid using dynamic vid_(enc|dec)_base and avc_(name|role)

Strictly speaking we should not have done this in the
first place, as all of the above should be static across
the system.

Currently this may cause some minor issues, which will be
resolved in the following patches, by providing a single
library for the OMX api.

Cleanup a few unneeded strcpy cases while we're around.

Note: Make sure to rebuild the .omxregister file, by executing
   $ omxregister-bellagio

If you have more than one omx library (libomx-radeonsi, libomx-r600),
make sure to temporary move the unused one. By the end of the series
there will be only one library that will be used for all hardware -
r600, radeonsi and nouveau.

Cc: Leo Liu <leo.liu@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
10 years agost/omx: provide constant number of components
Emil Velikov [Tue, 10 Jun 2014 01:28:00 +0000 (02:28 +0100)]
st/omx: provide constant number of components

The number of components and their names/roles should
be kept constant as all of that information cached.

Note: Make sure to rebuild the .omxregister file, by executing
   $ omxregister-bellagio.

Cc: Leo Liu <leo.liu@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
10 years agoglx: Added missing null check in GetDrawableAttribute()
Juha-Pekka Heikkila [Fri, 25 Apr 2014 08:16:50 +0000 (11:16 +0300)]
glx: Added missing null check in GetDrawableAttribute()

For GLX_BACK_BUFFER_AGE_EXT query added extra null check.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agomesa/main: In register_surface() verify gl_texture_object was found
Juha-Pekka Heikkila [Thu, 8 May 2014 08:16:54 +0000 (11:16 +0300)]
mesa/main: In register_surface() verify gl_texture_object was found

Verify _mesa_lookup_texture() returned valid pointer before using it.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agomesa/main: Verify calloc return value in register_surface()
Juha-Pekka Heikkila [Thu, 8 May 2014 07:34:50 +0000 (10:34 +0300)]
mesa/main: Verify calloc return value in register_surface()

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: Add missing null check in push_back()
Juha-Pekka Heikkila [Wed, 7 May 2014 09:38:07 +0000 (12:38 +0300)]
glsl: Add missing null check in push_back()

Report memory error on realloc failure and don't leak any memory.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoglsl: check _mesa_hash_table_create return value in link_uniform_blocks
Juha-Pekka Heikkila [Thu, 3 Apr 2014 14:06:42 +0000 (17:06 +0300)]
glsl: check _mesa_hash_table_create return value in link_uniform_blocks

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoi965/fs: Check variable_storage return value in fs_visitor::visit
Juha-Pekka Heikkila [Mon, 7 Apr 2014 11:37:42 +0000 (14:37 +0300)]
i965/fs: Check variable_storage return value in fs_visitor::visit

check variable_storage() found the requested fs_reg.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoi965: Handle miptree creation failure in intel_alloc_texture_storage()
Juha-Pekka Heikkila [Mon, 12 May 2014 12:25:59 +0000 (15:25 +0300)]
i965: Handle miptree creation failure in intel_alloc_texture_storage()

Check intel_miptree_create() return value before using it as
a pointer.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoi965: Check calloc return value in gather_statistics_results()
Juha-Pekka Heikkila [Thu, 8 May 2014 13:19:51 +0000 (16:19 +0300)]
i965: Check calloc return value in gather_statistics_results()

Check calloc return value and report on error, also later skip
results handling if there was no memory to store results to.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoi965/vec4: Try constant propagate after copy propagate made progress.
Matt Turner [Tue, 24 Jun 2014 05:29:57 +0000 (22:29 -0700)]
i965/vec4: Try constant propagate after copy propagate made progress.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965/vec4: Make try_copy_propagate() static.
Matt Turner [Tue, 24 Jun 2014 05:16:02 +0000 (22:16 -0700)]
i965/vec4: Make try_copy_propagate() static.

Now that can_do_source_mods() isn't part of the visitor, this doesn't
need to be either.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965/vec4: Rename try_copy/constant_propagat{ion,e} to match the fs.
Matt Turner [Tue, 24 Jun 2014 05:12:03 +0000 (22:12 -0700)]
i965/vec4: Rename try_copy/constant_propagat{ion,e} to match the fs.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965/vec4: Constant propagate into 2-src math instructions on Gen8.
Matt Turner [Tue, 24 Jun 2014 05:07:38 +0000 (22:07 -0700)]
i965/vec4: Constant propagate into 2-src math instructions on Gen8.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965/fs: Constant propagate into 2-src math instructions on Gen8.
Matt Turner [Tue, 24 Jun 2014 05:07:20 +0000 (22:07 -0700)]
i965/fs: Constant propagate into 2-src math instructions on Gen8.

total instructions in shared programs: 1878133 -> 1876986 (-0.06%)
instructions in affected programs:     153007 -> 151860 (-0.75%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965/fs: Make try_constant_propagate() static.
Matt Turner [Tue, 24 Jun 2014 05:05:03 +0000 (22:05 -0700)]
i965/fs: Make try_constant_propagate() static.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoi965: Make can_do_source_mods() a member of the instruction classes.
Matt Turner [Tue, 24 Jun 2014 04:57:31 +0000 (21:57 -0700)]
i965: Make can_do_source_mods() a member of the instruction classes.

Pretty nonsensical to have it as a method of the visitor just for access
to brw.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoglsl: Treat an interface block specifier as a level of struct nesting
Chris Forbes [Sun, 15 Jun 2014 00:57:20 +0000 (12:57 +1200)]
glsl: Treat an interface block specifier as a level of struct nesting

Fixes the piglit test:

   spec/glsl-1.50/compiler/interface-blocks-structs-defined-within-block-instanced.vert

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoglsl: Disallow primitive type layout qualifier on variables.
Chris Forbes [Thu, 12 Jun 2014 09:17:13 +0000 (21:17 +1200)]
glsl: Disallow primitive type layout qualifier on variables.

This only makes any sense on the GS input or output layout declaration,
nowhere else.

Fixes the piglit tests:

  * spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
  * spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
  * spec/glsl-1.50/compiler/layout-fs-no-output.frag
  * spec/glsl-1.50/compiler/layout-vs-no-input.vert
  * spec/glsl-1.50/compiler/layout-vs-no-output.vert

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoglsl: Relax combinations of layout qualifiers with other qualifiers.
Chris Forbes [Thu, 12 Jun 2014 07:48:58 +0000 (19:48 +1200)]
glsl: Relax combinations of layout qualifiers with other qualifiers.

Previously we disallowed any combination of layout with interpolation,
invariant, or precise qualifiers. There is very little spec guidance on
exactly which combinations should be allowed, but with ARB_sso it's
useful to allow these qualifiers with rendezvous-by-location.

Since it's unclear exactly where the layout qualifier should appear when
combined with other qualifiers, we will allow it anywhere before the
auxiliary storage qualifier.

This allows enough flexibility for all examples I've seen, while keeping
the auxiliary-storage-qualifier / storage-qualifier pair together (as
they are a single qualifier in the spec prior to
ARB_shading_language_420pack)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoglsl: Don't convert reductions of ivec to a dot-product
Ian Romanick [Wed, 25 Jun 2014 02:12:24 +0000 (19:12 -0700)]
glsl: Don't convert reductions of ivec to a dot-product

Mesa has an optimization that converts expressions like "v.x + v.y + v.z
+ v.w" into dot(v, 1.0).  And therein lies the rub: the other operand to
the dot-product is always a float... even if the vector is an ivec or
uvec.  This results in an assertion failure in ir_builder.

If the base type of the operand is not float, don't try the
optimization.  Dot-product is not valid on integer data.

Fixes piglit vs-integer-reduction.shader_test and OpenGL ES conformance
test ES2-CTS.gtf.GL2Tests.glGetUniform.glGetUniform.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Christoph Brill <egore911@gmail.com>
10 years agodocs: Import 10.2.2 release notes, add news item
Carl Worth [Wed, 25 Jun 2014 04:49:38 +0000 (21:49 -0700)]
docs: Import 10.2.2 release notes, add news item

10 years agodocs: Import 10.1.6 release notes, add news item
Carl Worth [Wed, 25 Jun 2014 04:40:15 +0000 (21:40 -0700)]
docs: Import 10.1.6 release notes, add news item

10 years agollvmpipe: Fix zero-division in llvmpipe_texture_layout()
Takashi Iwai [Wed, 25 Jun 2014 00:03:07 +0000 (02:03 +0200)]
llvmpipe: Fix zero-division in llvmpipe_texture_layout()

Fix the crash of "gnome-control-center info" invocation on QEMU where
zero height is passed at init.

(sroland: simplify logic by eliminating the div altogether, using 64bit mul.)

Fixes: https://bugzilla.novell.com/show_bug.cgi?id=879462

Cc: "10.2" <mesa-stable@lists.freedesktop.org>
10 years agoi965/fs: Don't fix_math_operand() on Gen >= 8.
Matt Turner [Mon, 23 Jun 2014 20:30:15 +0000 (13:30 -0700)]
i965/fs: Don't fix_math_operand() on Gen >= 8.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoi965/vec4: Don't fix_math_operand() on Gen >= 8.
Matt Turner [Mon, 23 Jun 2014 20:30:14 +0000 (13:30 -0700)]
i965/vec4: Don't fix_math_operand() on Gen >= 8.

The emit_math?_gen? functions serve to implement workarounds for the
math instruction, none of which exist on Gen8+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agoi965/vec4: Don't return void from a void function.
Matt Turner [Mon, 23 Jun 2014 20:30:13 +0000 (13:30 -0700)]
i965/vec4: Don't return void from a void function.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agor600g/compute: Defer the creation of the temporary resource
Bruno Jiménez [Thu, 19 Jun 2014 18:20:02 +0000 (20:20 +0200)]
r600g/compute: Defer the creation of the temporary resource

For the first use of a buffer, we will only need the temporary
resource in the case that a user wants to write/map to this buffer.

But in the cases where the user creates a buffer to act as an
output of a kernel, then we were creating an unneeded resource,
because it will contain garbage, and would be copied to the pool,
and destroyed when promoting.

This patch avoids the creation and copies of resources in
this case.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
10 years agor600g/compute: Handle failures in compute_memory_pool_finalize
Jan Vesely [Thu, 19 Jun 2014 18:20:01 +0000 (20:20 +0200)]
r600g/compute: Handle failures in compute_memory_pool_finalize

Reviewed-by: Bruno Jiménez <brunojimen@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>