Commit Graph

45969 Commits

Author SHA1 Message Date
Brian Paul 005aea891e g3dvl: s/inline/INLINE/ to fix MSVC build 2011-08-26 08:24:01 -06:00
Brian Paul b59715b13a g3dvl: fix compilation failure on MSVC
I assume the intention of "mb = {}" was to zero-initialize it.
2011-08-26 08:11:50 -06:00
Brian Paul cdb7396390 scons: don't compile some files with -gstabs if using mingw32
Compiling some (large) files with i686-pc-mingw32-gcc 4.2.2 (at least)
and the -gstabs option triggers a compiler error.  Use this work-around
to simply compile the effected files without -gstabs.
2011-08-26 08:05:36 -06:00
Brian Paul 3d1af78fdc scons: add more LIBS for compiling with LLVM 2.9 on Windows
These extra libs shouldn't hurt with LLVM 2.8 or older.
2011-08-26 08:05:35 -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 31096e13f8 g3dvl: Use a single texture for luma and chroma data
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
Dave Airlie 6fb12bf031 tgsi: update tgsi.rst for TXQ
add some info on the TXQ opcode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-26 11:04:15 +01:00
David Reveman a2c467c054 i915g: Fix off-by-one in scissors. 2011-08-25 22:57:48 -07:00
Stéphane Marchesin 3d9000393b i915g: Fix case where texcoords can overlap with fragpos/frontface. 2011-08-25 22:57:48 -07:00
Stéphane Marchesin b97889f543 i915g: Improve the flush heuristic by using the previous frame's number of vertices. 2011-08-25 22:57:48 -07:00
Vadim Girlin fdb62ef3f5 r600g: fix replace_gpr_with_pv_ps
Instructions with 3 source operands have no write mask, so we may replace their
destinations with PV/PS in the next group even if their dst.write is 0.

Note: This is a candidate for the 7.11 branch.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-25 16:59:10 -04:00
Vadim Girlin 6ba68c7654 r600g: fix check_and_set_bank_swizzle
Need to do full check when not all bank swizzles in the group are forced
(e.g. when trying to merge interp_* group with the next instruction)

Note: This is a candidate for the 7.11 branch.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-25 16:58:06 -04:00
Kenneth Graunke 778ecc9283 glcpp: Add GL_ARB_conservative_depth #define.
Forgotten in the patch that enabled the extension.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-25 13:14:24 -07:00
Ian Romanick 116680ddc2 i965: Remove all bits of NRM3 and NRM4 code
Nothing in Mesa generates these opcodes, and i965 hardware cannot
support it natively.  If support were ever added for this opcode in
Mesa, there had better be a lowering pass for hardware that doesn't
support it natively.
2011-08-25 13:12:21 -07:00
Dave Airlie 8ce716257a glsl: fix crash when a const is passed to texelFetchOffset
while debugging texelFetchOffset we kept hitting the assert.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-25 21:07:42 +01:00
Kenneth Graunke c25b494332 glsl: Bail after reporting an error for non-constant const_in parameters.
Otherwise we continue and hit the "Illegal formal parameter mode"
assertion.

Fixes negative compile test texelFetchOffset.frag in piglit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-25 21:07:42 +01:00
Brian Paul 27395cb5b6 pp: add files to Makefile.sources 2011-08-25 10:36:59 -06:00
Brian Paul 6571c0774a Merge branch 'kasanen-post-process-v2'
Conflicts:
	src/gallium/auxiliary/Makefile
	src/gallium/auxiliary/SConscript
2011-08-25 10:12:12 -06:00
Brian Paul e3a7cb4a6c softpipe: add const qualifier to silence warnings 2011-08-25 10:08:15 -06:00
Dave Airlie 5f3de17ef0 glsl_to_tgsi: add TXF support. (v2)
This adds texelFetch support to translate from GLSL to TGSI TXF opcode.

I've tested this works with an r600g and softpipe backend.

v2: drop comments, fix title,

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
2011-08-25 16:54:20 +01:00
Dave Airlie 62ad6e66a5 softpipe: implement TXF support via get_texel callback
This just calls the texel fetch functions directly bypassing the sampling,

notes:
1: loops inside switch should be more optimal.
2: borders can be sampled though only up to border depth, outside that
its undefined.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-25 16:54:20 +01:00
Dave Airlie d562f97bef tgsi: add TXF support.
This is a straight texel fetch with no filtering or clamping. It uses
integers to specify the i/j/k (from EXT_gpu_shader4).

To enable this I had to add another hook into the tgsi sampler so that
we could easily bypass all the filtering sample does.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-25 16:54:20 +01:00
Dave Airlie 515d9e8880 glsl_to_tgsi: implement TXS/TXQ. (v2)
GLSL uses TXS, call the gallium TXQ opcode.

v2: fix indent from 4->3.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
2011-08-25 16:49:20 +01:00
Dave Airlie 461646f539 softpipe: add get_dims callback for TXQ support. (v2)
This adds the get_dims callback that is called from the tgsi exec_txq.

It returns values as per EXT_gpu_program4.

v2: fix one indent + use a switch (slighty modified from Brian)

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-25 16:49:20 +01:00
Dave Airlie 7f1b9ddd12 tgsi: add TXQ support. (v2)
this adds another callback in the sampler struct containing get_dims
entry point. This is used to query the driver for the texture resource
dimensions for the resource bound to the current sampler.

v2: remove unusued variable, fix indent

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-25 16:49:20 +01:00
Kenneth Graunke b9eb4d8a59 glsl: Implement the GL_ARB_conservative_depth extension.
It's the same as GL_AMD_conservative_depth.  The specs have slight
differences in wording, but don't differ in content or behavior.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-25 08:07:21 -07:00
Kai Wasserbäch dbec3a5daf Document the return type coding style.
As per discussion at [0] methods shouldn't use OpenGL return types, if
they're not part of the GL API.

[0] <http://marc.info/?l=mesa3d-dev&m=130754488901774&w=2>

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2011-08-25 07:21:00 -07:00
Kai Wasserbäch 79a486ead9 Change return type of try_emit_* methods to bool.
Ian Romanick explained (Message-Id: <4E528973.6080902@freedesktop.org>),
that the return type of non-API methods shouldn't use GLboolean but a
standard C++ bool.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
2011-08-25 07:21:00 -07:00
Christoph Bumiller 55592d9da1 d3d1x: save to correct slot in xs_set_constant_buffers 2011-08-25 12:52:35 +02:00
Christoph Bumiller 974412d7b9 d3d1x: fix xs_set_samplers 2011-08-25 12:34:23 +02:00
Chia-I Wu 7b1972d7be android: add support for r600g
Tested with a Radeon HD 6250.  SurfaceFlinger (the display server and
compositor) works.  2D apps with RGB or RGBA visuals work.  As for 3D
apps, some work but some don't (with serious rendering defects).

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-25 08:54:16 +08:00
Chia-I Wu 689b45fb27 winsys/radeon: share the source list
Factor out C_SOURCES from Makefile to Makefile.sources, and let
Makefile and SConscript share it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-25 08:54:16 +08:00
Chia-I Wu 027a45e5cf winsys/r600: share the source list
Factor out C_SOURCES from Makefile to Makefile.sources, and let
Makefile and SConscript share it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-25 08:54:16 +08:00
Chia-I Wu 8dda3f2bcb r600g: share the source list
Factor out C_SOURCES from Makefile to Makefile.sources, and let
Makefile and SConscript share it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-25 08:54:16 +08:00
Ian Romanick 707d614d10 glsl: Make sure that Extensions.dummy_true is set to true
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
2011-08-24 14:33:31 -07:00
Brian Paul 038d654bcb vbo: remove unused var, remove unneeded local var 2011-08-24 14:50:28 -06:00
Brian Paul 473cf06339 llvmpipe: add more restrict keywords
Put restrict in the function definitions to silence MSVC warnings
about incompatible assignments in "func = lp_tile_foobar;" when func
was declared with restrict keywords but the rhs function wasn't.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2011-08-24 14:45:02 -06:00
Paul Berry 43968261e4 docs: Document coding style conventions
This patch documents some Mesa coding style conventions that came up
during the discussion of commit 67b5a32 (Perform implicit type
conversions on function call out parameters).
2011-08-24 10:55:12 -07:00
Brian Paul ddd6e5b8bc swrast: Remove swrast eject/validate texture image code.
No driver used the eject function, or set the validate hook that made
that function do anything.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-08-24 10:43:20 -07:00
Eric Anholt 4990e7e9fb radeon: Fix flushing before writing a teximage's BO when !t->bo.
Before, if we ended up here without a BO for our image, but did choose
a miptree that had active rendering in the command buffer, our
teximage data would jump ahead of the rendering using the old texture
contents.

This showed up as breakage in gen-teximage and friends in the
following commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-08-24 10:43:20 -07:00
Brian Paul 6dbad425bc st/mesa: remove st_texture_image::face,level fields
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-08-24 10:43:20 -07:00
Brian Paul 7dae1aaf14 intel: use new gl_texture_image:Face, Level fields
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-08-24 10:43:20 -07:00
Brian Paul a231d24551 mesa: add gl_texture_image::Face, Level fields
Several drivers have these fields in their subclasses of gl_texture_image.
They'll be useful for core Mesa too...

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-08-24 10:43:19 -07:00
Brian Paul c3ad95ed40 x11: add missing comma to fix compilation 2011-08-24 07:55:04 -06:00
Dave Airlie cc9a8915f0 r600g: fill out missing entries in opcode tables.
this just adds the missing opcodes as unsupported.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-24 13:30:53 +01:00