Dave Airlie [Wed, 17 Apr 2013 01:07:49 +0000 (11:07 +1000)]
ralloc: don't write to memory in case of alloc fail.
For some reason I made this happen under indirect rendering,
I think we might have a leak, valgrind gave out, so I said I'd
fix the basic problem.
NOTE: This is a candidate for stable branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Wed, 17 Apr 2013 15:49:39 +0000 (09:49 -0600)]
mesa: generate glGetInteger/Boolean/Float/Doublev() code for all APIs
No longer pass -a flag to the get_hash_generate.py script to specify
OpenGL, ES1, ES2, etc. This updates the autoconf, scons and android
build files too (so we can bisect).
This is the last of the API-dependent conditional compilation in
core Mesa.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Brian Paul [Wed, 17 Apr 2013 15:49:39 +0000 (09:49 -0600)]
mesa: remove mfeatures.h
No longer needed.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Brian Paul [Wed, 17 Apr 2013 15:49:39 +0000 (09:49 -0600)]
mesa: remove #include "mfeatures.h" from numerous source files
None of the remaining FEATURE_x symbols in mfeatures.h are used anymore.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Brian Paul [Wed, 17 Apr 2013 15:49:39 +0000 (09:49 -0600)]
glapi: no longer emit #include "mfeatures.h" in generated files
None of the symbols in mfeatures.h are used anymore.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Brian Paul [Wed, 17 Apr 2013 15:49:39 +0000 (09:49 -0600)]
mesa: remove FEATURE_remap_table from remap.[ch]
It was always defined.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Brian Paul [Wed, 17 Apr 2013 15:49:39 +0000 (09:49 -0600)]
glapi: remove FEATURE_remap_table test (it's always defined)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Zack Rusin [Wed, 17 Apr 2013 22:21:35 +0000 (15:21 -0700)]
draw/so: respect leading/provoking vertex info
we were ignoring leading/provoking vertex settings which was
breaking decomposition of some strips.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Zack Rusin [Wed, 17 Apr 2013 22:19:34 +0000 (15:19 -0700)]
softpipe/so: use the correct variable for reporting stream out
we were using the wrong vars, reporting incorrect stream output
statistics.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Zack Rusin [Wed, 17 Apr 2013 19:15:12 +0000 (12:15 -0700)]
gallivm/gs: fix indirect addressing in geometry shaders
We were always treating the vertex index as a scalar but when the
shader is using indirect addressing it will be a vector of indices
for each channel. This was causing some nasty crashes insides
LLVM.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Wed, 17 Apr 2013 22:16:24 +0000 (16:16 -0600)]
st/wgl: fix issue with SwapBuffers of minimized windows
If a window's minimized we get a zero-size window. Skip the SwapBuffers
in that case to avoid some warning messages with the VMware svga driver.
Internal bug #996695
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Ian Romanick [Tue, 16 Apr 2013 16:31:08 +0000 (09:31 -0700)]
intel: Don't dereference a NULL pointer of calloc fails
The caller of NewTextureObject does the right thing if NULL is returned,
so this function should do the right thing too.
NOTE: This is a candidate for stable branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 21 Mar 2013 17:07:31 +0000 (10:07 -0700)]
i965: Trim trailing whitespace in brw_defines.h.
It was all over the formats section I wanted to edit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Laurent Carlier [Wed, 17 Apr 2013 19:40:16 +0000 (21:40 +0200)]
r200: fix build failure introduced with
cbbcb0247e6aa8d7adc274a94206ee02f9c70bea
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 17 Apr 2013 16:02:29 +0000 (10:02 -0600)]
st/mesa: clean up formatting in st_cb_msaa.c
Insert blank lines, wrap lines, remove trailing whitespace, etc.
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove gl_context::_TriangleCaps
No longer used anywhere.
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 17:58:33 +0000 (11:58 -0600)]
mesa: remove DD_TRI_LIGHT_TWOSIDE flag
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_TRI_UNFILLED flag
Use alternate code in intel, r200, radeon drivers.
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_TRI_SMOOTH flag
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_TRI_STIPPLE flag
Make it a local macro for the i915 driver.
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_TRI_OFFSET flag
Make it a local macro for the i915 driver.
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_POINT_ATTEN flag
For the i915 driver, make it a local macro.
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_POINT_SMOOTH flag
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_LINE_STIPPLE flag
For the i915 driver, make it a local macro.
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove DD_SEPARATE_SPECULAR flag
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 17 Apr 2013 01:06:22 +0000 (19:06 -0600)]
mesa: remove unused DD_LINE_SMOOTH flag
Reviewed-by: Eric Anholt <eric@anholt.net>
Zack Rusin [Wed, 17 Apr 2013 03:31:22 +0000 (20:31 -0700)]
draw/gs: make sure geometry shaders don't overflow
The specification says that the geometry shader should exit if the
number of emitted vertices is bigger or equal to max_output_vertices and
we can't do that because we're running in the SoA mode, which means that
our storing routines will keep getting called on channels that have
overflown (even though they will be masked out, but we just can't skip
them).
So we need some scratch area where we can keep writing the overflown
vertices without overwriting anything important or crashing.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Zack Rusin [Wed, 17 Apr 2013 03:17:08 +0000 (20:17 -0700)]
draw/gs: Return early if the passed geometry shader is null
Can happen if we were using stream output without geometry
shader, by returning early we avoid a crash.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Zack Rusin [Thu, 11 Apr 2013 13:11:29 +0000 (06:11 -0700)]
draw: implement pipeline statistics in the draw module
This is a basic implementation of the pipeline statistics in the
draw module. The interface is similar to the stream output statistics
and also requires that the callers explicitly enable it.
Included is the implementation of the interface in llvmpipe and
softpipe. Only softpipe enables the pipeline statistics capability
though because llvmpipe is lacking gathering of the fragment shading
and rasterization statistics.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Zack Rusin [Thu, 11 Apr 2013 09:22:06 +0000 (02:22 -0700)]
gallivm/gs: fix the end primitive calls
The issue with SOA execution and end_primitive opcode is that it
can be executed both when we haven't emitted any vertices, in
which case we don't want to emit an empty primitive, and when
the execution mask is zero and the execution should be skipped. We
handled only the latter of those conditions. Now we're combining the
execution mask with a mask created from emitted vertices to handle
both cases. As a result we don't need the pending_end_primitive
flag which was broken because it was static and could be affected
by both above mentioned conditions at run-time.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Zack Rusin [Wed, 10 Apr 2013 22:28:01 +0000 (15:28 -0700)]
tgsi/exec: geometry shaders are executed on a single primitive
which means that our execution mask in GS is equal to 1 not 0xf.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Zack Rusin [Wed, 10 Apr 2013 22:25:18 +0000 (15:25 -0700)]
tgsi/exec: fix the udiv and umod instructions
Same as with llvmpipe: we can't be divind/moding by zero and we
need to make sure that dividing/moding by zero produces 0xffffffff.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
José Fonseca [Wed, 17 Apr 2013 12:32:15 +0000 (13:32 +0100)]
gallivm: JIT symbol resolution with linux perf.
Details on docs/llvmpipe.html
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
José Fonseca [Wed, 17 Apr 2013 12:32:46 +0000 (13:32 +0100)]
draw: Silence uninitialized var warnings.
Trivial.
Vincent Lejeune [Sat, 13 Apr 2013 14:36:02 +0000 (16:36 +0200)]
r600g/llvm: Use gprcount from llvm
Anuj Phogat [Tue, 16 Apr 2013 17:34:43 +0000 (10:34 -0700)]
intel: Add a null pointer check before dereferencing the pointer
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Emil Velikov [Fri, 12 Apr 2013 11:41:52 +0000 (12:41 +0100)]
docs: Update 'Making new mesa release'
Add a note to update PACKAGE_VERSION for Android and scons builds
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Emil Velikov [Fri, 12 Apr 2013 11:41:51 +0000 (12:41 +0100)]
docs: Add some missing release notes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Emil Velikov [Fri, 12 Apr 2013 11:41:50 +0000 (12:41 +0100)]
docs: move specs to a separate folder
Handle legacy/obsolete specs as well
List all specs in extensions.html
Mark 'OLD' extensions as obsolete in extensions.html
Update the spec location in old relnotes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Emil Velikov [Fri, 12 Apr 2013 11:41:49 +0000 (12:41 +0100)]
docs: restructure release notes into separate folder
relnotes-*html > relnotes/*html
RELNOTES-* > relnotes/*
fix links, css and frames
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
José Fonseca [Wed, 17 Apr 2013 09:47:03 +0000 (10:47 +0100)]
gallium: Disambiguate TGSI_OPCODE_IF.
TGSI_OPCODE_IF condition had two possible interpretations:
- src.x != 0.0f
- Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was false either for
vertex and fragment shaders
- gallivm/llvmpipe
- postprocess
- vl state tracker
- vega state tracker
- most old drivers
- old internal state trackers
- many graw examples
- src.x != 0U
- Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was true for both
vertex and fragment shaders
- tgsi_exec/softpipe
- r600
- radeonsi
- nv50
And drivers that use draw module also were a mess (because Mesa would
emit float IFs, but draw module supports native integers so it would
interpret IF arg as integers...)
This sort of works if the source argument is limited to float +0.0f or
+1.0f, integer 0, but would fail if source is float -0.0f, or integer in
the float NaN range. It could also fail if source is integer 1, and
hardware flushes denormalized numbers to zero.
But with this change there are now two opcodes, IF and UIF, with clear
meaning.
Drivers that do not support native integers do not need to worry about
UIF. However, for backwards compatibility with old state trackers and
examples, it is advisable that native integer capable drivers also
support the float IF opcode.
I tried to implement this for r600 and radeonsi based on the surrounding
code. I couldn't do this for nouveau, so I just shunted IF/UIF
together, which matches the current behavior.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
v2:
- Incorporate Roland's feedback.
- Fix r600_shader.c merge conflict.
- Fix typo in radeon, spotted by Michel Dänzer.
- Incorporte Christoph Bumiller's patch to handle TGSI_OPCODE_IF(float)
properly in nv50/ir.
José Fonseca [Sat, 13 Apr 2013 09:28:01 +0000 (10:28 +0100)]
gallium: Eliminate TGSI_OPCODE_IFC.
Never used or implemented.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Kenneth Graunke [Wed, 3 Oct 2012 21:26:29 +0000 (14:26 -0700)]
i965: Enable the Bay Trail platform.
This patch adds PCI IDs for Bay Trail (sometimes called Valley View).
As far as the 3D driver is concerned, it's very similar to Ivybridge,
so the existing code should work just fine.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Christian König [Fri, 12 Apr 2013 15:13:41 +0000 (17:13 +0200)]
r600/uvd: cleanup disabling tiling on pre EG asics
Set transfer flag instead of fiddling with the tilling params directly.
Signed-off-by: Christian König <christian.koenig@amd.com>
Christian König [Fri, 12 Apr 2013 08:25:18 +0000 (10:25 +0200)]
autoconf: enable detection of vdpau and xvmc by default
Since we now have UVD support we should enable them by default.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Ian Romanick [Mon, 15 Apr 2013 19:25:18 +0000 (12:25 -0700)]
mesa/swrast: Move memory allocation outside the blit loop
Assume the maximum pixel size (16 bytes per pixel). In addition to
moving redundant malloc and free calls outside the loop, this fixes a
potential resource leak when a surface is mapped and the malloc fails.
This also makes blit_nearest look a bit more like blit_linear.
v2: Use MAX_PIXEL_BYTES instead of 16. Suggested by Ken.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Fri, 12 Apr 2013 23:47:52 +0000 (16:47 -0700)]
mesa/swrast: Move free calls outside the attachment loop
This was originally discovered by Klocwork analysis:
Possible memory leak. Dynamic memory stored in 'srcBuffer0'
allocated through function 'malloc' at line 566 can be lost at line
746
However, I think the problem is actually much worse. Since the memory
is freed after the first pass through the loop, the released buffer may
be used on the next iteration!
NOTE: This is a candidate for stable release branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Fri, 12 Apr 2013 23:47:13 +0000 (16:47 -0700)]
mesa/swrast: Refactor no-memory error checking in blit_linear
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Martin Andersson [Tue, 16 Apr 2013 14:02:00 +0000 (18:02 +0400)]
r600g: Workaround for a harware bug with nested loops on Cayman
There is a hardware bug on Cayman where a BREAK/CONTINUE followed by
LOOP_STARTxxx for nested loops may put the branch stack into a state
such that ALU_PUSH_BEFORE doesn't work as expected. Workaround this
by replacing the ALU_PUSH_BEFORE with a PUSH + ALU
Fixes piglit tests EXT_transform_feedback/order*
v2: Use existing loop count and improve comment
v3: [Vadim Girlin] Set jump address for PUSH instructions
NOTE: This is a candidate for the 9.1 branch
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Marek Olšák [Thu, 11 Apr 2013 11:16:42 +0000 (13:16 +0200)]
gallium/hud: fix FPS computation for framerate > 4.2k
Marek Olšák [Wed, 10 Apr 2013 19:42:51 +0000 (21:42 +0200)]
gallium/hud: increase vertex buffer size for background black rectangles
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Wed, 10 Apr 2013 19:41:48 +0000 (21:41 +0200)]
gallium/hud: update the contents of GALLIUM_HUD=help
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Wed, 10 Apr 2013 19:40:39 +0000 (21:40 +0200)]
gallium/hud: remove pipeline-statistics- prefix in query names
for the env var string not to be awfully long
v2: fix bug in indexing of "name"
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Wed, 10 Apr 2013 18:45:01 +0000 (20:45 +0200)]
r600g: implement pipeline statistics query
Marek Olšák [Wed, 10 Apr 2013 15:01:07 +0000 (17:01 +0200)]
winsys/radeon: use query_value for timestamp, remove query_timestamp
Marek Olšák [Fri, 5 Apr 2013 23:33:21 +0000 (01:33 +0200)]
r600g: add a debug flag for printing virtual addresses of resources
Marek Olšák [Fri, 5 Apr 2013 00:43:26 +0000 (02:43 +0200)]
r600g: add a query returning the amount of time spent during bo_map sync.
Matt Turner [Sun, 20 Jan 2013 23:32:08 +0000 (15:32 -0800)]
build: Get rid of GALLIUM_WINSYS_DIRS
configure still uses it to print the enabled winsys.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sun, 20 Jan 2013 21:06:24 +0000 (13:06 -0800)]
build: Get rid of GALLIUM_TARGET_DIRS
configure still uses it to print the enabled targets.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sun, 20 Jan 2013 20:54:31 +0000 (12:54 -0800)]
build: Build pipe-loader before gallium tests
And don't build it from other Makefiles. That's awful, and breaks
distclean.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sun, 20 Jan 2013 19:46:02 +0000 (11:46 -0800)]
build: Get rid of GALLIUM_MAKE_DIRS
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sat, 19 Jan 2013 19:23:51 +0000 (11:23 -0800)]
build: Stop using GALLIUM_STATE_TRACKERS_DIRS for SUBDIRS
configure still uses it to print the enabled state trackers.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sat, 19 Jan 2013 08:35:43 +0000 (00:35 -0800)]
build: Get rid of DRIVER_DIRS
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sat, 19 Jan 2013 08:28:29 +0000 (00:28 -0800)]
build: Stop AC_SUBST'ing DRI_DIRS and GALLIUM_DRIVERS_DIRS
Neither are used in Makefile.ams.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sat, 19 Jan 2013 08:09:36 +0000 (00:09 -0800)]
build: Remove GALLIUM_DIRS
It's always constant anyway.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sat, 19 Jan 2013 07:59:49 +0000 (23:59 -0800)]
build: Get rid of SRC_DIRS
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Sat, 19 Jan 2013 07:43:05 +0000 (23:43 -0800)]
build: Get rid of CORE_DIRS
A step toward working make dist/distcheck.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Mon, 21 Jan 2013 18:27:25 +0000 (10:27 -0800)]
build: Move src/mapi/mapi/* to src/mapi/
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Mon, 21 Jan 2013 18:25:31 +0000 (10:25 -0800)]
build: Rename sources.mak -> Makefile.sources
For the sake of consistency.
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tom Stellard [Thu, 4 Apr 2013 20:21:06 +0000 (16:21 -0400)]
radeonsi: Read config values from the .AMDGPU.config ELF section
Instead of emitting configuration values (e.g. number of gprs used) in a
predefined order, the LLVM backend now emits these values in
register/value pairs. The first dword contains the register address and
the second dword contians the value to write.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tom Stellard [Thu, 4 Apr 2013 20:02:51 +0000 (13:02 -0700)]
radeon/llvm: Handle ELF formatted binary output from the LLVM backend
Tom Stellard [Thu, 4 Apr 2013 16:57:13 +0000 (09:57 -0700)]
radeon/llvm: Use a struct for storing compiled code
Roland Scheidegger [Mon, 15 Apr 2013 01:57:23 +0000 (03:57 +0200)]
gallivm: fix small but severe bug in handling multiple lod level strides
Inserting the value for the second quad in the wrong place for the
following shuffle. This meant the row or image stride was undefined which is
quite catastrophic, can lead to bogus texels fetched or just segfault.
This code is only hit for SoA path currently, still surprising it
didn't crash more or caused more visible issues (I think llvm used a
broadcast shuffle for the undefined parts of the vector, hence the undefined
value for the second quad was just the same as that from the first quad,
so as long as both quads hit the same mip level everything was fine, and since
lower mips always have the same large stride it made it less likely to
hit out-of-bound memory in case of differing lods).
Note: this is a candidate for stable branches.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Francisco Jerez [Sun, 7 Apr 2013 16:31:06 +0000 (18:31 +0200)]
clover: Fix usage of incorrect object as destination in clEnqueueCopyBufferToImage.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Francisco Jerez [Sat, 6 Apr 2013 12:35:00 +0000 (14:35 +0200)]
clover: Define platform class and merge with device_registry.
Null platform IDs are OK according to the spec, but some applications have
been reported to get paranoid and assume that our NULL platform is unusable.
As it doesn't hurt to have device enumeration separate from the rest of the
device code (quite the opposite, it makes the code cleaner), make the API use
an actual platform object that keeps track of the available devices instead of
the former NULL pointer.
Reported-and-reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Francisco Jerez [Sat, 13 Apr 2013 10:17:32 +0000 (12:17 +0200)]
clover: Add missing fields to the module serializer.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Eric Anholt [Thu, 11 Apr 2013 17:46:02 +0000 (10:46 -0700)]
i965: Shut up the last release build warning.
I don't see a sensible value to use in this path, but we shouldn't ever
hit this outside of developer new-texture-target enabling.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:38:04 +0000 (10:38 -0700)]
i965: Silence one more compile warning.
We don't want to store this thing in the class, and we do need the
definition to be at the top of the function and held onto until the end
here, so there's not much to do besides (void) reference it.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:37:13 +0000 (10:37 -0700)]
i965: Fix a warning in the release build.
This was copy and pasted from can_reswizzle_dst(), and we can just fold it
in instead to avoid the warning.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:34:59 +0000 (10:34 -0700)]
i965: Fix an unused variable warning in the release build.
I think this actually clarifies what's going on in the asserts a bit,
given how many regions we've got floating around.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:33:00 +0000 (10:33 -0700)]
i965: Fix an unused variable warning in the release build.
It's used in an assert, but we have this as a member of the class anyway.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:30:51 +0000 (10:30 -0700)]
intel: Return failure properly in the texsubimage blit path.
We assert that failure doesn't happen, but it fixes a warning in the
release build and it would at least give working behavior for a user by
falling back to the normal texsubimage path.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:16:26 +0000 (10:16 -0700)]
intel: Fix a warning in the release build.
This was silly -- checking that we didn't overflow the array by dividing
the array size by 2 and then multiplying it back up by 2.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:14:58 +0000 (10:14 -0700)]
intel: Fix an unused variable warning in the release build.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:11:50 +0000 (10:11 -0700)]
intel: Improve diagnostics for emit_linear_blit failure path.
This fixes unused variable warnings in the release build, and should be
more useful if it ever triggers.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:08:56 +0000 (10:08 -0700)]
i965: Fix error path for MCS allocation.
Asserts don't stop execution in release builds, so we would continue on to
use an uninitialized format value. Just take the failure path, which
appears to continue up the call stack for a while.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 17:06:06 +0000 (10:06 -0700)]
i830: Move assert-only code into the assert.
The call has no side effects, and moving it into the assert cleans up a
compile warning in the release build.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 11 Apr 2013 16:54:41 +0000 (09:54 -0700)]
i965/fs: Fix some untriggered optimization bugs with uncompressed/sechalf.
We have this support for firsthalf/sechalf instructions, which would be
called in the !has_compr4 (aka original gen4) 16-wide case. We currently
only support 16-wide for gen5+, so we weren't tripping over this, but it
would have been a problem if we ever try to enable it.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Tue, 9 Apr 2013 00:43:06 +0000 (17:43 -0700)]
i965/fs: Add basic-block-level dead code elimination.
This is a poor substitute for proper global dead code elimination that
could replace both our current paths, but it was very easy to write. It
particularly helps with Valve's shaders that are translated out of DX
assembly, which has been register allocated and thus have a bunch of
unrelated uses of the same variable (some of which get copy-propagated
from and then left for dead).
shader-db results:
total instructions in shared programs:
1735753 ->
1731698 (-0.23%)
instructions in affected programs: 492620 -> 488565 (-0.82%)
v2: Fix comment typo
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Tue, 9 Apr 2013 01:46:23 +0000 (18:46 -0700)]
i965/fs: Remove incorrect note of writing attr in centroid workaround.
This instruction doesn't update its IR destination, it just moves from
payload to f0. This caused the dead code elimination pass I'm adding to
dead-code-eliminate the first step of interpolation.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Mon, 4 Jun 2012 15:59:00 +0000 (08:59 -0700)]
i965/fs: Add a helper function for checking for partial register updates.
These checks were all over, and every time I wrote one I had to try to
decide again what the cases were for partial updates.
v2: Fix inadvertent reladdr check removal.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 4 Apr 2013 16:47:03 +0000 (09:47 -0700)]
mesa: Add a macro to bitset for determining bitset size.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Fri, 5 Apr 2013 20:43:52 +0000 (13:43 -0700)]
i965: Fix compiler warnings since the introduction of texture multisample.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ian Romanick [Wed, 10 Apr 2013 14:50:49 +0000 (07:50 -0700)]
mesa: Don't leak gl_context::BeginEnd at context destruction
The other dispatch tables (Exec and Save) are freed, but BeginEnd is
never freed. This was found by inspection why investigating the leak of
shared state in _mesa_initialize_context.
NOTE: This is a candidate for stable branches
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Wed, 10 Apr 2013 14:47:08 +0000 (07:47 -0700)]
mesa: Don't leak shared state when context initialization fails
Back up at line 1017 (not shown in patch), we add a reference to the
shared state. Several places after that may divert to the error
handler, but, as far as I can tell, nothing ever unreferences the shared
state.
Fixes issue identified by Klocwork analysis:
Resource acquired to 'shared->TexMutex' at line 1012 may be lost
here. Also there is one similar error on line 1087.
NOTE: This is a candidate for the stable branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 9 Apr 2013 03:00:30 +0000 (20:00 -0700)]
egl/dri2: NULL check value returned by dri2_create_surface
dri2_create_surface can fail for a variety of reasons, including bad
input data. Dereferencing the NULL pointer and crashing is not okay.
Fixes issue identified by Klocwork analysis:
Pointer 'surf' returned from call to function 'dri2_create_surface'
at line 285 may be NULL and will be dereferenced at line 291.
NOTE: This is a candidate for the stable branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Tue, 9 Apr 2013 02:55:18 +0000 (19:55 -0700)]
mesa: NULL check the pointer before trying to dereference it
Duh.
Fixes issues identified by Klocwork analysis:
Pointer 'table' returned from call to function 'calloc' at line 115
may be NULL and will be dereferenced at line 117.
and
Suspicious dereference of pointer 'table' before NULL check at line
119.
NOTE: This is a candidate for the stable branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 8 Apr 2013 23:53:46 +0000 (16:53 -0700)]
glsl: Fix hypothetical NULL dereference related to process_array_type
Ensure that process_array_type never returns NULL, and let
process_array_type handle the case where the supplied base type is NULL.
Fixes issues identified by Klocwork analysis:
Pointer 'type' returned from call to function 'get_type' at line
1907 may be NULL and may be dereferenced at line 1912.
and
Pointer 'field_type' checked for NULL at line 4160 will be
dereferenced at line 4165. Also there is one similar error on line
4174.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 8 Apr 2013 23:37:04 +0000 (16:37 -0700)]
glsl: Fix hypothetical NULL dereference in ast_process_structure_or_interface_block
Fixes issue identified by Klocwork analysis:
Pointer 'field_type' returned from call to function 'glsl_type' at
line 4126 may be NULL and may be dereferenced at line 4139. Also
there are 2 similar errors on line(s) 4165, 4174.
In practice, it should be impossible to actually get NULL in here
because a syntax error would have already caused compilation to halt.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tom Stellard [Wed, 20 Mar 2013 02:39:31 +0000 (22:39 -0400)]
r300g: Fix bug in OMOD optimization
https://bugs.freedesktop.org/show_bug.cgi?id=60503
NOTE: This is a candidate for the stable branches.