Vinson Lee [Tue, 25 Feb 2014 20:18:41 +0000 (12:18 -0800)]
mesa: Add GL_ARB_buffer_storage to dispatch_sanity.cpp.
Fixes 'make check' failure introduced with commit
119ffa7307d62e7310ce3902fded662ee4021c92.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75503
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Timothy Arceri [Tue, 25 Feb 2014 21:46:08 +0000 (08:46 +1100)]
Revert "Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa"
This reverts commit
1b79582f322d4a89dd6d197c8d4962c788ae7f25, reversing
changes made to
376a98d345dfc3da8d5b0f1e489196f861c4e754.
Timothy Arceri [Tue, 25 Feb 2014 21:39:32 +0000 (08:39 +1100)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa
ry,
Tom Stellard [Tue, 25 Feb 2014 21:32:37 +0000 (13:32 -0800)]
clover: Fix build with LLVM 3.5
Timothy Arceri [Tue, 25 Feb 2014 21:31:25 +0000 (08:31 +1100)]
glsl: removed unused dimension_count varible
This variable is no longer needed after the cleanup to the
code prior to the first arrays of array series
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ilia Mirkin [Mon, 24 Feb 2014 17:43:17 +0000 (12:43 -0500)]
build: llvm libs may not be in system search path, add rpath
On my gentoo system, llvm libs are in /usr/lib64/llvm, and llvm-config
--ldflags does not provide the rpath (it does, of course, provide a -L).
This adds the llvm dir to the rpath. It should be harmless if the path
is a system path, and should make things work when it's not.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Eric Anholt [Tue, 25 Feb 2014 19:35:49 +0000 (11:35 -0800)]
i965: Fix segfaults since the buffer_storage changes.
Ilia Mirkin [Tue, 25 Feb 2014 19:41:15 +0000 (14:41 -0500)]
docs: update nv50 support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Thu, 20 Feb 2014 02:29:40 +0000 (21:29 -0500)]
nv50: enable txg where supported
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Fri, 7 Feb 2014 22:42:58 +0000 (17:42 -0500)]
nv50: enable cube map array texture support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Brian Paul [Tue, 25 Feb 2014 16:56:49 +0000 (09:56 -0700)]
libgl-xlib: add -Isrc/gallium/winsys flag
So that sw/xlib/xlib_sw_winsys.h can be found. Fixes a build break.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Brian Paul [Tue, 25 Feb 2014 16:53:49 +0000 (09:53 -0700)]
st/mesa: add comment to explain _min(), _maxf(), etc. functions
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Sun, 9 Feb 2014 22:25:06 +0000 (23:25 +0100)]
r600g,radeonsi: consolidate create_surface and surface_destroy
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Tue, 11 Feb 2014 02:02:35 +0000 (03:02 +0100)]
radeonsi: inline util_blitter_copy_texture
This will be used for changing texture properties without modifying
pipe_resource like r600g, but not in this series. For now, this change
allows consolidation of pipe_surface functions.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Tue, 11 Feb 2014 00:50:03 +0000 (01:50 +0100)]
radeonsi: remove useless psbox variable from resource_copy_region
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sun, 9 Feb 2014 22:05:13 +0000 (23:05 +0100)]
radeonsi: compute depth surface registers only once
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sun, 9 Feb 2014 21:16:48 +0000 (22:16 +0100)]
radeonsi: compute color surface registers only once
Same as r600g.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sun, 9 Feb 2014 18:34:59 +0000 (19:34 +0100)]
r600g: remove r600_resource.h
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sun, 9 Feb 2014 18:30:09 +0000 (19:30 +0100)]
r600g: remove r600_surface::htile_enabled
v2: use one of the htile registers instead
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sun, 9 Feb 2014 18:25:45 +0000 (19:25 +0100)]
r600g: use r600_surface::db_z_info
db_z_info was unused. This just renames the variable to match the register
name.
Now, db_depth_info is unused on Evergreen.
Both variables will be needed on SI though.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sun, 9 Feb 2014 18:23:58 +0000 (19:23 +0100)]
r600g,radeonsi: share r600_surface
I'm gonna use this in radeonsi.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sun, 9 Feb 2014 16:42:00 +0000 (17:42 +0100)]
radeonsi: move PA_SU_POLY_OFFSET_DB_FMT_CNTL to framebuffer state
It doesn't depend on anything else.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Thu, 6 Feb 2014 18:24:23 +0000 (19:24 +0100)]
mesa: allow buffers to be mapped multiple times
OpenGL allows a buffer to be mapped only once, but we also map buffers
internally, e.g. in the software primitive restart fallback, for PBOs,
vbo_get_minmax_index, etc. This has always been a problem, but it will
be a bigger problem with persistent buffer mappings, which will prevent
all Mesa functions from mapping buffers for internal purposes.
This adds a driver interface to core Mesa which supports multiple buffer
mappings and allows 2 mappings: one for the GL user and one for Mesa.
Note that Gallium supports an unlimited number of buffer and texture
mappings, so it's not really an issue for Gallium.
v2: fix unmapping in xm_dd.c, remove the GL errors there
v3: fix the intel driver (by Fredrik)
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Wed, 29 Jan 2014 02:20:32 +0000 (03:20 +0100)]
docs: update ARB_buffer_storage status
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 23:53:28 +0000 (00:53 +0100)]
gallium/upload_mgr: remove useless variable "size"
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 21:28:56 +0000 (22:28 +0100)]
gallium/upload_mgr: don't unmap buffers if persistent mappings are supported
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 20:57:42 +0000 (21:57 +0100)]
gallium: the other drivers don't support ARB_buffer_storage
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 20:46:21 +0000 (21:46 +0100)]
r300g,r600g,radeonsi: add support for ARB_buffer_storage
All GTT memory mappings are coherent and therefore can be persistent.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 20:45:54 +0000 (21:45 +0100)]
st/mesa: implement ARB_buffer_storage
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 20:42:07 +0000 (21:42 +0100)]
gallium: add interface for persistent and coherent buffer mappings
Required for ARB_buffer_storage.
Marek Olšák [Mon, 27 Jan 2014 20:36:53 +0000 (21:36 +0100)]
mesa: allow buffers mapped with the persistent flag to be used by the GPU
v2: also fixed InvalidateBufferData, added citations from the 4.4 spec
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 20:31:58 +0000 (21:31 +0100)]
mesa: add error checks to glMapBufferRange, glMapBuffer for ARB_buffer_storage
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 11:56:11 +0000 (12:56 +0100)]
glapi: add ARB_buffer_storage
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Marek Olšák [Mon, 27 Jan 2014 20:22:43 +0000 (21:22 +0100)]
mesa: implement glBufferStorage, immutable buffers; add extension enable flag
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
v2: dropped the error that DYNAMIC_STORAGE is required for MAP_WRITE_BIT,
the error is removed in the latest revision of GL 4.4
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>