Commit graph

46388 commits

Author SHA1 Message Date
Christoph Bumiller
57594065c3 nv50/ir: import new shader backend code 2011-09-14 16:19:52 +02:00
Christoph Bumiller
a42eca84c5 nvc0: prevent interruption of m2mf push
M2MF will trap if the data stream is interrupted by a QUERY fence
and report too much or not enough data.
2011-09-14 16:19:52 +02:00
Christoph Bumiller
150bb0fb34 nouveau: make data argument of nouveau_context::push_data const 2011-09-14 16:19:51 +02:00
Brian Paul
ec22b75be1 softpipe: implement blend color clamping
Per the GL spec, clamp incoming colors prior to blending depending on
whether the destination buffer stores normalized (non-float) values.
Note that the constant blend color needs to be clamped too (we always
get the unclamped color from Mesa).

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412
2011-09-14 08:15:59 -06:00
Brian Paul
4fc50d4570 mesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()
Add a comment and reformat to be under 80 columns.
2011-09-14 08:15:59 -06:00
Brian Paul
4d21ecde77 mesa: white space, comment fixes in mtypes.h
"vale" was a typo.  Fix that and do some other minor clean-ups.
2011-09-14 08:15:59 -06:00
Emeric Grange
e911dbb563 st/vdpau: Preliminary support for timestamped output surface into the presentation queue
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:29 +02:00
Emeric Grange
6cf0581159 st/vdpau: Output surfaces that are too large to fit into the display target will be clipped
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00
Emeric Grange
85534e6f48 st/vdpau: Add get_clear_color capability
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00
Emeric Grange
fa2a8316ce st/vdpau: Add documentation from the VDPAU API and update some traces
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00
Emeric Grange
c24bc6f868 st/vdpau: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:16 +02:00
Emeric Grange
87e84a2dbf nouveau: Add max_references parameter to vl_create_decoder()
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
2011-09-14 15:49:16 +02:00
Emeric Grange
82e8bf36d8 g3dvl: Add max_references parameter to vl_create_decoder()
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
2011-09-14 15:49:15 +02:00
Emeric Grange
42fddacaba g3dvl: Add get_clear_color capability
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:15 +02:00
Emeric Grange
02e191cb6a g3dvl: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
2011-09-14 15:49:15 +02:00
Dave Airlie
81a86aea4f mesa/colormac: introduce inline helper for 4 unclamped float to ubyte.
This introduces an UNCLAMPED_FLOAT_TO_UBYTE x 4 inline function, as
suggested by Brian. It uses it in a few places I noticed from previous
color changes, and also some core mesa places. I haven't updated other places
yet.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-14 11:18:08 +01:00
Dave Airlie
093dc9e548 mesa: introduce a clear color union to be used for int/unsigned buffers
This introduces a new gl_color_union union and moves the current
ClearColorUnclamped to use it, it removes current ClearColor completely and
renames CCU to CC, then all drivers are modified to expected unclamped floats instead.

also fixes st to use translated color in one place it wasn't.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-14 11:18:07 +01:00
Brian Paul
b06613c6cc st/mesa: fix incorrect debug output
format and type are not GL enums here.
2011-09-13 09:30:33 -06:00
Brian Paul
0ebf83b731 gallivm: remove unused vars 2011-09-13 08:16:01 -06:00
Brian Paul
52b9ec727b gallium: minor comments for util_format_channel_description fields 2011-09-13 08:14:31 -06:00
Marcin Slusarz
f626d99edf nv50/nvc0: add support for R4A4_UNORM and A4R4_UNORM formats
R4A4 is needed by OSD in mplayer's xvmc output
2011-09-13 15:28:00 +02:00
Marek Olšák
8dbf9d70d3 r600g: fix typo in "r600g: simplify deducing chip family" 2011-09-13 13:09:17 +02:00
Dave Airlie
1ab4e221fd mesa/pack: don't apply transfer operations to integer format buffers. (v3)
The EXT_texture_integer issues says:

Should pixel transfer operations be defined for the integer pixel
path?

RESOLVED: No.  Fragment shaders can achieve similar results
with more flexibility.  There is no need to aggrandize this
legacy mechanism.

v2: fix comments, fix unpack paths, use same comment/code
v3: fix last comment

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-13 09:43:23 +01:00
Marek Olšák
f97acf4015 r600g: remove unused function r600_buffer_from_handle 2011-09-12 22:03:03 +02:00
Marek Olšák
12325b7962 r600g: remove an irrelevant XXX comment 2011-09-12 22:03:03 +02:00
Marek Olšák
9f0dc855b2 r600g: remove r600_resource_buffer struct
This subclass of r600_resource doesn't contain any useful members,
so let's just use r600_resource.
2011-09-12 22:03:03 +02:00
Marek Olšák
ac028b20e5 r600g: set the return type of radeon_destroy to void 2011-09-12 22:03:03 +02:00
Marek Olšák
b87bc2eb44 r600g: remove r600_drm_public.h 2011-09-12 22:03:03 +02:00
Marek Olšák
1a532ca79a r600g: inline some of the winsys r600_get functions 2011-09-12 22:03:03 +02:00
Marek Olšák
915227b0aa r600g: simplify deducing chip family 2011-09-12 22:03:03 +02:00
Marek Olšák
3603d15788 r600g: compute tiling info in the pipe, not in the winsys
The winsys doesn't need it.
2011-09-12 22:03:02 +02:00
Marek Olšák
a94e33a8ef r600g: remove unused ioctl definitions 2011-09-12 22:03:02 +02:00
Marek Olšák
d26b49f87f r600g: do not loop in radeon_family_from_device
Also move that function to r600_drm.c
2011-09-12 22:03:02 +02:00
Marek Olšák
85f5d7ceee r600g: cleanup build include dirs and dependencies
The scons build still depended on libdrm_radeon.
2011-09-12 22:03:02 +02:00
José Fonseca
fb5995cf53 scons: Don't use gstabs on mingw-64. 2011-09-12 17:23:47 +01:00
Marek Olšák
f37a5081b2 st/mesa: clamp Max program param limits
Setting just MAX_PROGRAM_ENV_PARAMS to 4096 breaks everything,
so let's do this instead.

This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=40767

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-12 16:55:21 +02:00
Marek Olšák
4682e70601 pb_buffer: inline 'base' sub-struct 2011-09-11 18:29:27 +02:00
Marek Olšák
2154c672b3 r300g: handle the new CAPs 2011-09-11 15:47:23 +02:00
Emil Velikov
f0bfc0daa8 tgsi: fix typo in commit 324ac982d8
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
2011-09-10 14:09:29 -05:00
Maarten Lankhorst
1465dc26a5 nouveau: Add support for XvMC acceleration
Try to use the PMPEG where available

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-09-10 14:22:11 -04:00
Bryan Cain
10dbd02927 glsl_to_tgsi: use UARL instead of I2F and ARL
Since TGSI now has a UARL opcode that takes an integer as the source, it is
no longer necessary to hack around the lack of an integer ARL opcode using I2F.
UARL is only emitted when native integers are enabled; ARL is still used
otherwise.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-10 12:46:47 -05:00
Bryan Cain
324ac982d8 gallium: add TGSI opcodes UARL and UCMP
They are needed by glsl_to_tgsi for an efficient implementation using native
integers.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-10 12:46:41 -05:00
Marek Olšák
9222c497f9 mesa: fix more valgrind warnings
==27540== Invalid read of size 4
==27540==    at 0x96277B7: _mesa_make_extension_string (string3.h:144)
==27540==    by 0x9604E78: _mesa_make_current (context.c:1514)
==27540==    by 0x9602A8B: st_api_make_current (st_manager.c:789)
==27540==    by 0x45406E7: ???
==27540==  Address 0xad35b30 is 3,688 bytes inside a block of size 3,691 alloc'd
==27540==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==27540==    by 0x9627641: _mesa_make_extension_string (extensions.c:910)
==27540==    by 0x9604E78: _mesa_make_current (context.c:1514)
==27540==    by 0x9602A8B: st_api_make_current (st_manager.c:789)
==27540==    by 0x45406E7: ???

And:

==28351== Invalid write of size 2
==28351==    at 0x4C087CC: _mesa_make_extension_string (string3.h:144)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351==  Address 0x48dd1f3 is 19 bytes inside a block of size 20 alloc'd
==28351==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==28351==    by 0x4C08711: _mesa_make_extension_string (extensions.c:778)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351==
==28351== Invalid read of size 4
==28351==    at 0x4C087EC: _mesa_make_extension_string (extensions.c:806)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351==  Address 0x48dd1f4 is 0 bytes after a block of size 20 alloc'd
==28351==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==28351==    by 0x4C08711: _mesa_make_extension_string (extensions.c:778)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)

The first part adds 2, because ' ' and '\0' may be written at the end
of the buffer.
2011-09-10 19:40:36 +02:00
Brian Paul
aa77df1355 draw/llvm: combine draw_llvm_generate() and draw_llvm_generate_elts()
These two functions were nearly the same with lots of duplicated code.
Now pass in a boolean 'elts' flag and use a few conditionals to implement
the linear vs. indexed cases.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-09-10 10:34:44 -06:00
Tom Stellard
3d32e58987 r300/compiler: Implement ROUND
According to the GLSL spec, the implementor can decide which way to round
when the fraction is .5.  The r300 compiler will round down.
2011-09-10 06:36:53 -07:00
Marek Olšák
2a5cbc5306 mesa: fix a valgrind warning
==5715== Invalid read of size 4
==5715==    at 0x4AA590B: _mesa_make_extension_string (extensions.c:908)
==5715==    by 0x4A83198: _mesa_make_current (context.c:1514)
==5715==    by 0x4A71CAB: st_api_make_current (st_manager.c:789)
==5715==  Address 0x4795730 is 0 bytes inside a block of size 1 alloc'd
==5715==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==5715==    by 0x4AA5B4C: _mesa_make_extension_string (extensions.c:772)
==5715==    by 0x4A83198: _mesa_make_current (context.c:1514)
==5715==    by 0x4A71CAB: st_api_make_current (st_manager.c:789)
2011-09-10 15:12:54 +02:00
Marek Olšák
7e30216879 st/dri: remove the call to driInitExtensions
The function no longer exists. This fixes Gallium build.
2011-09-10 12:33:02 +02:00
Marek Olšák
6b9a36cc3f r600g: fix shadow rect samplers 2011-09-10 08:53:29 +02:00
Marek Olšák
c8b0b13d40 r600g: use SAMPLE_LB for OPCODE_TXB 2011-09-10 08:53:29 +02:00
Marek Olšák
b37931f69b r600g: enable texture arrays 2011-09-10 08:53:29 +02:00