Commit Graph

795 Commits

Author SHA1 Message Date
Chia-I Wu 5c31eb78e5 gallium: add PIPE_FORMAT_ETC1_RGB8
The format is defined by GL_OES_compressed_ETC1_RGB8_texture.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2011-12-02 08:43:46 +08:00
José Fonseca 10b07665be Remove windows kernel support code.
Not actively used.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-29 17:34:56 +00:00
Dave Airlie ee7bc10391 gallium: add B10G10R10A2_UINT format
This format is used for ARB_texture_rgb10_a2ui extension.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-27 16:25:12 +00:00
Brian Paul 12dd5dedf5 gallium: remove trailing comma and unneeded comments in p_defines.h 2011-11-22 17:08:36 -07:00
Marek Olšák bb71f9249a gallium: separate out floating-point CAPs into its own enum
The motivation behind this is to add some self-documentation in the code
about how each CAP can be used.

The idea is:
- enum pipe_cap is only valid in get_param
- enum pipe_capf is only valid in get_paramf

Which CAPs are floating-point have been determined based on how everybody
except svga implemented the functions. svga have been modified to match all
the other drivers.

Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
2011-11-22 20:56:50 +01:00
Marek Olšák 2a0126932b gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionally
Only i965g does not enable GLSL, but that driver has been unmaintained and
bitrotting for quite a while anyway.
2011-11-22 20:56:50 +01:00
Vadim Girlin 40864b85aa gallium: add PIPE_SHADER_CAP_OUTPUT_READ
It's intended to indicate whether the driver/hardware supports reading
of the values written into shader outputs.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-21 17:38:37 -05:00
Christoph Bumiller e7ccd703a2 gallium: add TGSI_SEMANTIC_VERTEXID 2011-11-14 18:12:46 +01:00
Maarten Lankhorst eadbcb221d state_trackers/vdpau: Add support for VC-1 decoding
Add a struct with all the fields.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-11-03 13:52:01 +01:00
Maarten Lankhorst 12bf452945 state_trackers/vdpau: Add support for MPEG4 Part 2
Just the support patch, no decoder implements it currently.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-11-03 13:52:01 +01:00
Maarten Lankhorst c4d47f065a state_trackers/vdpau: Add num_slices to mpeg12 picture structure
Bitstream parsers might need that field.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-11-03 13:52:01 +01:00
Alan Coopersmith b27298055e Add solaris detection for PIPE_ARCH_LITTLE_ENDIAN/PIPE_ARCH_BIG_ENDIAN
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-20 17:02:12 -07:00
Christoph Bumiller 10f67c070b gallium: add new query types and missing documentation 2011-10-20 18:03:23 +02:00
Christoph Bumiller a4f26f2bea gallium: add PIPE_BIND_BLENDABLE flag
This is required for an accurate implementation of d3d1x's
CheckFormatSupport query.

It also seems generally useful for state trackers, which could
choose alternative rendering paths or formats if blending would
come at a significant performance loss.
2011-10-15 14:12:31 +02:00
Thomas Hellstrom ec7d5b8c02 drm_driver: Add a configuration function to the driver descriptor.
Adds a possibility for the state tracker manager to query the
target for a specific configuration.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-14 09:53:05 +02:00
Dave Airlie 866f9b18c6 gallium: rename ZS stencil type to UINT (v2)
these are never USCALED, always UINT in reality.

taken from some work by Christoph Bumiller

v2: fixup formatting of table + tabs

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-11 16:13:29 +01:00
Dave Airlie a441feb757 gallium: add initial pure integer support (v2)
This add support for unsigned/signed integer types via adding a 'pure' bit
in the format description table. It adds 4 new u_format get/put hooks,
for get/put uint and get/put sint so that accessors can get native access
to the integer bits. This is used to avoid precision loss via float converting
paths.

It doesn't add any float fetchers for these types at the moment, GL doesn't
require float fetching from these types and I expect we'll introduce a lot
of hidden bugs if we start allowing such conversions without an API mandating
it.

It adds all formats from EXT_texture_integer and EXT_texture_rg.

0 regressions on llvmpipe here with this.

(there is some more follow on code in my gallium-int-work branch, bringing
 softpipe and mesa to a pretty integer clean state)

v2: fixup python generator to get signed->unsigned and unsigned->signed
fetches working.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-08 17:44:59 +01:00
Marek Olšák ba89086e79 gallium: add PIPE_CAP_TEXTURE_BARRIER
Same issue as with conditional_render.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-30 23:19:52 +02:00
Marek Olšák 3d13b081c7 gallium: add PIPE_CAP_CONDITIONAL_RENDER
We were checking whether render_condition is set. That was not reliable,
because it's always set with trace and noop regardless of driver support.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-30 23:19:52 +02:00
Marek Olšák f5bfe54a34 gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS
This removes:
- PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS
- PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS
in favor of the that new per-shader cap.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-30 23:19:52 +02:00
Marek Olšák 557c3febdf gallium: remove PIPE_CAP_TEXTURE_MIRROR_REPEAT
All drivers support it (well, except Cell). The boolean option is going away
from core Mesa too.

This is a follow-up to Ian Romanick's patch
"mesa: Remove ARB_texture_mirrored_repeat extension enable flag".

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-30 23:19:52 +02:00
Christoph Bumiller 16f8308c3d gallium: add polygon offset clamp state
This is required for D3D1x and supported by hardware.
2011-09-28 16:28:17 +02:00
Dave Airlie 9f61e43b49 gallium: move border color to be a color union
EXT_texture_integer also specifies border color should be a color
union, the values are used according to the texture sampler format.

(update docs)

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-27 20:02:02 +01:00
Brian Paul 977e269c3e gallium: remove trailing comma to silence warning 2011-09-20 16:36:21 -06:00
Paul Berry 8b06b0d19d Gallium: Increase PIPE_MAX_CLIP_PLANES to 8.
Since Mesa is now capable of supporting up to 8 clipping planes
instead of 6, this patch updates Gallium internals to support 8
clipping planes as well.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-20 14:51:16 -07:00
Dave Airlie 6dd284f7c8 gallium: move clear paths from rgba to a pointer to a color union (v2)
This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values.

Notes:
1. the value is opaque.
2. only when the value is used should it be interpretered according to
the surface format it is going to be used with.
3. float clears on integer buffers and vice-versa are undefined.

v2: fixed up vega and graw, dropped hunks that shouldn't have been in
patch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-18 15:12:47 +01: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
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 d8452a0be8 gallium: add shadow 1D and 2D array samplers to TGSI
And filling in all the switch statements in auxiliary. Mostly untested.
2011-09-10 08:53:29 +02:00
Marek Olšák 3794291372 gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS
v2: remove PIPE_CAP_ARRAY_TEXTURES in favor of the new CAP.
2011-09-10 08:53:29 +02:00
José Fonseca 1cf808c86e Define INLINE macro in terms of inline. 2011-09-08 09:17:42 +01:00
Dave Airlie 797bb0eb47 gallium: add missing formats for ARB_vertex_type_2_10_10_10_rev
This just reorgs one define in csv file, and adds all the new formats
that are needed for this extension.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-05 19:08:17 +01:00
Dave Airlie 0b666106c5 gallium: add caps for MIN/MAX texel offsets.
As per Brian's suggestion, add caps for drivers that support texture
offsets to advertise a min/max via TGSI, also use it in the state tracker.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-02 10:48:09 +01:00
Dave Airlie 2083a276eb tgsi: add support for texture offsets to the TGSI IR. (v2)
This adds tokens for texture offsets, to store 4 * swizzled vec 3
for use in TXF and other opcodes.

It also contains TGSI exec changes for softpipe to use this code,
along with GLSL->TGSI support for TXF.

v2: add some more comments, add back padding I removed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-02 10:47:45 +01:00
Christian König 23f01fd31c gallium: add R8A8 and A8R8 UNORM formats
They are mostly used for menu overlay in video decoding.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-09-01 19:20:46 +02:00
Christian König cf49c49d0e gallium: try to cleanup a bit of the format mess created with pipe-video merge
Start with correctly defining IA44 and AI44 formats.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-09-01 19:20:46 +02:00
Kai Wasserbäch 51ecb33c6b include/pipe: Fix include style
As explained in the thread starting at [0], the internal include style
should be »#include "path/to/header.h"« for non-system includes.

[0]
<http://news.gmane.org/find-root.php?message_id=%3c4E5802BE.6020206%40vmware.com%3e>

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-08-29 08:02:55 -06:00
Christian König 9765dede75 g3dvl: Rewrite the mpeg 1&2 bitstream parser
Based on work of Maarten Lankhorst this time.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:35 +02:00
Christian König 2e62b30826 g3dvl: Rework the decoder interface part 5/5
Make setting the quant matrixes a generic interface.
Also removes setting the quant matrix from the XvMC interface

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König 835ea8480f g3dvl: Rework the decoder interface part 4/5
Make the picture_structure enum spec complient.
Also remove it from the compositor.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König d3770d6229 g3dvl: Rework the decoder interface part 3/5
Revert back to a macroblock based interface. The structure used
tries to keep as close to the spec as possible.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König 231fce7d63 g3dvl: Rework the decoder interface part 2/5
Implement PIPE_CAP_NUM_BUFFERS_DESIRED giving the decoder control over
the number of buffers a state tracker should allocate.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König 1d1d038c85 g3dvl: Rework the decoder interface part 1/5
First of all get ride of the decode_buffer structure, while still giving
the decoder the ability to organize it's buffers depending on the needs
of the state tracker.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Chia-I Wu cd893ccba9 gallium: add PIPE_OS_ANDROID support
Android uses Linux kernel and its own C runtime.  It resembles
PIPE_OS_LINUX a lot with some minor exceptions.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-21 02:01:48 +08:00
Brian Paul 7d4d8a8de7 gallium: silence warnings about trailing commas in enum lists 2011-08-08 09:00:06 -06:00
Bryan Cain 4683529048 Merge branch 'glsl-to-tgsi'
Conflicts:
	src/mesa/state_tracker/st_atom_pixeltransfer.c
	src/mesa/state_tracker/st_program.c
2011-08-04 15:43:34 -05:00
Christoph Bumiller 94822c6d83 gallium: extend resource_resolve to accommodate BlitFramebuffer
Resolve via glBlitFramebuffer allows resolving a sub-region of a
renderbuffer to a different location in any mipmap level of some
other texture, and, with a new extension, even scaling. Therefore,
location and size parameters are needed.

The mask parameter was added because resolving only depth or only
stencil of a combined buffer is possible as well.

Full information about the blit operation allows the drivers to
take the most efficient path they possibly can.
2011-08-04 15:38:49 +02:00
Bryan Cain 17b695e6e7 gallium: add PIPE_SHADER_CAP_INTEGERS 2011-08-01 17:59:07 -05:00
Jeremy Huddleston 5b3c719983 darwin: Use machine/endian.h to determine endianness
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-31 09:43:52 -07:00
Jeremy Huddleston e737a99a6f Fix PPC detection on darwin
Fixes regression introduced by 7004582c18

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-31 09:24:35 -07:00