Marek Olšák [Mon, 27 Jan 2014 20:15:19 +0000 (21:15 +0100)]
mesa: add storage flags parameter to Driver.BufferData
It will be used by glBufferStorage. The parameters are chosen according
to ARB_buffer_storage.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 11:57:28 +0000 (12:57 +0100)]
mesa: remove unused driver hook BindBuffer
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Emil Velikov [Mon, 24 Feb 2014 16:46:19 +0000 (16:46 +0000)]
nv50: correctly calculate the number of vertical blocks during transfer map
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Dave Airlie [Fri, 7 Feb 2014 01:37:31 +0000 (11:37 +1000)]
st/mesa: add texture gather support. (v2)
This adds support for GL_ARB_texture_gather, and one step of
support for GL_ARB_gpu_shader5.
This adds support for passing the TG4 instruction, along
with non-constant texture offsets, and tracking them for the
optimisation passes.
This doesn't support native textureGatherOffsets hw, to do that
you'd need to add a CAP and if set disable the lowering pass,
and bump the MAX offsets to 4, then do the i0,j0 sampling using
those.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sat, 21 Sep 2013 08:45:43 +0000 (18:45 +1000)]
gallium: add texture gather support to gallium (v3)
This adds support to gallium for a TG4 instruction,
and two CAPs. The first CAP is required for GL_ARB_texture_gather.
The second CAP is required to expose GL_ARB_gpu_shader5.
However so far we haven't found any hardware that natively
exposes the textureGatherOffsets feature from GL, so just
lower it for now. If hardware appears for this we can add
another CAP to allow TG4 to take 4 offsets.
v2: add component selection src and a cap to say
hw can do it. (st can use to help control
GL_ARB_gpu_shader5/GLSL 4.00). Add docs.
v3: rename to SM5, add docs.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 10 Feb 2014 23:41:44 +0000 (09:41 +1000)]
glsl/i965: move lower_offset_array up to GLSL compiler level.
This lowering pass will be useful for gallium drivers as well, in order to support
the GL TG4 oddity that is textureGatherOffsets.
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Tom Stellard [Thu, 13 Feb 2014 22:46:25 +0000 (14:46 -0800)]
clover: Pass buffer offsets to the driver in set_global_binding() v3
The offsets will be stored in the handles parameter. This makes
it possible to use sub-buffers.
v2:
- Style fixes
- Add support for constant sub-buffers
- Store handles in device byte order
v3:
- Use endian helpers
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tom Stellard [Wed, 19 Feb 2014 22:19:53 +0000 (14:19 -0800)]
radeonsi: Use SI_BIG_ENDIAN now that it exists
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tom Stellard [Thu, 20 Feb 2014 15:51:24 +0000 (07:51 -0800)]
r600g: Use util_cpu_to_le32() instead of bswap32() on big-endian systems
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tom Stellard [Thu, 20 Feb 2014 17:03:53 +0000 (09:03 -0800)]
radeonsi: Use util_cpu_to_le32() instead of bswap32() on big-endian systems
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tom Stellard [Thu, 20 Feb 2014 15:46:28 +0000 (07:46 -0800)]
util: Add util_cpu_to_le* helpers
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tom Stellard [Wed, 19 Feb 2014 22:17:33 +0000 (14:17 -0800)]
util: Add util_bswap64() v3
v2:
- Use __builtin_bswap64()
- Remove unnecessary mask
- Add util_le64_to_cpu() helper
v3:
- Remove unnecessary AC_SUBST
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tom Stellard [Thu, 20 Feb 2014 15:31:16 +0000 (07:31 -0800)]
configure.ac: Use AX_GCC_BUILTIN to check availability of __builtin_bswap32 v2
v2:
- Remove unnecessary AC_SUBST
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Sun, 23 Feb 2014 20:29:57 +0000 (20:29 +0000)]
targets/opencl: resolve undefined symbols at link time
Current automake build does not try to resolve undefined
symbols thus we could end up with a broken library.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Emil Velikov [Mon, 24 Feb 2014 14:20:36 +0000 (14:20 +0000)]
gallium/targets: resolve undefined reference to pipe_loader_sw_probe_dri
With the introduction of the pipe_loader_sw_probe_dri helper we
require the sw/dri winsys during linking stage despite it being
unused by any of the targets. This will cause a minor increase
in the resulting library which will be cleaned up via linker
options with upcoming patches.
v2: Link with libswdri.la only when available.
Reported-and-tested-by: Tom Stellard <thomas.stellard@amd.com> (v1)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 22 Feb 2014 16:47:21 +0000 (16:47 +0000)]
configure: correctly report if we're building the sw/xlib winsys
While looking at bug 75356, I've noticed that the presence of
x11 egl platform pulls in sw/xlib as "needed" but fails to
report so at the end of configure.
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 22 Feb 2014 16:44:14 +0000 (16:44 +0000)]
pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIB
The above function implies using the the xlib winsys, which
has additional library dependencies that should not be forced.
Make the software xlib pipe loader optional thus avoid all
the dependency hell. A user that wishes to use the particular
pipe-loader would need to set the following within configure.ac.
enable_gallium_xlib_loader=yes
v2:
- Wrap sw/xlib/xlib_sw_winsys.h to handle compilation on systems
lacking X11 headers. Spotted by Christian Prochaska.
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 22 Feb 2014 16:20:04 +0000 (16:20 +0000)]
targets/gbm: exit gracefully if pipe_loader_drm_probe_fd is not available
When one builds without gallium_drm_loader, the above function will
not be available, thus we'll segfault in gallium_screen_create due
to memory access violation.
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75335
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Kenneth Graunke [Sat, 22 Feb 2014 03:15:51 +0000 (19:15 -0800)]
i965: Don't try to use the hardware blitter for multisampled miptrees.
The blitter is completely ignorant of MSAA buffer layouts, so any
attempt to use BLT paths with MSAA buffers is likely to break
spectacularly.
In most cases, BLORP handles MSAA blits, so we never hit this bug.
Until recently, it also wasn't worth fixing, since Meta couldn't handle
MSAA either, so there was nothing to fall back to. But now there is.
+143 piglit tests on Broadwell (which doesn't have BLORP support).
Surprisingly, three also start failing. Since non-IMS MSAA buffers
store samples in successive array slices, using the blitter ought to
access sample 0 and ignore the rest, which is apparently good enough for
a few not-very-picky Piglit tests. Presumably the meta replacement code
is still broken.
No Piglit changes on Ivybridge.
v2: Move the early return to the top of the function (suggested by
Paul).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Rob Clark [Sat, 22 Feb 2014 14:46:39 +0000 (09:46 -0500)]
freedreno/a3xx/compiler: half-precision output
Using generic shaders caused a measurable fps drop, which was isolated to
use of full precision (vs half precision) output. This is an attempt to
regain that lost performance by using half precision solid/blit shaders
(when the output format is not float32).
Note: for the built-in shaders, I would not expect them to be register
starved. And in fact it is the solid frag shader that seems to have the
biggest impact. So I suspect you get double the pixel pipe units (or
half the cycles) when the output is half precision. So there may be
some gain to using half precision output for application shaders as
well, even though the rest of register usage is still full precision.
But for half precision to work for more complex shaders, we need to deal
with some constraints, like cat2 needing same precision for it's two src
registers. So for now it is not enabled by default except for the
built-in shaders.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Sat, 22 Feb 2014 00:17:43 +0000 (19:17 -0500)]
freedreno/a3xx: add shader variants
Start putting in place infrastructure to deal with multiple shader
variants. Initially we'll use this for two sided color (frag) and
binning pass (vert) shaders. Possibly need for others later (such
as YUV vs RGB eglImage?).
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Fri, 21 Feb 2014 23:03:30 +0000 (18:03 -0500)]
freedreno/a3xx/compiler: collapse nop's with repeat
Easier than making more extensive use of rpt, and the more compact
shaders seem to bring some bit of performance boost. (Perhaps repeat
flag benefits are more than just instruction cache, possibly it saves
on instruction decode as well?)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Fri, 21 Feb 2014 19:36:11 +0000 (14:36 -0500)]
freedreno/a3xx: drop hand-coded blit/solid shaders
Instead in the common code, construct these shaders from TGSI. For now
we let a2xx keep it's hand coded shaders, as it's compiler isn't quite
up to the job yet. All the same it is a net drop in code size and gets
rid of special cases.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Sun, 23 Feb 2014 19:39:04 +0000 (14:39 -0500)]
freedreno/lowering: cleanup api
Make things configurable, and tweak the API a bit to avoid an extra
tgsi_shader_scan(). Getting closer to something generic which can be
moved out of freedreno and shaderd by other drivers.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Sun, 23 Feb 2014 19:29:59 +0000 (14:29 -0500)]
freedreno/a3xx: add float 16 and 32bit formats
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Sun, 23 Feb 2014 19:29:22 +0000 (14:29 -0500)]
freedreno: resync generated headers
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Emil Velikov [Wed, 12 Feb 2014 20:08:07 +0000 (20:08 +0000)]
glx/drisw: use the implemented version of __DRIswrastLoaderExtension
... over the one provided by the headers.
Explicitly set extension members to improve clarity.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 19:53:52 +0000 (19:53 +0000)]
glx/dri: use the implemented version of __DRIdamageExtension
... over the one provided by the headers.
Explicitly set extension members to improve clarity.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 19:50:53 +0000 (19:50 +0000)]
glx/dri_common: use the implemented version of __DRIsystemTimeExtension
... over the one provided by the headers.
Explicitly set extension members to improve clarity.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 19:45:41 +0000 (19:45 +0000)]
glx/dri: use the implemented version of __DRIgetDrawableInfoExtension
... over the one provided by the headers.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 18:51:49 +0000 (18:51 +0000)]
dri_util: use the implemented version of __DRIimageDriverExtension
... over the one provided by the headers.
Currently both versions are identical, but that is not
guaranteed to be the case in the future.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 18:46:32 +0000 (18:46 +0000)]
glx/dri3: set the implemented version of __DRIimageLoaderExtension
... over the one provided by the spec.
Currently both versions are identical, but that is not
guaranteed to be the case in the future.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 18:43:11 +0000 (18:43 +0000)]
gbm: explicitly set __DRIimageLoaderExtension members
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 18:32:59 +0000 (18:32 +0000)]
egl/wayland: explicitly set __DRIimageLoaderExtension members
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>y
Emil Velikov [Wed, 12 Feb 2014 18:21:46 +0000 (18:21 +0000)]
drivers/dri: explicitly set __DRI2flushExtension members
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>y
Emil Velikov [Wed, 12 Feb 2014 19:25:39 +0000 (19:25 +0000)]
gbm: explicitly set __DRIdri2LoaderExtension members
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>y
Emil Velikov [Wed, 12 Feb 2014 18:07:15 +0000 (18:07 +0000)]
glx/dri2: set the implemented version of __DRIdri2LoaderExtension
... over the version number provided by the headers.
Explicitly set extension members to improve clarity.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 19:05:08 +0000 (19:05 +0000)]
dri_interface: note introduction of __DRIdri2LoaderExtension members
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 19:00:21 +0000 (19:00 +0000)]
dri_interface: note introduction of various __DRItexBufferExtension members
Note the member function releaseTexBuffer was added without
bumping spec version, and currently no drivers implement it.
v2: releaseTexBuffer was introduced by version 3
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Tue, 18 Feb 2014 02:31:27 +0000 (02:31 +0000)]
dri_interface: Note the version introducing __DRIswrastLoaderExtensionRec::putImage2
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 17:17:28 +0000 (17:17 +0000)]
dri_util: explicitly set __DRIcopySubBufferExtension members
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Wed, 12 Feb 2014 17:08:43 +0000 (17:08 +0000)]
dri_util: explicitly set __DRIswrastExtension members.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Sun, 23 Feb 2014 06:08:55 +0000 (22:08 -0800)]
glsl: Pass stdout to _mesa_print_ir from st_glsl_to_tgsi.
Fixes the Gallium build since commit
1e3bd9f9a5af90295788c5d71ea27c.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75389
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Mon, 23 Dec 2013 08:56:20 +0000 (00:56 -0800)]
i965: Move the remaining driver debug over to stderr.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Mon, 23 Dec 2013 07:29:31 +0000 (23:29 -0800)]
i965: Move compiler debugging output to stderr.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Fri, 21 Feb 2014 02:00:23 +0000 (18:00 -0800)]
glsl: Add a file argument to the IR printer.
While we want to be able to print to stdout for glsl_compiler, for
debugging drivers we want to be able to dump to stderr because that's
where other driver debug (like LIBGL_DEBUG) tends to go, and because some
apps actually close stdout to shut up their own messages (such as the X
Server, or NWN).
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Fri, 21 Feb 2014 02:23:52 +0000 (18:23 -0800)]
i965: Refactor debug dumping of GLSL IR.
This was only going to get worse when tesselation shows up, and was
causing too much extra duplication in my stderr changes coming up.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 20 Feb 2014 22:49:50 +0000 (14:49 -0800)]
intel: Remove some dead code I noticed in intel_screen.c.
It was present in the initial i915tex import.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 20 Feb 2014 21:31:40 +0000 (13:31 -0800)]
i965: Use the object label when available for INTEL_DEBUG=vs,gs,fs output.
Note that this requires updated run.py in shader_db.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 20 Feb 2014 21:26:45 +0000 (13:26 -0800)]
i965: Use the object label when available for shader_time output.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 20 Feb 2014 21:22:12 +0000 (13:22 -0800)]
meta: Set some object labels on our meta shaders.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ilia Mirkin [Thu, 13 Feb 2014 10:10:23 +0000 (05:10 -0500)]
nv50: make sure to clear _all_ layers of all attachments
Unfortunately there's only one RT_ARRAY_MODE setting for all
attachments, so clears were previously truncated to the minimum number
of layers any attachment had. Instead set the RT_ARRAY_MODE to 512 (the
max number of layers) before doing the clear. This fixes
gl-3.2-layered-rendering-clear-color-mismatched-layer-count.
Also fix clears of individual layered rt/zeta, in case it ever happens.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Cc: 10.1 <mesa-stable@lists.freedesktop.org>
Chia-I Wu [Thu, 16 Jan 2014 07:29:03 +0000 (15:29 +0800)]
ilo: fix and enable fast depth clear
Use tex->bo_format instead of zs->format in ilo_blitter_rectlist_clear_zs()
because the latter may be combined depth/stencil format. hiz_can_clear_zs()
is no-op for GEN7+, but move the GEN check so that the assertions are tested.
Finally, call the fast depth clear function from ilo_clear().
Chia-I Wu [Thu, 20 Feb 2014 06:37:23 +0000 (14:37 +0800)]
ilo: add slice clear value
It is needed for 3DSTATE_CLEAR_PARAMS, and can also be used to track what
value the slice has been cleared to.
Chia-I Wu [Thu, 20 Feb 2014 05:51:03 +0000 (13:51 +0800)]
ilo: better readability and doc for texture flags
Improve comments for the flags, and explicitly separate their uses in slice
flags and resolve flags.
Chia-I Wu [Thu, 20 Feb 2014 08:57:05 +0000 (16:57 +0800)]
ilo: fix for stencil only rectlist ops
3DSTATE_STENCIL_BUFFER inherits some states from 3DSTATE_DEPTH_BUFFER. We
need to emit both even the surface is stencil only.
Chia-I Wu [Wed, 15 Jan 2014 18:10:45 +0000 (02:10 +0800)]
ilo: fix a false assertion failure on GEN6
Layer offsetting is possible when it is level 0, layer 0.
Chia-I Wu [Thu, 20 Feb 2014 08:59:24 +0000 (16:59 +0800)]
ilo: pipe_texture::usage is not a bitfield
It happens to work because PIPE_USAGE_STAGING is 0x100.
Chia-I Wu [Tue, 14 Jan 2014 15:35:43 +0000 (23:35 +0800)]
ilo: set ILO_TEXTURE_CPU_WRITE for imported textures
Assume the bo has been written by another process, which will trigger a HiZ
resolve.
Christoph Bumiller [Wed, 19 Feb 2014 03:00:34 +0000 (04:00 +0100)]
nv50/ir/ra: fix SpillCodeInserter::offsetSlot usage
We were turning non-memory spill slots into NULL.
Cc: 10.1 <mesa-stable@lists.freedesktop.org>
Matt Turner [Sat, 22 Feb 2014 07:52:24 +0000 (23:52 -0800)]
Revert "i965/fs: Make fs_reg's type an enum for better debugging."
This reverts commit
5ceadd29b0af835d741bcf09b9622c628e549ae6.
I rebased and apparently failed to build test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75355
Kenneth Graunke [Fri, 21 Feb 2014 23:23:42 +0000 (15:23 -0800)]
i965/fs: Drop the emit(fs_inst) overload.
Using this emit function implicitly creates three copies, which
is pointlessly inefficient.
1. Code creates the original instruction.
2. Calling emit(fs_inst) copies it into the function.
3. It then allocates a new fs_inst and copies it into that.
The second could be eliminated by changing the signature to
fs_inst(const fs_inst &)
but that wouldn't eliminate the third. Making callers heap allocate the
instruction and call emit(fs_inst *) allows us to just use the original
one, with no extra copies, and isn't much more of a burden.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 04:31:14 +0000 (20:31 -0800)]
i965/fs: Pass fs_regs by constant reference where possible.
These functions (modulo emit_lrp, necessitating the small fix-up) pass
these arguments by value unmodified to other functions. No point in
making an additional copy.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 16:19:19 +0000 (08:19 -0800)]
i965/fs: Move setting opcode = NOP to its one useful location.
All other callers of init() immediately set opcode to something else.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 03:49:46 +0000 (19:49 -0800)]
i965/fs: Use a bitfield for fs_inst's bool fields.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 01:22:55 +0000 (17:22 -0800)]
i965/fs: Reorder fs_inst's fields for better packing.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 01:12:57 +0000 (17:12 -0800)]
i965/fs: Reduce the sizes of some fs_inst members.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 02:53:00 +0000 (18:53 -0800)]
i965/fs: Reorder fs_reg for better packing.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 02:38:40 +0000 (18:38 -0800)]
i965/fs: Make fs_reg's type an enum for better debugging.
Since the enum is marked as packed, it'll still take only one byte.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 01:45:56 +0000 (17:45 -0800)]
i965/fs: Reduce the sizes of some fs_reg members.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 02:37:11 +0000 (18:37 -0800)]
i965: Mark brw_reg_type and register_file enums as PACKED.
The C99 spec says the type of an enum is implementation defined (but can
be char, signed int, or unsigned int). gcc appears to always give enums
four bytes, even when they can fit in less. It does so because this is
what other compilers seem to do [0] and therefore to maintain ABI
compatibility with them.
gcc has an -fshort-enum flag that tells the compiler to use only as much
space as needed for an enum. Adding __attribute__((__packed__)) to an
enum definition has the same behavior, but on a per-enum basis.
brw_reg_type and register_file are not part of the ABI, so we can safely
mark them as PACKED so that they'll take only a byte, rather than four.
[0] http://gcc.gnu.org/onlinedocs/gcc/Non-bugs.html#index-fshort-enums-3868
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Thu, 20 Feb 2014 01:21:16 +0000 (17:21 -0800)]
i965: Reduce predicate field of backend_instruction to uint8_t.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Vinson Lee [Sat, 22 Feb 2014 03:53:29 +0000 (19:53 -0800)]
libgl-xlib: Fix xlib_sw_winsys.h include path.
This patch fixes this SCons build error introduced with commit
4f37e52f374b8b1d7177634dc09ab71e30e1779d.
Compiling src/gallium/targets/libgl-xlib/xlib.c ...
src/gallium/targets/libgl-xlib/xlib.c:35:42: fatal error: state_tracker/xlib_sw_winsys.h: No such file or directory
#include "state_tracker/xlib_sw_winsys.h"
^
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75347
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Vinson Lee [Sat, 22 Feb 2014 03:37:31 +0000 (19:37 -0800)]
mesa: Move declarations before code.
This patch fixes these MSVC build errors.
Compiling src\mesa\drivers\common\meta_blit.c ...
meta_blit.c
src\mesa\drivers\common\meta_blit.c(255) : error C2143: syntax error : missing ';' before 'type'
src\mesa\drivers\common\meta_blit.c(255) : error C2143: syntax error : missing ')' before 'type'
src\mesa\drivers\common\meta_blit.c(255) : error C2065: 'i' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(255) : warning C4552: '<' : operator has no effect; expected operator with side-effect
src\mesa\drivers\common\meta_blit.c(255) : error C2059: syntax error : ')'
src\mesa\drivers\common\meta_blit.c(255) : error C2143: syntax error : missing ';' before '{'
src\mesa\drivers\common\meta_blit.c(258) : error C2065: 'i' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(263) : error C2143: syntax error : missing ';' before 'type'
src\mesa\drivers\common\meta_blit.c(263) : error C2143: syntax error : missing ')' before 'type'
src\mesa\drivers\common\meta_blit.c(263) : error C2065: 'step' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(263) : warning C4552: '<=' : operator has no effect; expected operator with side-effect
src\mesa\drivers\common\meta_blit.c(263) : error C2059: syntax error : ')'
src\mesa\drivers\common\meta_blit.c(263) : error C2143: syntax error : missing ';' before '{'
src\mesa\drivers\common\meta_blit.c(264) : error C2143: syntax error : missing ';' before 'type'
src\mesa\drivers\common\meta_blit.c(264) : error C2143: syntax error : missing ')' before 'type'
src\mesa\drivers\common\meta_blit.c(264) : error C2065: 'i' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(264) : warning C4552: '<' : operator has no effect; expected operator with side-effect
src\mesa\drivers\common\meta_blit.c(264) : error C2059: syntax error : ')'
src\mesa\drivers\common\meta_blit.c(264) : error C2065: 'step' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(264) : error C2143: syntax error : missing ';' before '{'
src\mesa\drivers\common\meta_blit.c(268) : error C2065: 'step' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(268) : error C2065: 'i' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(269) : error C2065: 'step' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(269) : error C2065: 'i' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(270) : error C2065: 'step' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(270) : error C2065: 'i' : undeclared identifier
src\mesa\drivers\common\meta_blit.c(559) : warning C4244: 'function' : conversion from 'const GLint' to 'GLfloat', possible loss of data
src\mesa\drivers\common\meta_blit.c(723) : warning C4244: 'function' : conversion from 'const GLint' to 'GLfloat', possible loss of data
src\mesa\drivers\common\meta_blit.c(773) : warning C4244: 'function' : conversion from 'const GLint' to 'GLfloat', possible loss of data
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Emil Velikov [Mon, 10 Feb 2014 21:04:40 +0000 (21:04 +0000)]
pipe-loader: introduce pipe_loader_sw_probe_null helper function
v2: Handle null_sw_create failure, add missing function return type
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
Emil Velikov [Sat, 22 Feb 2014 03:21:40 +0000 (03:21 +0000)]
pipe-loader: introduce pipe_loader_sw_probe_dri helper
Will be used in the following commits.
v2: Link gallium tests against the library.
v3: Handle dri_create_sw_winsys failure
v4: Rebase on top of the targets/xa changes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v2)
Emil Velikov [Mon, 10 Feb 2014 20:19:20 +0000 (20:19 +0000)]
pipe-loader: introduce pipe_loader_sw_probe_xlib helper
Will be used in the upcoming patches.
v2: handle xlib_create_sw_winsys failure, drop unneeded header
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
Emil Velikov [Sat, 22 Feb 2014 03:15:42 +0000 (03:15 +0000)]
pipe-loader: use bool type for pipe_loader_drm_probe_fd()
v2: Rebase on top of the rendernode changes.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
Reviewed-by: Francisco Jerez <currojerez@riseup.net> (v1)
Emil Velikov [Thu, 13 Feb 2014 15:24:16 +0000 (15:24 +0000)]
winsys/xlib: move xlib_create_sw_winsys within the winsys
v2: Rebase on top of vl_winsys_xsp.c removal
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
Emil Velikov [Mon, 10 Feb 2014 20:08:31 +0000 (20:08 +0000)]
pipe-loader: handle memory allocation failure
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Mon, 10 Feb 2014 18:45:32 +0000 (18:45 +0000)]
pipe-loader: build pipe_loader_drm_x_auth whenever HAVE_PIPE_LOADER_XCB is defined
Currently HAVE_PIPE_LOADER_XCB is defined, rather than being set to 1/0.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Emil Velikov [Mon, 10 Feb 2014 20:03:19 +0000 (20:03 +0000)]
pipe-loader: destroy sw_winsys on sw_release
The sw pipe-loader implicitly handles winsys_create, thus we
it would make sense to implicitly destroy it upon releasing
the loader.
Currently we leak the sw_winsys when releasing the pipe-loader.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Emil Velikov [Mon, 10 Feb 2014 18:29:43 +0000 (18:29 +0000)]
vl/winsys_dri: cleanup vl_screen_create error path
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Emil Velikov [Mon, 10 Feb 2014 19:12:12 +0000 (19:12 +0000)]
targets/pipe-loader: link pipe-nouveau against libdrm
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Kenneth Graunke [Sat, 22 Feb 2014 00:58:09 +0000 (16:58 -0800)]
meta: Eliminate samplers[] array in favor of using vec4_prefix.
We don't need an array mapping the shader index to "sampler2DMS",
"isampler2DMS", and so on. We can simply do "%ssampler2DMS" and pass in
vec4_prefix, which is "", "i", or "u".
This eliminates the use of C99 array initializers and should fix the
MSVC build.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75344
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Fri, 21 Feb 2014 21:47:29 +0000 (13:47 -0800)]
i965: Delete the fabulous target_to_target() function.
gl_texture_object's Target field is never a cube face enumeration, so
target_to_target is just the identity function. Aptly named, at least.
I verified this by putting an assert(!"ZOMG, CUBES!") in the cube face
case, and running Piglit. Nothing ever hit it. Beyond that, I
inspected the code in mesa/main.
This could probably also be deleted from i915, but I haven't tested
there.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Fri, 21 Feb 2014 07:08:22 +0000 (23:08 -0800)]
i965: Fix S8 and X8 reversal in brw_depthbuffer_format refactor.
In commit
09d9a8913e8c28fc4c1c60d7da85a2f093786894, I accidentally
botched the X8 and S8 cases. (I wrote this patch before realizing that
X8 and S8 had been swapped in the big MESA_FORMAT rename, and apparently
didn't rebase it properly after fixing that...)
Fixes regressions in 13 Piglit tests on Ironlake.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75291
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Vinson Lee [Sat, 22 Feb 2014 03:09:30 +0000 (19:09 -0800)]
mesa: Move declarations before code.
This patch fixes these MSVC build errors introduced with
73b78f9c9f86dd38fb165f4730aeac9519635b07.
Compiling src\mesa\main\uniforms.c ...
uniforms.c
src\mesa\main\uniforms.c(291) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(294) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(294) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(294) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(306) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(309) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(309) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(309) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(322) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(325) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(325) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(325) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(345) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(348) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(348) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(348) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(360) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(363) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(363) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(363) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(376) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(379) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(379) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(379) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(588) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(591) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(591) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(591) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(603) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(606) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(606) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(606) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
src\mesa\main\uniforms.c(619) : error C2143: syntax error : missing ';' before 'type'
src\mesa\main\uniforms.c(622) : error C2065: 'shProg' : undeclared identifier
src\mesa\main\uniforms.c(622) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int'
src\mesa\main\uniforms.c(622) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Vinson Lee [Sat, 22 Feb 2014 01:16:14 +0000 (17:16 -0800)]
mesa/sso: Change CreateShaderProgramv return type from uint to GLuint.
This patch fixes this MinGW build error.
Compiling src/mapi/glapi/glapi_dispatch.c ...
In file included from src/mapi/glapi/glapi_dispatch.c:41:0:
build/windows-x86_64-debug/mapi/glapi/glapitable.h:930:4: error: expected specifier-qualifier-list before 'uint'
uint (GLAPIENTRYP CreateShaderProgramv)(GLenum type, GLsizei count, const GLchar * const * strings); /* 886 */
^
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Vinson Lee [Sat, 22 Feb 2014 00:58:17 +0000 (16:58 -0800)]
scons: Add main/pipelineobj.c to src/mesa/SConscript.
This patch fixes this SCons build error.
build/linux-x86_64-debug/mesa/libmesa.a(context.os): In function `init_attrib_groups':
src/mesa/main/context.c:815: undefined reference to `_mesa_init_pipeline'
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Vinson Lee [Sat, 22 Feb 2014 00:38:45 +0000 (16:38 -0800)]
mesa/sso: Fix typo of 'unsigned'.
Fix build error introduced with commit
f4c13a890fa24ff1f998e7cac0ecc31505a29403.
CC pixeltransfer.lo
main/pipelineobj.c: In function '_mesa_delete_pipeline_object':
main/pipelineobj.c:59:4: error: unknown type name 'unsinged'
unsinged i;
^
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Gregory Hainaut [Fri, 28 Jun 2013 21:20:11 +0000 (14:20 -0700)]
mesa/sso: Implement _mesa_GetProgramPipelineiv
This was originally included in another patch, but it was split out by
Ian Romanick.
v2 (idr):
* Trivial reformatting.
* Remove GL_COMPUTE_SHADER. Compute shaders don't participate in pipeline
objects anyway. Suggested by Matt Turner.
v3 (idr):
* Use _mesa_has_geometry_shaders.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Gregory Hainaut [Fri, 28 Jun 2013 21:19:12 +0000 (14:19 -0700)]
mesa/sso: Implement _mesa_ActiveShaderProgram
This was originally included in another patch, but it was split out by
Ian Romanick.
v2 (idr): Return early from _mesa_ActiveShaderProgram if
_mesa_lookup_shader_program_err returns an error. Suggested by Jordan.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> [v2]
Gregory Hainaut [Fri, 28 Jun 2013 21:13:49 +0000 (14:13 -0700)]
mesa/sso: Implement _mesa_CreateShaderProgramv
This was originally included in another patch, but it was split out by
Ian Romanick.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Gregory Hainaut [Fri, 28 Jun 2013 21:11:38 +0000 (14:11 -0700)]
mesa/sso: Refactor implementation of _mesa_CreateShaderProgramEXT
This will allow the guts of the implementation to be shared with
_mesa_CreateShaderProgramv.
This was originally included in another patch, but it was split out by
Ian Romanick.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Gregory Hainaut [Fri, 28 Jun 2013 21:05:49 +0000 (14:05 -0700)]
mesa/sso: Add support for GL_PROGRAM_SEPARABLE query
This was originally included in another patch, but it was split out by
Ian Romanick.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Gregory Hainaut [Fri, 28 Jun 2013 21:01:18 +0000 (14:01 -0700)]
mesa/sso: Implement _mesa_IsProgramPipeline
Implement IsProgramPipeline based on the VAO code.
This was originally included in another patch, but it was split out by
Ian Romanick.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Gregory Hainaut [Fri, 28 Jun 2013 21:00:13 +0000 (14:00 -0700)]
mesa/sso: Implement _mesa_GenProgramPipelines
Implement GenProgramPipelines based on the VAO code.
This was originally included in another patch, but it was split out by
Ian Romanick.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Gregory Hainaut [Fri, 28 Jun 2013 20:57:50 +0000 (13:57 -0700)]
mesa/sso: Implement _mesa_DeleteProgramPipelines
Implement DeleteProgramPipelines based on the VAO code.
This was originally included in another patch, but it was split out by
Ian Romanick.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Gregory Hainaut [Fri, 28 Jun 2013 20:54:06 +0000 (13:54 -0700)]
mesa/sso: Add pipeline container/state
V1:
* Extend gl_shader_state as pipeline object state
* Add a new container gl_pipeline_shader_state that contains
binding point of the previous object
* Update mesa init/free shader state due to the extension of
the attibute
* Add an init/free pipeline function for the context
V2:
* Rename gl_shader_state to gl_pipeline_object
* Rename Pipeline.PipelineObj to Pipeline.Current
* Formatting improvement
V3 (idr):
* Split out from previous uber patch.
* Remove '#if 0' debug printfs.
V4 (idr):
* Fix some errors in comments. Suggested by Jordan.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>