Commit graph

49510 commits

Author SHA1 Message Date
Christian König
de80e560bc radeonsi: switch to v*i8 for resources and samplers v2
v2: remove unrelated changes

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-03-07 10:03:22 +01:00
Christian König
2cb54833d0 r600g/llvm: Update CONSTANT_BUFFER address space definition
To match recent LLVM changes.

Signed-off-by: Christian König <christian.koenig@amd.com>
2013-03-07 10:03:11 +01:00
Zack Rusin
2532147f8b draw/llvm: fix inputs to the geometry shader
We can't clip and viewport transform the vertices before we let
the geometry shader process them. Lets make sure the generated
vertex shader has both disabled if geometry shader is present.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-05 20:13:08 -08:00
Bryan Cain
8c74380b2d draw: use geometry shader info in clip_init_state if appropriate
Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-05 20:13:08 -08:00
Bryan Cain
30f246bf2c draw: account for separate shader objects in geometry shader code
The geometry shader code seems to have been originally written with the
assumptions that there are the same number of VS outputs as GS outputs and
that VS outputs are in the same order as their corresponding GS inputs. Since
TGSI uses separate shader objects, these are both wrong assumptions. This
was causing several valid vertex/geometry shader combinations to either render
incorrectly or trigger an assertion.

Conflicts:
	src/gallium/auxiliary/draw/draw_gs.c

Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-05 20:13:08 -08:00
Alan Hourihane
cf0b4a30fc Unreference sampler object when it's currently bound to texture unit.
This change specifically unbinds a sampler object from the texture unit
if it's bound to a unit. The spec calls for default object when deleting
sampler objects which are currently bound.

Note: this is a candidate for the stable branches

Signed-off-by: Alan Hourihane <alanh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-03-06 18:10:12 +00:00
Brian Paul
b21f8e364b llvmpipe: fix incorrect 'j' array index in dummy texture code
Use 0 instead.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-03-06 10:34:09 -07:00
Brian Paul
975d31f60d llvmpipe: remove unused cmd_block_list struct 2013-03-06 10:34:09 -07:00
Brian Paul
a51b81558f llvmpipe: add some scene limit sanity check assertions
Note: This is a candidate for the stable branches.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-06 10:34:09 -07:00
Brian Paul
a31ebdffa0 llvmpipe: tweak CMD_BLOCK_MAX and LP_SCENE_MAX_SIZE
We advertise a max texture/surfaces size of 8K x 8K but the old values
for these limits didn't actually allow us to handle that surface size.

For 8K x 8K we'll have 16384 bins.  Each bin needs at least one cmd_block
object which was 2192 bytes in size.  Since 16384 * 2192 exceeded
LP_SCENE_MAX_SIZE we'd silently fail in lp_scene_new_data_block() and not
draw the complete scene.

By reducing CMD_BLOCK_MAX to 29 we get nice 512-byte cmd_blocks.  And
by increasing LP_SCENE_MAX_SIZE to 9 MB we can allocate enough command
blocks for 8K x 8K, plus a few regular data blocks.

Fixes the (improved) piglit fbo-maxsize test.

Note: This is a candidate for the stable branches.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-06 10:34:09 -07:00
Kenneth Graunke
492693c0a5 i965: Don't fill buffer with zeroes.
This was only necessary because our bounds checking was off by one, and
thus we read an extra pair of values.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-03-06 08:27:54 -08:00
Kenneth Graunke
89e5c8e0fa i965: Fix off-by-one in query object result gathering.
If we've written N pairs of values to the buffer, then last_index = N,
but the values are 0 .. N-1.  Thus, we need to use <, not <=.

This worked anyway because we fill the buffer with zeroes, so we just
added an extra (0 - 0) to our results.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-03-06 08:27:47 -08:00
Christian König
886c5085e3 radeon/llvm: fix trivial warnings
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-03-06 12:08:54 +01:00
Christian König
a212483437 radeonsi: fix trivial warning
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-03-06 12:07:40 +01:00
Eric Anholt
88b20d5834 intel: Improve the matching (more formats!) for TexImage from PBOs.
Mesa core is the place for encoding what format/type matches a mesa
format, so rely on that.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-03-05 16:02:38 -08:00
Eric Anholt
731d474d98 intel: Improve the test for readpixels blit path format checking.
We were allowing things like copying RG1616 to a user's ARGB8888
format, while we were denying anything that wasn't ARGB8888 or
RGB565.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-03-05 16:02:38 -08:00
Eric Anholt
3c7e96ff01 intel: Fold intel_region_copy() into its one caller.
This is similar code to intel_miptree_copy_slice, but the knobs
are all set differently.

v2: fix whitespace

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-03-05 16:02:38 -08:00
Eric Anholt
7604debabb intel: Transition intel_region_map() to being a miptree operation.
I'm trying to move us away from the region structure, and all the
callers are currently dereferencing a miptree to get the region.

In this change, the map_refcount is dropped.  However, the bo->virtual is
itself map refcounted, so that's already dealt with.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-03-05 16:02:38 -08:00
Eric Anholt
f4f288f317 intel: Remove num_mapped_regions tracking.
The point of tracking the value was removed in February 2012
(65b096aedd), and this should have
been removed at the same time.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-03-05 16:02:38 -08:00
Eric Anholt
3c9532314c intel: Remove the struct intel_region reuse hash table.
I don't see any reason for it -- it was introduced with the DRI2
invalidate work by krh in 2010 with no explanation.  I suspect it was
something about wanting the same drm_intel_bo struct underneath multiple
openings of the BO within one process, but that's covered by libdrm at
this point.  As far as the struct region goes, it is not threadsafe, so
multiple contexts sharing a region could have mixed up the map_count and
assertion failed or worse.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-03-05 16:02:37 -08:00
José Fonseca
e77234be39 scons: Provide shorthand aliases for software winsyses. 2013-03-05 23:06:13 +00:00
Eric Anholt
65afa11dc6 mesa: Remove the special enum for _mesa_error debug output.
Now all the per-message enums from mtypes are gone.  Now we can extend
unique message IDs into all generators of debug output without having to
update mtypes.h for each one.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:25:01 -08:00
Eric Anholt
d9249935db mesa: Remove the enum for the oom-within-debug-output case.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:25:01 -08:00
Eric Anholt
6816f67de6 mesa: Remove now-unused gl_winsys_error and gl_shader_error enums.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:25:00 -08:00
Eric Anholt
c72cf53817 mesa: Report ARB_debug_output for both shader errors and warnings.
This ends up reusing the dynamic ID support, so a silly enum gets to go
away.  We don't assign good IDs to different messages yet, but at least
that's tractable now.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:25:00 -08:00
Eric Anholt
f0a191ca0f intel: Add missing perf debug for a stall on mapping a BO.
I was testing the ARB_debug_output code and wrote an obvious sample that
should have hit this, and got confused that my ARB_debug_output was
broken.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:25:00 -08:00
Eric Anholt
14cec07177 i965: Make perf_debug() output to GL_ARB_debug_output in a debug context.
I tried to ensure that performance in the non-debug case doesn't change
(we still just check one condition up front), and I think the impact is
small enough in the debug context case to warrant including all of it.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:25:00 -08:00
Eric Anholt
0a1c6bcfb0 intel: Finish renaming fallback_debug() to perf_debug().
They're about to change to handle GL_ARB_debug_output, so just make one
function.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:25:00 -08:00
Eric Anholt
807eedf70f intel: Hook up the WARN_ONCE macro to GL_ARB_debug_output.
This doesn't provide detailed error type information, but it's important
to get these relatively severe but rare error messages out to the
developer through whatever mechanism they are using.

v2: Rebase on new WARN_ONCE additions.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (v1)
2013-03-05 14:25:00 -08:00
Eric Anholt
3025680578 mesa: Add support for GL_ARB_debug_output with dynamic ID allocation.
We can emit messages now without always having to use the same ID for
each, or having a giant table of all possible errors in mtypes.h.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:24:59 -08:00
Eric Anholt
7beb93456d mesa: Merge handling of application-provided and built-in error sources.
I want to have dynamic IDs so that we don't need to add to mtypes.h for
every error we might want to add.  To do so, I need to get rid of the
static arrays and actually support all the crazy filtering of dynamic IDs
that we already support for application-provided error sources.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:24:59 -08:00
Eric Anholt
88831a8d99 mesa: Fix _mesa_problem() on context destroy after application debug output
This was apparently not noticed because we don't have any testing of
application-generated debug output.  However, as I'm changing the
GL-generated debug output to use the same path as
application/middleware-generated debug output, this obviously became an
issue.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:24:59 -08:00
Eric Anholt
e0d1e3b785 mesa: Move debug type/severity enums to mesa core.
These will get reused by new ARB_debug_output messages in drivers/core,
instead of having the caller pass GL enums and have us immediately
switch-statement those into enums.

Add source enums will be handled in the next commit, because the way
different sources are handled at the moment is pretty strange.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:24:59 -08:00
Eric Anholt
c42148d16e mesa: Replace open-coded _mesa_lookup_enum_by_nr().
The new one doesn't have the same behavior for GL_NO_ERROR, but we don't
produce errors with GL_NO_ERROR as the error type.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:24:59 -08:00
Eric Anholt
e022461c64 mesa: Remove extra #define MAXSTRING duplicating MAX_DEBUG_MESSAGE_LENGTH.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-05 14:24:59 -08:00
Marcin Slusarz
f4ebcd133b dri/nouveau: NV17_3D class is not available for NV1a chipset
Should fix https://bugs.freedesktop.org/show_bug.cgi?id=60510

Note: this is a candidate for the stable branches

Acked-by: Francisco Jerez <currojerez@riseup.net>
2013-03-05 21:19:17 +01:00
Roland Scheidegger
b9eb573600 tgsi: handle projection modifier for array textures.
This partly reverts 6ace2e41da.
Apparently with GL_MESA_texture_array fixed-function texturing
with texture arrays is possible, and hence we have to handle TXP.
(Though noone seems to know the semantics, softpipe now does what
it did before, which is to NOT project the array coord, llvmpipe
for instance however indeed does project the array coord. Unlike
before it will project the comparison coord for shadow1d array, as
that clearly was an error.)
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=61828.

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-03-05 20:10:37 +01:00
Roland Scheidegger
be6d18ba5e st/mesa: translate ir offset parameters for non-TXF opcodes.
Otherwise the state tracker will crash if the texture instructions
have offsets.

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-03-05 20:10:37 +01:00
Alan Hourihane
196443f3f5 Add missing GL_TEXTURE_CUBE_MAP entry in _mesa_legal_texture_dimensions
This was hit on the glTexStorage2D() path.

Note: this is a candidate for the stable branches

Signed-off-by: Alan Hourihane <alanh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-03-05 17:22:44 +00:00
Jon TURNEY
87fdcd87b1 Fix out-of-tree build of 'make check' in src/mesa/main/tests
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-03-05 13:33:16 +00:00
Dave Airlie
e21460b4d5 u_blitter: don't create illegal shaders for 1D/3D/RECT/CUBE MSAA
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-03-04 22:23:08 +00:00
Brian Paul
b1390c7992 mesa: flush current state when querying GL_EDGE_FLAG
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=61395

Note: This is a candidate for the stable branches.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-03-04 08:41:45 -07:00
Jakub Bogusz
e29124717e vdpau-softpipe: Build correct source file - vl_winsys_xsp.c
Copy-and-paste problem introduced by commit 7f24483e.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-03-03 22:53:26 -08:00
Kenneth Graunke
b88f74d63d i965: Fix Crystal Well PCI IDs.
The second digit was off by one, which meant we accidentally treated
GTn as GT(n-1).  This also meant no support for GT1 at all.

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-03-03 13:53:58 -08:00
Vincent Lejeune
83e7d111af r600g: Check comp_mask before merging export instructions
Fixes a llvm uncovered (rare) bug where consecutive exports were
merged even if they have incompatible mask.
2013-03-03 21:39:51 +01:00
Vadim Girlin
138b5b9a12 r600g: fix check_and_set_bank_swizzle for cayman
Tested-by: Vincent Lejeune <vljn at ovi.com>
Reviewed-by: Vincent Lejeune <vljn at ovi.com>
2013-03-03 21:38:49 +01:00
Brian Paul
0b6e72f8d7 st/mesa: add switch case for ir_txf_ms to silence warning
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-03-02 05:52:40 -07:00
Brian Paul
2ea0e30bed mesa: add switch case for ir_txf_ms to silence warning
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-03-02 05:52:28 -07:00
Kenneth Graunke
cf0c0a7782 i965: Pull query BO reallocation out into a helper function.
We'll want to reuse this for non-occlusion queries in the future.

Plus, it's a single logical task, so having it as a helper function
clarifies the code somewhat.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-03-01 22:09:04 -08:00
Kenneth Graunke
961c9b8cac i965: Replace the global brw->query.bo variable with query->bo.
Again, eliminating a global variable in favor of a per-query object
variable will help in a future where we have more queries in hardware.

Personally, I find this clearer: there's just the query object's BO,
rather than two variables that usually shadow each other.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-03-01 22:09:04 -08:00