Commit Graph

59762 Commits

Author SHA1 Message Date
Emil Velikov 5896100a38 drivers/radeon: remove unused CXXFLAGS, LLVM_CPP_FILES
The above two variables are unused as of commit

  commit 024fe6852a
  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>
2013-11-18 15:35:21 +00:00
José Fonseca 1e67ee8c9a mesa/main: Move declaration to beginning of scope.
Should fix MSVC build.

Trivial.
2013-11-18 14:43:31 +00:00
Courtney Goeltzenleuchter 2cfbf84dad 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>
2013-11-17 19:57:17 -08:00
Tapani Pälli 53f89a436f glsl: cleanup, remove duplicate assignment
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-11-17 18:51:37 -08:00
Kenneth Graunke d12e0e8972 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>
2013-11-17 18:51:07 -08:00
Kenneth Graunke bde5e4a1e6 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>
2013-11-17 18:51:07 -08:00
Kenneth Graunke a6712f5109 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>
2013-11-17 18:51:06 -08:00
Kenneth Graunke 145138fb3c 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>
2013-11-17 18:51:06 -08:00
Chris Forbes 45a56ce399 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>
2013-11-17 20:31:49 +13:00
Chris Forbes 61143b87c1 i965: Fix broken asserts
These would never fire.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-11-17 18:56:57 +13:00
Chris Forbes 0741997ff0 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>
2013-11-17 18:56:55 +13:00
Chris Forbes 6f7c693a85 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>
2013-11-17 18:56:40 +13:00
Vadim Girlin 4cb04aa0df 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>
2013-11-17 01:36:28 +04:00
Kenneth Graunke 04856ceb5c 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>
2013-11-16 09:12:58 -08:00
Kenneth Graunke 717241bf4a 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>
2013-11-16 09:12:58 -08:00
Kenneth Graunke ec8cc65926 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>
2013-11-16 09:12:57 -08:00
Emil Velikov 02fdb5cb51 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>
2013-11-16 16:31:04 +00:00
Emil Velikov 5b8c2c8f00 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>
2013-11-16 16:31:04 +00:00
Emil Velikov 38e0b7eeaa 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>
2013-11-16 16:31:04 +00:00
Emil Velikov dfcdece7c5 targets/xvmc: consolidate lib deps into Automake.inc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-11-16 16:31:04 +00:00
Emil Velikov bfda1460b1 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>
2013-11-16 16:31:03 +00:00
Emil Velikov 5d7d120af1 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>
2013-11-16 16:31:03 +00:00
Emil Velikov f7ac1d5989 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>
2013-11-16 16:31:03 +00:00
Emil Velikov 096b988360 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>
2013-11-16 16:31:03 +00:00
Emil Velikov 3f920a91f3 targets/vdpau: consolidate lib deps into Automake.inc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-11-16 16:31:03 +00:00
Emil Velikov 5f0df8ab22 targets/vdpau: move linker flags to Automake.inc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-11-16 16:31:02 +00:00
Emil Velikov 23588a9c04 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>
2013-11-16 16:31:02 +00:00
Emil Velikov 7dac1b470a 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>
2013-11-16 16:29:28 +00:00
Emil Velikov ad501a535a 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>
2013-11-16 14:02:52 +00:00
Emil Velikov 23cdf8de32 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>
2013-11-16 14:02:52 +00:00
Emil Velikov a9a3029541 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>
2013-11-16 14:02:52 +00:00
Emil Velikov 589e0b2305 gallium/drivers: enable automake subdir-objects
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-11-16 14:02:51 +00:00
Emil Velikov d5e79a9d2b 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>
2013-11-16 14:02:47 +00:00
Emil Velikov 2c1bb79213 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>
2013-11-16 14:02:15 +00:00
Emil Velikov b3c60ff5d0 st/xvmc: enable automake subdir-objects
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-11-16 14:02:15 +00:00
Emil Velikov 01d35eb372 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>
2013-11-16 14:02:15 +00:00
Emil Velikov b51b3fc537 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>
2013-11-16 14:01:27 +00:00
Emil Velikov b5773ee043 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>
2013-11-16 14:00:16 +00:00
Emil Velikov 0b57da0211 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>
2013-11-16 14:00:16 +00:00
Johannes Obermayr 595bd01eb1 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>
2013-11-16 14:00:16 +00:00
Emil Velikov c5062726f1 scons: drop obsolete enabled_apis variable
The variable was forgotten during the FEATURE_* removal.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-11-16 14:00:15 +00:00
Emil Velikov 1aeafcb7c5 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>
2013-11-16 14:00:15 +00:00
Emil Velikov 9560d34fcf 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>
2013-11-16 13:53:31 +00:00
Matt Turner e133c0103d i965: Assert that IF with cmod is Gen6 only.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-11-15 23:31:42 -08:00
Vinson Lee b570c4229f 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>
2013-11-15 18:29:34 -08:00
Eric Anholt e5885c119d 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>
2013-11-15 11:35:01 -08:00
Eric Anholt bb1f096975 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>
2013-11-15 11:34:59 -08:00
Eric Anholt 33b0455211 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>
2013-11-15 11:34:57 -08:00
Eric Anholt fddc17ab36 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>
2013-11-15 11:34:49 -08:00
Eric Anholt aa6d7bc6d6 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>
2013-11-15 11:33:07 -08:00