Paul Berry [Wed, 13 Nov 2013 01:51:15 +0000 (17:51 -0800)]
i965/gen7: Disallow Y tiling of renderable surfaces with valign of 2.
Gen7 does not allow render targets to have a vertical alignment of 2.
So, when creating a surface, if its format is renderable, and its
vertical alignment is 2, force it to use X tiling.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 13 Nov 2013 01:16:25 +0000 (17:16 -0800)]
i965/gen7: Prefer vertical alignment of 4 when possible.
Gen6+ allows for color buffers to use a vertical alignment of either 4
or 2. Previously we defaulted to 2. This may have caused problems on
Gen7 because Y-tiled render targets are not allowed to use a vertical
alignment of 2.
This patch changes the vertical alignment to 4 on Gen7, except for the
few formats where a vertical alignment of 2 is required.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Paul Berry [Wed, 6 Nov 2013 05:44:13 +0000 (21:44 -0800)]
i965/vec4: Fix broken IR annotation in debug output.
Commit
70953b5 (i965: Initialize all member variables of
vec4_instruction on construction) inadvertently added a line to the
vec4_instruction constructor setting this->ir to NULL, wiping out the
previously set value. As a result, ever since then, the output of
INTEL_DEBUG=vs and INTEL_DEBUG=gs has been missing IR annotations.
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Tue, 19 Nov 2013 15:54:17 +0000 (07:54 -0800)]
svga: improve check for 3D compressed textures
This is basically a a respin of
f1dfcf4bce35e6796f873d9a00103b280da81e4c
per Jose's suggestion.
Just set the SVGA3dSurfaceFormatCaps flags for 3D and cube textures
when checking the texture format capabilities. This will filter out
unsupported combinations like 3D+DXT.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jon TURNEY [Tue, 12 Nov 2013 22:54:35 +0000 (22:54 +0000)]
glx/tests: Provide __glXGetCurrentContext() stub when needed
Refine
8c533022. Provide a stub __glXGetCurrentContext() function when
$(DEFINES) are such that it is not a macro.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Brian Paul [Mon, 18 Nov 2013 22:50:33 +0000 (14:50 -0800)]
svga: we don't supported 3D compressed textures
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Brian Paul [Mon, 18 Nov 2013 22:51:43 +0000 (14:51 -0800)]
st/mesa: pass correct pipe_texture_target to st_choose_format()
We were always passing PIPE_TEXTURE_2D, but not all formats are
supported for all types of textures. In particular, the driver may
not supported texture compression for all types of textures.
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Tom Stellard [Thu, 14 Nov 2013 15:28:09 +0000 (07:28 -0800)]
r600g/compute: Fix handling of global buffers in r600_resource_copy_region()
Global buffers do not have an associate cs_buf handle, so
we can't copy them using r600_copy_buffer()
https://bugs.freedesktop.org/show_bug.cgi?id=64226
Reviewed-by: Marek Ol????k <marek.olsak@amd.com>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Tue, 12 Nov 2013 19:29:21 +0000 (11:29 -0800)]
gallium: Pass version scripts to linker using --version-script=
This fixes build failures with the gold linker.
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Fri, 15 Nov 2013 23:50:34 +0000 (15:50 -0800)]
clover: Optionally return context's devices from clGetProgramInfo()
The spec allows clGetProgramInfo() to return information about either
the devices associated with the program or the devices associated
with the context. If there are no devices associated with the program,
then we return devices associated with the context.
https://bugs.freedesktop.org/show_bug.cgi?id=52171
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Paul Berry [Tue, 5 Nov 2013 04:06:48 +0000 (20:06 -0800)]
i965/gen7: Emit workaround flush when changing GS enable state.
v2: Don't go to extra work to avoid extraneous flushes. (Previous
experiments in the kernel have suggested that flushing the pipeline
when it is already empty is extremely cheap).
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Mon, 18 Nov 2013 16:14:48 +0000 (09:14 -0700)]
osmesa: add missing comma
Brian Paul [Sat, 16 Nov 2013 20:55:50 +0000 (13:55 -0700)]
osmesa: add support for postprocess filters
Add new OSMesaPostprocess() function to allow using the gallium
postprocessing filters. This only works for OSMesa with gallium
drivers, not the legacy swrast OSMesa.
Bump OSMESA_MAJOR/MINOR_VERSION numbers to 10.0
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Sat, 16 Nov 2013 20:55:50 +0000 (13:55 -0700)]
postprocess: document the pp_init() function.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Sat, 16 Nov 2013 20:55:50 +0000 (13:55 -0700)]
postprocess: move #defines to filters.h
They're not needed in postprocess.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Sat, 16 Nov 2013 20:55:50 +0000 (13:55 -0700)]
postprocess: refactor header files, etc
Move private data structures and function prototypes out of the
public postprocess.h header file.
Create a pp_private.h for the shared, private data structures, functions.
Remove pp_program.h header.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Sat, 16 Nov 2013 20:55:44 +0000 (13:55 -0700)]
postprocess: rename program to pp_program
To match the pp_ namespace convention.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Sat, 16 Nov 2013 20:55:40 +0000 (13:55 -0700)]
postprocess: simplify pp_free() code
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Emil Velikov [Sat, 16 Nov 2013 22:59:29 +0000 (22:59 +0000)]
docs: indicate GLX_MESA_query_renderer's completion
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 16 Nov 2013 22:26:09 +0000 (22:26 +0000)]
docs: update nv50, nvc0 current status
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Joerg Mayer [Sat, 16 Nov 2013 22:13:03 +0000 (22:13 +0000)]
docs: restructure GL3.txt
- Indent items under a GL version to allow context diffs to do their work.
- Move complete drivers into the GL version line - this should make the
stuff a little bit easier to read.
v2: keep the fd.o link (Emil Velikov)
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Joerg Mayer <jmayer@loplof.de>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 16 Nov 2013 21:53:04 +0000 (21:53 +0000)]
docs: add a note about removed state tracker/targets
The X.Org state tracker is gone, as well as the xvmc/vdpau
r300 and softpipe targets.
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 16 Nov 2013 21:29:07 +0000 (21:29 +0000)]
targets/xvmc: export only necessary symbols
Export only XvMC* symbols for the xvmc targets.
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 16 Nov 2013 18:37:52 +0000 (18:37 +0000)]
drivers/radeon: remove unused CXXFLAGS, LLVM_CPP_FILES
The above two variables are unused as of commit
commit
024fe6852a76f33d7e2afc5621340e387c381bb0
Author: Tom Stellard <thomas.stellard@amd.com>
Date: Tue Apr 2 10:42:50 2013 -0700
radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA v2
which removed the only cpp file from drivers/radeon, but missed to
remove the CXXFLAGS. The sequential commit reintroduced and empty
LLVM_CPP_FILES.
Lets cleanup and remove both.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
José Fonseca [Mon, 18 Nov 2013 14:43:31 +0000 (14:43 +0000)]
mesa/main: Move declaration to beginning of scope.
Should fix MSVC build.
Trivial.
Courtney Goeltzenleuchter [Tue, 5 Nov 2013 21:25:06 +0000 (14:25 -0700)]
mesa: Add API debug logging to TexStorage
Give glTexStorage* equivalent debug logging to glTexImage*.
Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tapani Pälli [Fri, 1 Nov 2013 10:22:01 +0000 (12:22 +0200)]
glsl: cleanup, remove duplicate assignment
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Thu, 14 Nov 2013 01:15:23 +0000 (17:15 -0800)]
mesa: Handle !m->Ended for performance monitor result availability.
If a performance monitor has never ended, then no result can be
available. Core Mesa can easily handle this, saving drivers a tiny bit
of complexity.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Thu, 14 Nov 2013 01:12:37 +0000 (17:12 -0800)]
mesa: Track whether a performance monitor has ever ended.
If a monitor has ended, it means a result should eventually become
available, pending some flushing.
This is distinct from !m->Active; if a monitor has not been started,
then m->Active == false and m->Ended == false.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Thu, 14 Nov 2013 01:08:32 +0000 (17:08 -0800)]
mesa: Also initialize gl_performance_monitor::Active.
The i965 implementation uses calloc, so I missed this. It's best to
simply initialize it to avoid requiring a zeroing allocator, though.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Thu, 31 Oct 2013 06:12:36 +0000 (23:12 -0700)]
mesa: Store the performance monitor object's name.
Being able to print monitor->Name is really useful for debugging.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Chris Forbes [Sun, 17 Nov 2013 06:38:07 +0000 (19:38 +1300)]
mesa: bump version to 10.1 (devel)
Now that branch 10.0 is created, bump the minor version in
master.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Forbes [Sun, 17 Nov 2013 01:57:51 +0000 (14:57 +1300)]
i965: Fix broken asserts
These would never fire.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Forbes [Sun, 17 Nov 2013 01:57:51 +0000 (14:57 +1300)]
st/vega: Fix broken assert
This would never fire.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Forbes [Sun, 17 Nov 2013 01:57:51 +0000 (14:57 +1300)]
r600/sb: Fix broken assert
This would never fire.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Vadim Girlin [Fri, 15 Nov 2013 17:24:53 +0000 (18:24 +0100)]
r600g/sb: work around hw issues with stack on eg/cm
v2: make it actually work, improve condition
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68503
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Kenneth Graunke [Tue, 15 Jan 2013 05:26:28 +0000 (21:26 -0800)]
i965: Make swizzle_to_scs non-static.
We'll need this for Broadwell code as well.
Normally, when we make things public, we add the "brw" prefix. I'm not
crazy about that in this case, since it deals with prog_instruction.h's
SWIZZLE_XYZW values, rather than the BRW_SWIZZLE_XYZW enums. However,
I can't think of a better name, and at least the comments and code make
it clear.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
Kenneth Graunke [Fri, 1 Nov 2013 19:50:16 +0000 (12:50 -0700)]
i965: Move enum brw_urb_write_flags from brw_eu.h to brw_defines.h.
Broadwell code should not include brw_eu.h (since it is for Gen4-7
assembly encoding), but needs the URB write flags enum.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
Kenneth Graunke [Tue, 1 Jan 2013 23:09:26 +0000 (15:09 -0800)]
i965/fs: Remove force_sechalf stack
Only Gen4 color write setup uses the force_sechalf flag, and it only
sets it on a single instruction. It also already has to get a pointer
to the instruction and manually set the saturate flag, so we may as well
just set force_sechalf the same way and avoid the complexity of a stack.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 23:00:14 +0000 (23:00 +0000)]
targets/dri: move linker flags out of configure into Automake.inc
Previous assumption was that the same set of flags can be reused
for both classic and gallium drivers. With megadriver work done
the classic drivers ended up using their own (single) instance of
the flags.
Move these into Automake.inc and rename to indicate that those
are gallium specific. Additionally silence an automake/autoconf
warning "XXX is not a standard libtool library name", due to
the parsing issues of the module tag.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 2 Nov 2013 15:33:07 +0000 (15:33 +0000)]
targets/dri: compact compiler flags into Automake.inc
Greatly reduce duplication and provide a sane minimum of
CFLAGS for all DRI targets.
Note: This commit adds VISIBILITY_CFLAGS to the following:
* freedreno
* i915
* ilo
* nouveau
* vmwgfx
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:56:33 +0000 (22:56 +0000)]
targets/xvmc: do not link against libtrace.la
In order to use the trace driver, one needs to define
GALLIUM_TRACE. Neither one of the two targets was
defining it, thus we're safe to remove libtrace.la.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:55:59 +0000 (22:55 +0000)]
targets/xvmc: consolidate lib deps into Automake.inc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:54:58 +0000 (22:54 +0000)]
targets/xvmc: move linker flags to Automake.inc
Minimise duplication and sources of error
(eg nouveau was missing shared and no-undefined)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:53:15 +0000 (22:53 +0000)]
targets/xvmc: use drop duplicated compiler flags
Automake.inc already has GALLIUM_VIDEO_CFLAGS, which
provide the essential compiler flags needed.
Note: this commit adds VISIBILITY_CFLAGS to nouveau.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 2 Nov 2013 02:02:47 +0000 (02:02 +0000)]
gallium/winsys: compact compiler flags into Automake.inc
Cleanup the duplicating flags and consolidate into a sigle variable.
Note: this patch adds VISIBILITY_CFLAGS to the following targets
* freedreno/drm
* i915/{drm,sw}
* nouveau/drm
* sw/fbdev
* sw/null
* sw/wayland
* sw/wrapper
* sw/xlib
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:51:56 +0000 (22:51 +0000)]
targets/vdpau: drop unused libraries from linker
In order for one to use trace, noop, rbug and/or galahad, they must
set the corresponding GALLIUM_* CFLAG.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:51:19 +0000 (22:51 +0000)]
targets/vdpau: consolidate lib deps into Automake.inc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:50:47 +0000 (22:50 +0000)]
targets/vdpau: move linker flags to Automake.inc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:48:44 +0000 (22:48 +0000)]
targets/vdpau: compact compiler flags into Automake.inc
Store the compiler flags into a variable, in order to minimise
flags duplication (amongst vdpau and xvmc).
Note: this commit add VISIBILITY_CFLAGS to the nouveau target
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Fri, 1 Nov 2013 18:58:27 +0000 (18:58 +0000)]
gallium/drivers: compact compiler flags into Automake.inc
* minimise flags duplication
* distingush between VISIBILITY C and CXX flags
* set only required flags - C and/or CXX
v2: add LLVM_CFLAGS back to AM_CFLAGS (add missing backslash)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:46:20 +0000 (22:46 +0000)]
targets/radeonsi: move drm_target.c to a common folder
... and symlink to each target.
Make automake's subdir-objects work for radeonsi.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:42:44 +0000 (22:42 +0000)]
targets/r600: move drm_target.c to common folder
... and symlink for each target.
Make automake's subdir-objects work for r600.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 9 Nov 2013 22:30:20 +0000 (22:30 +0000)]
targets/r300: move drm_target.c to common folder
... and symlink for each target.
Make automake's subdir-objects work for r300.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 26 Oct 2013 16:48:22 +0000 (17:48 +0100)]
gallium/drivers: enable automake subdir-objects
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 26 Oct 2013 16:46:17 +0000 (17:46 +0100)]
r300: move the final sources list to Makefile.sources
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 26 Oct 2013 17:11:36 +0000 (18:11 +0100)]
r300: add symlink to ralloc.c and register_allocate.c
Make automake's subdir-objects work.
Update includes.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Fri, 4 Oct 2013 12:06:37 +0000 (13:06 +0100)]
st/xvmc: enable automake subdir-objects
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 28 Sep 2013 17:11:20 +0000 (18:11 +0100)]
dri/common: move source file lists to Makefile.sources
* Allow the lists to be shared among build systems.
* Update automake and Android build systems.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Fri, 8 Nov 2013 19:08:51 +0000 (19:08 +0000)]
gtest: enable subdir-objects to prevent automake warnings
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Fri, 8 Nov 2013 18:49:30 +0000 (18:49 +0000)]
gbm: enable subdir-objects to prevent automake warnings
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 30 Sep 2013 21:13:54 +0000 (22:13 +0100)]
scons: move SConscript from gallium/targets/ to mesa/drivers/dri/common/
Store scons side by side with the other build systems.
v2: cleanup after a failed rebase
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Johannes Obermayr [Fri, 1 Nov 2013 18:38:14 +0000 (18:38 +0000)]
freedreno: compact a2xx and a3xx makefiles into parent ones
Nearly everything within the three Makefile.am's is identical.
Let's simplify things a little.
v2: Rebase and rewrite the commit message (Emil Velikov)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 29 Sep 2013 12:05:07 +0000 (13:05 +0100)]
scons: drop obsolete enabled_apis variable
The variable was forgotten during the FEATURE_* removal.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 30 Sep 2013 14:58:51 +0000 (15:58 +0100)]
Android: remove unused MESA_ENABLED_APIS variable
The variable was forgotten during the FEATURE_* removal.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Fri, 4 Oct 2013 12:18:25 +0000 (13:18 +0100)]
st/egl: use *_FILE over *_SOURCES names for filelists
Silence automake warnings about missing program/library whenever
the _SOURCES suffix is used for temporary variable names.
warning: variable 'gdi_SOURCES' is defined but no program or
library has 'gdi' as canonical name (possible typo)
Acked-by: Matt Turner <mattst88@gmail.com>
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reported-by: Johannes Obermayr <johannesobermayr@gmx.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70581
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Matt Turner [Thu, 14 Nov 2013 18:36:12 +0000 (10:36 -0800)]
i965: Assert that IF with cmod is Gen6 only.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Vinson Lee [Fri, 15 Nov 2013 06:47:33 +0000 (22:47 -0800)]
i965: Add missing break in SHADER_OPCODE_GEN7_SCRATCH_READ case.
Fixes "Missing break in switch" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Eric Anholt [Fri, 20 Sep 2013 17:13:32 +0000 (10:13 -0700)]
mesa: Dynamically allocate the storage for program local parameters.
The array was 64kb per struct gl_program, plus we statically stored a copy
of one on disk for _mesa_DummyProgram. Given that most struct gl_programs
we generate are for GLSL shaders that don't have local parameters, this
was a waste.
Since you can store and fetch parameters beyond what the program actually
uses, we do have to do a late allocation if necessary at
GetProgramLocalParameter time.
Reduces peak memory usage in the dota2 trace I made by 76MB (4.5%)
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 13 Nov 2013 21:41:28 +0000 (13:41 -0800)]
mesa: Remove PROGRAM_ENV_PARAM enum.
This has been replaced with referring to env parameters using
PROGRAM_STATE_VAR and _mesa_load_state_parameters.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 13 Nov 2013 21:38:37 +0000 (13:38 -0800)]
mesa: Remove PROGRAM_LOCAL_PARAM enum.
This has been replaced with referring to local parameters using
PROGRAM_STATE_VAR and _mesa_load_state_parameters.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 13 Nov 2013 21:36:30 +0000 (13:36 -0800)]
mesa: Update a comment about valid values of a field.
Notably, ENV and LOCAL aren't used any more (replaced by STATE_VAR), but
apparently CONSTANT is.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Thu, 7 Nov 2013 20:15:13 +0000 (12:15 -0800)]
glsl: Apply the transformation "1/rsq(x) == sqrt(x)" in opt_algebraic.
The comment was stale, because the lowering in question wasn't happening
in lower_instructions.cpp. Presumably if the lowering ever moves there,
we can plumb the lowering mask through to opt_algebraic.
total instructions in shared programs:
1618696 ->
1616810 (-0.12%)
instructions in affected programs: 243018 -> 241132 (-0.78%)
GAINED: 0
LOST: 0
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Thu, 7 Nov 2013 20:10:25 +0000 (12:10 -0800)]
glsl: Apply the transformation "(a ^^ a) -> false" in opt_algebraic.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Thu, 31 Oct 2013 16:32:42 +0000 (09:32 -0700)]
glsl: Apply the transformation "(a && a) -> a" in opt_algebraic.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Thu, 31 Oct 2013 07:10:32 +0000 (00:10 -0700)]
glsl: Apply the transformation "(a || a) -> a" in opt_algebraic.
total instructions in shared programs:
1732385 ->
1732373 (-0.00%)
instructions in affected programs: 416 -> 404 (-2.88%)
GAINED: 0
LOST: 0
(That's 4 already-short fragment shaders in dota2)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Thu, 31 Oct 2013 06:56:18 +0000 (23:56 -0700)]
glsl: Move the CSE equality functions to the ir class.
I want to reuse them in opt_algebraic.
v2: Merge in Chris Forbes's break fix.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Mon, 11 Nov 2013 23:54:16 +0000 (15:54 -0800)]
clover: Remove dead file from Makefile.sources.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Kenneth Graunke [Wed, 16 Oct 2013 02:23:53 +0000 (19:23 -0700)]
i965: Rework brw_new_batch to actually start a new batch.
Previously, brw_new_batch was called just after execbuf, but before
intel_batchbuffer_reset. Essentially, it prepared for the creation of a
new batch, that wasn't yet available, and which it didn't create. This
was a bit awkward.
This patch makes brw_new_batch call intel_batchbuffer_reset as the very
first operation. This means that brw_new_batch actually creates a new
batchbuffer, and thus has it available. It brings the creation of the
new batchbuffer and BRW_NEW_BATCH flagging together into one place.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Wed, 16 Oct 2013 02:21:34 +0000 (19:21 -0700)]
i965: Move cache_used_by_gpu flag setting to brw_finish_batch.
It really makes more sense here.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Mon, 11 Nov 2013 19:12:08 +0000 (11:12 -0800)]
i915: Actually enable __DRI2rendererQueryExtensionRec
More rebase fail. This code was written long before i915 and i965 were
split, so most of the code in i9[16]5/intel_screen.c only needed to
exist in one place. It looks like I fixed n-1 of those places after
rebasing on the split.
I only found this from the defined-but-not-used warning for
intelRendererQueryExtension. I noticed this while fixing the other,
related warnings.
(Note: During review, we decided to *not* pick this back to 10.0.)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Aaron Watry [Thu, 14 Nov 2013 18:17:44 +0000 (12:17 -0600)]
radeon/llvm: Free elf_buffer after use
Prevents a memory leak.
v2: Remove null check
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Aaron Watry [Thu, 14 Nov 2013 18:17:43 +0000 (12:17 -0600)]
r600/llvm: Free binary.code/binary.config in r600_llvm_compile
radeon_llvm_compile allocates memory for binary.code, binary.config,
or neither depending on what's being done.
We need to make sure to free that memory after it's no longer needed.
v2: Don't bother checking for null before FREE()
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Aaron Watry [Thu, 14 Nov 2013 18:17:42 +0000 (12:17 -0600)]
r600/llvm: initialize radeon_llvm_binary
use memset to initialize to 0's... otherwise code_size and config_size
could be uninitialized when read later in this method.
It's also hard to do NULL checks on uninitialized pointers.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
v2: Fix indentation
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Brian Paul [Fri, 15 Nov 2013 17:25:19 +0000 (10:25 -0700)]
svga: remove unused vars in svga_hwtnl_simple_draw_range_elements()
And simplify the code.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Thu, 14 Nov 2013 20:41:19 +0000 (13:41 -0700)]
svga: print warning for unsupported indirect dest reg indexing
For DX9-level shaders, there's only limited support for indirect
indexing of registers (with the loop counter register, not the
general address register.)
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 14 Nov 2013 20:33:52 +0000 (13:33 -0700)]
svga: mark dest image as defined in svga_surface_copy()
After we blit/copy to a dest texture image we need to mark it as
being defined. This fixes broken mipmap generation for quite a
few texture formats. Mipgen involves making texture views and
svga_texture_view_surface() skips texture images that are undefined.
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Wed, 13 Nov 2013 18:26:15 +0000 (11:26 -0700)]
svga: do primitive trimming in translate_indices()
The index translation code expects the number of indexes to be
consistent with the primitive type (ex: a multiple of 3 for
PIPE_PRIM_TRIANGLES). If it's not, we can write out of bounds
in the destination buffer.
Fixes failed assertions in the pipebuffer debug code found with
Piglit primitive-restart-draw-mode test.
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 13 Nov 2013 18:24:41 +0000 (11:24 -0700)]
indices: add comments, assertions in u_indices.c file
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Tue, 12 Nov 2013 22:09:44 +0000 (15:09 -0700)]
mesa: remove duplicated prototypes in varray.h
Aaron Watry [Wed, 6 Nov 2013 22:49:24 +0000 (16:49 -0600)]
gallium/pipe_loader: un-reference udev resources when we're done with them.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Aaron Watry [Wed, 6 Nov 2013 22:49:23 +0000 (16:49 -0600)]
radeonsi/compute: Dispose of LLVM module after compiling kernels
v2: Fix indentation
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Aaron Watry [Wed, 6 Nov 2013 22:49:22 +0000 (16:49 -0600)]
radeonsi/compute: Free program and program.kernels on shutdown
v2: Fix indentation
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Aaron Watry [Wed, 6 Nov 2013 22:49:21 +0000 (16:49 -0600)]
radeon/llvm: Free created llvm memory buffer
v2: Fix indentation
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Aaron Watry [Wed, 6 Nov 2013 22:49:20 +0000 (16:49 -0600)]
radeon/llvm: Free libelf resources
v2: Fix indentation
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Aaron Watry [Wed, 6 Nov 2013 22:49:19 +0000 (16:49 -0600)]
radeon/llvm: fix spelling error
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Tom Stellard [Thu, 11 Apr 2013 14:37:55 +0000 (10:37 -0400)]
clover: Support multiple devices in clCreateContextFromType() v2
v2:
- Use clGetDeviceIDs to query devices.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Paul Berry [Tue, 29 Oct 2013 21:41:32 +0000 (14:41 -0700)]
glsl: Rework interface block linking.
Previously, when doing intrastage and interstage interface block
linking, we only checked the interface type; this prevented us from
catching some link errors.
We now check the following additional constraints:
- For intrastage linking, the presence/absence of interface names must
match.
- For shader ins/outs, the interface names themselves must match when
doing intrastage linking (note: it's not clear from the spec whether
this is necessary, but Mesa's implementation currently relies on
it).
- Array vs. nonarray must be consistent, taking into account the
special rules for vertex-geometry linkage.
- Array sizes must be consistent (exception: during intrastage
linking, an unsized array matches a sized array).
Note: validate_interstage_interface_blocks currently handles both
uniforms and in/out variables. As a result, if all three shader types
are present (VS, GS, and FS), and a uniform interface block is
mentioned in the VS and FS but not the GS, it won't be validated. I
plan to address this in later patches.
Fixes the following piglit tests in spec/glsl-1.50/linker:
- interface-blocks-vs-fs-array-size-mismatch
- interface-vs-array-to-fs-unnamed
- interface-vs-unnamed-to-fs-array
- intrastage-interface-unnamed-array
v2: Simplify logic in intrastage_match() for handling array sizes.
Make extra_array_level const. Use an unnamed temporary
interface_block_definition in validate_interstage_interface_blocks()'s
first call to definitions->store().
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Paul Berry [Tue, 12 Nov 2013 18:55:18 +0000 (10:55 -0800)]
i965: Fix vertical alignment for multisampled buffers.
From the Sandy Bridge PRM, Vol 1 Part 1 7.18.3.4 (Alignment Unit
Size):
j [vertical alignment] = 4 for any render target surface is
multisampled (4x)
From the Ivy Bridge PRM, Vol 4 Part 1 2.12.2.1 (SURFACE_STATE for most
messages), under the "Surface Vertical Alignment" heading:
This field is intended to be set to VALIGN_4 if the surface was
rendered as a depth buffer, for a multisampled (4x) render target,
or for a multisampled (8x) render target, since these surfaces
support only alignment of 4.
Back in 2012 when we added multisampling support to the i965 driver,
we forgot to update the logic for computing the vertical alignment, so
we were often using a vertical alignment of 2 for multisampled
buffers, leading to subtle rendering errors.
Note that the specs also require a vertical alignment of 4 for all
Y-tiled render target surfaces; I plan to address that in a separate
patch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53077
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 13 Nov 2013 22:24:09 +0000 (14:24 -0800)]
main: Fix MaxUniformComponents for geometry shaders.
For both vertex and fragment shaders we default MaxUniformComponents
to 4 * MAX_UNIFORMS. It makes sense to do this for geometry shaders
too; if back-ends have different limits they can override them as
necessary.
Fixes piglit test:
spec/glsl-1.50/built-in constants/gl_MaxGeometryUniformComponents
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>