Commit graph

40817 commits

Author SHA1 Message Date
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
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
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
Chia-I Wu
1284d5b255 winsys/svga: use os_mmap() for memory mapping
os_mmap() guarantees large file support across OSes.
2011-08-24 10:57:12 +08:00
Chia-I Wu
70b1837dfb winsys/radeon: use os_mmap() for memory mapping
os_mmap() guarantees large file support across OSes.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-24 10:57:12 +08:00
Chia-I Wu
9bda86c355 auxiliary/os: add wrappers for mmap/munmap
The use of mmap() in winsys requires large file support.  Not all OSes
have LFS so a wrapper should be used.  In particular, os_mmap() should
call __mmap2() on Android.
2011-08-24 10:57:12 +08:00
Ian Romanick
0d636213d4 i965: Only map the necessary buffer range in brw_prepare_indices
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-08-23 14:52:12 -07:00
Ian Romanick
2ea1ff3816 tnl: Only map the necessary buffer range in bind_indices
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-08-23 14:52:12 -07:00
Ian Romanick
655c7d7498 mesa: Only map the necessary buffer range in vbo_get_minmax_index
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-08-23 14:52:11 -07:00
Ian Romanick
28249bd260 mesa: Eliminate dd_function_table::MapBuffer
Replace all calls to dd_function_table::MapBuffer with appropriate
calls to dd_function_table::MapBufferRange, then remove all the cruft.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-08-23 14:52:11 -07:00
Ian Romanick
cccc7412c2 radeon: Hack up an implementation of MapBufferRange
This doesn't implement any of the "cool" features of MapBufferRange.
Adding this function is necessary for the next commit in the series.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Cc: Maciej Cencora <m.cencora@gmail.com>
2011-08-23 14:52:11 -07:00
Ian Romanick
b2184da684 mesa: Fix incorrect access parameter passed to MapBuffer
The code previously passed GL_DYNAMIC_DRAW for the access parameter.
By inspection, I believe that all drivers would treat this as
GL_READ_WRITE because it's not GL_READ_ONLY and it's not
GL_WRITE_ONLY.

It appears the i965 code wants GL_WRITE_ONLY (it's about to write a
bunch of data in, never read data), while the arrayelt code is
GL_READ_ONLY (just dereffed as arguments to CALL_Whatever*v).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Whitwell <keithw@vmware.com>
2011-08-23 14:52:10 -07:00
Ian Romanick
6183edc070 mesa: Remove target parameter from dd_function_table::FlushMappedBufferRange
No driver used that parameter, and most drivers ended up with a bunch
of unused-parameter warnings because it was there.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-08-23 14:52:10 -07:00
Ian Romanick
f973be59fa intel: Correctly check for read-only mappings in intel_bufferobj_map_range
The old code was an obvious cut-and-paste fail from intel_bufferobj_map.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2011-08-23 14:52:10 -07:00
Ian Romanick
4ddae2fb66 mesa: Remove target parameter from dd_function_table::MapBufferRange
No driver used that parameter, and most drivers ended up with a bunch
of unused-parameter warnings because it was there.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-08-23 14:52:10 -07:00
Ian Romanick
6c8aa3491a mesa: Remove target parameter from dd_function_table::GetBufferSubData
No driver used that parameter, and most drivers ended up with a bunch
of unused-parameter warnings because it was there.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-08-23 14:52:09 -07:00