Commit Graph

7412 Commits

Author SHA1 Message Date
Vadim Girlin b693787fdf r600g: RSQ: clear NEG for operand
Need to clear NEG bit because it applies after ABS, e.g. "RSQ ..., -1"
uses -|1| as operand.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-07-08 17:21:32 -04:00
Vadim Girlin 86f8b4117f r600g: LIT: swap MUL_LIT operands to fix 0^0
For 0^0 case result of "LOG_CLAMPED ...,0" is -MAX_FLOAT, and then result of
"MUL_LIT ...,0,-MAX_FLOAT,..." is -MAX_FLOAT instead of 0 because of special
src1 checks for -MAX_FLOAT. So swap src0/1:
"MUL_LIT ...,-MAX_FLOAT,0,..." to get expected 0, then result of
"EXP_IEEE ...,0" is 1 as expected for LIT.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-07-08 17:21:32 -04:00
Christian König ea78480029 [g3dvl] and finally remove pipe_video_context 2011-07-08 19:22:43 +02:00
Christian König 4e837f557b [g3dvl] move video buffer creation out of video context 2011-07-08 16:56:11 +02:00
Christian König 3bb33c911b [g3dvl] remove the unused priv member from pipe_video_context 2011-07-08 15:07:39 +02:00
Christian König 2ec350ff1d [g3dvl] make pipe_context mandatory for creation pipe_video_context 2011-07-08 12:03:13 +02:00
Christian König 7eca76952b [g3dvl] rename is_format_supported to is_video_format_supported and move it into screen object 2011-07-08 11:20:39 +02:00
Stéphane Marchesin 8c1a2e128e i915g: Make the optimizer more generic. 2011-07-07 21:59:09 -07:00
Christian König f265a19426 [g3dvl] rename get_param to get_video_param and move into screen object 2011-07-07 22:51:45 +02:00
Christoph Bumiller 3069a7eaa5 nv50,nvc0: use screen instead of context for flush notifier
Context may become NULL and we still have to be able to flush
pending fences.
2011-07-07 15:00:12 +02:00
Christoph Bumiller e54354e885 nv50: more formats for nv50_resource_copy_region conversion path
It's not supposed to do conversion, but st sometimes asks us to.
Sometimes conversion is even wrong (e.g. between UNORM and SRGB).

This should now include all formats the 2D engine supports.
2011-07-07 15:00:12 +02:00
Stéphane Marchesin f934c80faf i915g: Apply optimization to ADDS/MUL and only if we're not saturating. 2011-07-07 01:47:33 -07:00
Brian Paul 7a10976adb i915g: move code after declaration 2011-07-06 18:10:00 -06:00
Stéphane Marchesin 31484b068d i915g: Fix optimize so that it actually gets used. 2011-07-06 14:18:24 -07:00
Brian Paul 057a107d44 softpipe: add missing stencil format case in convert_quad_stencil()
Part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=38729

NOTE: This is a candidate for the 7.11 branch
2011-07-06 15:14:27 -06:00
Brian Paul 88349255ce softpipe: minor clean-ups in sp_quad_depth_test.c 2011-07-06 15:14:27 -06:00
Stéphane Marchesin 053af6ac8c i915g: Fix optimization, also make it more generic. 2011-07-06 12:00:47 -07:00
Stéphane Marchesin e53b41f263 i915g: Improve flushing using heuristics. 2011-07-06 02:49:58 -07:00
Stéphane Marchesin 2bc5e0e97b i915g: introduce the tiny shader optimizer. 2011-07-06 02:49:48 -07:00
Stéphane Marchesin cc78eb63cd i915g: Add comment about DDX/DDY. 2011-07-06 02:17:30 -07:00
Stéphane Marchesin 26e7436ad3 i915g: Move back to the old method for target format fixup. 2011-07-06 02:17:30 -07:00
Vadim Girlin fbe9d4261f r600g: reduce flushes for queries 2011-07-05 15:57:06 -04:00
Henri Verbeet 3fccc14b2f r600g: Get rid of the state_inlines headers.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-05 01:58:47 +02:00
Henri Verbeet 88cf65a600 r600g: Get rid of an unused include in r600_texture.c.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-05 01:58:46 +02:00
Henri Verbeet 4015b5877c r600g: Get rid of some unused functions.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-05 01:58:46 +02:00
Henri Verbeet 18cdb9c8ab r600g: Use the actual Evergreen functions to query format support on Evergreen.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-05 01:58:46 +02:00
Henri Verbeet 865f927218 r600g: Get rid of the unused "family" parameter to r600_is_vertex_format_supported().
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-05 01:58:46 +02:00
Christian König c3b2230b71 Merge remote-tracking branch 'origin/master' into pipe-video
Conflicts:
	configure.ac
	src/gallium/drivers/r600/r600_state_inlines.h
	src/gallium/tests/trivial/Makefile
	src/gallium/winsys/g3dvl/dri/XF86dri.c
	src/gallium/winsys/g3dvl/dri/driclient.c
	src/gallium/winsys/g3dvl/dri/driclient.h
	src/gallium/winsys/g3dvl/dri/xf86dri.h
	src/gallium/winsys/g3dvl/dri/xf86dristr.h
	src/gallium/winsys/r600/drm/r600_bo.c
2011-07-04 15:04:41 +02:00
Henri Verbeet 39fecd3229 r600g: Support the PIPE_FORMAT_R16_FLOAT colorformat.
NOTE: This is a candidate for the 7.11 branch.
2011-07-03 23:03:07 +02:00
José Fonseca 1c59ea9592 svga: Use the correct element size.
Instead of always using the first element's size.

This fixes flashing floor on CINEBENCH R10.
2011-07-01 18:32:42 +01:00
Thomas Hellstrom 542194251c svga: Fix multiple uploads of the same user-buffer.
If a user-buffer was referenced twice by a draw command, the affected ranges
were uploaded separately, with only the last one being referenced by the
hardware. Make sure we upload only a single range.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01 13:30:41 +02:00
Thomas Hellstrom a8cf4b6acf svga: Ignore redefine_user_buffer calls
We currently always treat contents of user-buffers as volatile so
we don't need to take any particular action when the state tracker
announces that the contents has changed.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01 13:30:40 +02:00
Brian Paul 762518d26a svga: fix incorrect user buffer size computation for instance divisor case
See preceeding commit for more info.
2011-07-01 13:30:40 +02:00
Brian Paul fa4bd30212 svga: fix incorrect user buffer size computation
Viewperf uses some unusual vertex arrays where the stride is less
than the element size.  In this case, the stride was 4 while the
element size was 12.  The difference of 8 bytes causes us to miss
uploading the tail bit of the array data.

Typically the stride is >= the element size so there was no problem
with other apps.
2011-07-01 13:30:39 +02:00
José Fonseca bd00fb2c06 svga: Handle null buffers in svga_buffer_is_user_buffer(). 2011-07-01 13:30:38 +02:00
Thomas Hellstrom 2b301df4aa gallium/svga: Upload only parts of user-buffers that we actually use
Stream user buffer contents rather than trying to maintain persistent
host / hardware copies.
Resulting negative array offsets are not allowed by the hardware,
(well, at least not according to header files), so adjust index bias
to make all array offsets positive.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01 13:30:38 +02:00
Thomas Hellstrom 0277df86df gallium/svga: Make use of u_upload_flush().
This enables us to pack more data into single upload buffers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01 13:30:37 +02:00
José Fonseca 6d58029bf0 svga: Flush when switching between HW to SW TNL, after updating need_swtnl.
Also, only flush when going from HW TNL to SW TNL, given it is impossible
for the buffers resulting from SWTNL to be ever referred by HW TNL path.
2011-07-01 13:30:36 +02:00
Vadim Girlin 61c976c3cc r600g: fix check for empty cs 2011-06-30 16:39:08 -04:00
José Fonseca 235225ec93 scons: Expose pkg-config in a simpler manner. 2011-06-30 17:36:37 +01:00
Stéphane Marchesin a9cb01f355 i915g: Implement surface format fixup without adding an extra instruction.
We also avoid writing output color twice, which might not work when we run out of phases.
2011-06-30 02:13:28 -07:00
Stéphane Marchesin 2adf02b456 i915g: update TODO. 2011-06-29 21:59:01 -07:00
Stéphane Marchesin 5d7609715a i915g: Try to do better in the shader compiler.
- Copy i915c's support for phases, that should allow us to run a coupe more shaders.
- Fix the error messages.
- Still try to proceed when we get a shader that's too long.
2011-06-29 16:54:29 -07:00
Jon TURNEY 8f0a331040 i915g: Move definition of M_PI in i915_fpc_translate.c
Move defintion of M_PI (for the benefit of <math.h> which do not define it), to
before the first use of it

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-06-29 14:29:26 +01:00
Stéphane Marchesin 1a7e17e44a i915g: Fix unimplemented Abs comment. 2011-06-29 01:23:44 -07:00
Stéphane Marchesin 4e6120576f i915g: If we have a program, that means the other fields are ours and we can free them.
Otherwise they probably belong to draw.
2011-06-28 20:42:39 -07:00
Stéphane Marchesin c66877c290 i915g: Don't overflow the program buffer.
Otherwise it corrupts other fields of the struct and hilarity ensues.
2011-06-28 20:42:38 -07:00
Stéphane Marchesin dd691032c8 i915g: Update the TODO with another idea. 2011-06-28 20:42:38 -07:00
Stéphane Marchesin fe36bc0c41 i915g: Fix comment about sin/cos constants. 2011-06-28 12:07:11 -07:00
Stéphane Marchesin bd1ee76442 i915g: Fix staging texture uploads a bit.
They still look corrupted, but at least now they don't look tiled any more.
2011-06-28 12:05:28 -07:00
Stéphane Marchesin de33b0dd23 i915g: Add a debug_printf when we get the Abs flag. 2011-06-28 02:14:43 -07:00
Stéphane Marchesin 2e481e5fc4 i915g: Support PIPE_FORMAT_B10G10R10A2_UNORM. 2011-06-28 01:41:57 -07:00
Stéphane Marchesin 062a1e291f i915g: Improve SIN/COS a bit. 2011-06-28 00:59:41 -07:00
Stéphane Marchesin 77896b256a i915g: When emulating LUMINANCE8 and INTENSITY8 texutres, route alpha properly.
That fixes some formats in fbo-alphatest-formats.
2011-06-28 00:59:40 -07:00
Stéphane Marchesin 6f62a25448 i915g: fix shadow compare.
"Works" as well as i915c now.
2011-06-28 00:59:40 -07:00
Stéphane Marchesin a2537bbc95 i915g: Enable GL_ARB_instanced_arrays. 2011-06-27 19:27:58 -07:00
Stéphane Marchesin 8dd1e3670f i915g: Fix a bug in facing.
However doesn't work because of limitations in the draw module.
2011-06-27 18:29:50 -07:00
Stéphane Marchesin c191c87c81 i915g: Remove unused cbuf_dirty. 2011-06-27 02:08:44 -07:00
Stéphane Marchesin e2422f77a2 i915g: Add a comment about a bug. 2011-06-27 02:06:00 -07:00
Stéphane Marchesin ef3dac2aff i915g: initial support for SEMANTIC_FACE.
Doesn't work yet, see TODO.
2011-06-27 02:06:00 -07:00
Stéphane Marchesin 4887e1c31a i915g: update TODO. 2011-06-27 02:06:00 -07:00
Stéphane Marchesin 9d29d48bb0 i915g: Return the max result for the fake occlusion queries. 2011-06-27 02:05:59 -07:00
Stéphane Marchesin b13865e694 i915g: Fix depth texture formats.
Depth compare still looks broken though.
2011-06-27 02:05:59 -07:00
Stéphane Marchesin a8ebc5400e i915g: Fix u_blitter comment. 2011-06-27 02:05:59 -07:00
Stéphane Marchesin 811963a7ae i915g: Implement fake DDX/DDY. 2011-06-27 02:05:59 -07:00
Stéphane Marchesin d2f05283d2 i915g: Fix gl_FragCoord. 2011-06-27 02:05:58 -07:00
Marek Olšák bc517d64da r300g: drop support for ARGB, ABGR, XRGB, XBGR render targets
Blending and maybe even alpha-test don't work with those formats.

Only supporting RGBA, BGRA, RGBX, BGRX.

NOTE: This is a candidate for the 7.10 and 7.11 branches.
2011-06-25 18:34:09 +02:00
Stéphane Marchesin ac8f59b23e i915g: always upload the vs constants.
This fixes a crash in llvm draw.
2011-06-24 19:59:17 -07:00
Stéphane Marchesin 7b44830ef4 i915g: add fake occlusion queries.
Those always return 0, but at least we don't crash when exposing GL 2.0.
2011-06-24 17:28:54 -07:00
Stéphane Marchesin 3a7953910a i915g: Don't do shader fixup if no surface is bound. 2011-06-24 16:43:58 -07:00
Stéphane Marchesin 1a69b50b3b i915g: Fix point sprites. 2011-06-24 16:30:19 -07:00
Alex Deucher 3acae45915 r600g: limit fs_write_all shader rebuild to eg+
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-24 18:27:39 -04:00
Alex Deucher feec48114b r600g: eg+ support for FS_COLOR0_WRITES_ALL_CBUFS
Evergreen+ don't support multi-writes so we need to emulate
it in the shader. Fixes the following piglit tests:
fbo-drawbuffers-fragcolor
ati_draw_buffers-arbfp-no-option

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-24 18:22:47 -04:00
Vadim Girlin eafd331cf3 r600g: implement fragment and vertex color clamp
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38440

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-06-24 15:23:41 -04:00
Vadim Girlin d81126b714 r600g: optimize spi update
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-06-24 15:23:38 -04:00
Vadim Girlin 8567e02dca r600g: LIT: fix x&y slots order
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-06-24 15:23:35 -04:00
Christoph Bumiller 9c5d15e929 nv50,nvc0: prevent pushbuf flush during ctx reloc emission
Should unify this too, but will delay that until the planned
libdrm_nouveau/winsys changes which are likely to cause major
changes to this bo validation code too.
2011-06-24 00:15:58 +02:00
Benjamin Franzke fa5478c5fe r600g: Add R8G8B8A8_UNORM to evergreen colorswap table
Fixes broken glTexImage2D with format=GL_RGBA since
1a339b6c71

The origin for this behaviour is that r600_is_format_supported
checks only against r600_state_inline.h tables not evergreens.
2011-06-23 21:06:36 +02:00
Marek Olšák 1e5cef96d1 r600g: bump shader input limits 2011-06-23 15:58:49 +02:00
Stéphane Marchesin 98ce1373e4 i915g: Add draw point sprites.
It's not that much work; hopefully blend func separate also works and we get GL 2.0 for real.
2011-06-22 16:51:02 -07:00
Stéphane Marchesin 468c2c0841 i915g: Fix comment.
Reported-by: Marcin Baczynski <marbacz@gmail.com>
2011-06-22 16:47:36 -07:00
Stéphane Marchesin 465183c6ae i915g: Support more texture and render target formats. 2011-06-22 16:44:54 -07:00
Michel Dänzer eb2c9b5814 r600g: Fix use of uninitialized local variable extra_size.
Should fix http://bugs.freedesktop.org/show_bug.cgi?id=38566 .
2011-06-22 16:23:36 +02:00
Alex Deucher 21972c85ea r600g: fix fbo depth/stencil texture allocation for evergreen+
evergreen+ stores depth and stencil separately so when we
allocate a depth/stencil fbo, make sure we allocate enough
memory for both depth and stencil buffers.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-21 17:32:42 -04:00
Dave Airlie e251b3903a r600g: use maths instead of a loop to work out mask.
This is equivalent results with less looping.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-21 15:18:44 +10:00
Dave Airlie 59a402cecd r600g: optimise draw vbo function a bit more.
this drop a bunch of unnecessary checks (i.e. should be trapped
at gallium level), and also removes the switch statement in favour
of some calculated values for the vgt values.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-21 14:20:49 +10:00
Pierre-Eric Pelloux-Prayer abe74a9820 r600g: reorder LIT instructions to support src == dst
the attached patch should be an improvement over Vadim Girlin's patch
fixing LIT instruction for r600g (commit
2fe39b46e7).

Instructions used in tgsi_lit have been reordered to always write to a
dst channel after the same channel in src has been read (so if src ==
dst, input values are not overwritten before being used).

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-21 12:50:44 +10:00
Ben Skeggs 4112ca54e3 nvfx: nasty hack to make glFinish() actually finish..
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-21 12:59:53 +10:00
Marcin Slusarz 2f6a9687cf gallium/nouveau: remove unused nouveau_screen_bo_user 2011-06-20 02:23:12 +02:00
Marek Olšák badf0335ef r600g: implement seamless_cube_map on r600-r700
st/mesa guarantees that all bound sampler states have the same value
in seamless_cube_map.
2011-06-20 00:19:07 +02:00
Marek Olšák 9bcce02f47 r600g: remove some magic numbers 2011-06-19 23:28:33 +02:00
Marek Olšák d1f66a9424 u_vbuf_mgr: make u_vbuf_mgr_draw_begin return flags in a bitmask 2011-06-19 21:09:18 +02:00
Marek Olšák 8623c68aec r600g: fix warning: assignment discards qualifiers from pointer target type 2011-06-19 21:09:18 +02:00
Marek Olšák a4f4e24f07 r300g: rename AOS -> VARRAYS 2011-06-18 21:09:08 +02:00
Marek Olšák 7df7eaf845 r300g: fix handling PREP_* options
This should fix rendering >65532 vertices using draw_arrays on r300-r400.

NOTE: This is a candidate for the 7.10 branch.
2011-06-18 21:09:08 +02:00
Vadim Girlin 2fe39b46e7 r600g: fix LIT to handle src==dst properly
Current LIT implementation uses dst components for storing temp
results, possibly overwriting still needed values (depends on the
swizzles).
This patch uses temp reg for one of such cases (found in etqw) and
fixes "LIT R.z, R.xyzz".

Tested on evergreen. Fixes some etqw-demo rendering glitches when
"Lighting" is set to "High" in the settings.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-18 16:03:04 +10:00
Vadim Girlin 8ab1c5328b r600g: fix RSQ to use abs value of operand on evergreen
fixes https://bugs.freedesktop.org/show_bug.cgi?id=36917

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-18 16:01:03 +10:00
Vadim Girlin a916d4279a r600g: fix source box in r600_resource_copy_region
Source box needs to be adjusted for blitting from compressed formats.

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

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-18 15:45:59 +10:00
José Fonseca 4175010749 scons: make embedding orthogonal to the platform
To enable embedding in platforms other than linux.
2011-06-17 14:50:37 +01:00
Vadim Girlin 016621ee14 r600: fix SPI inputs setup on r600/r700
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-16 15:23:06 +10:00
Marek Olšák 6f243ec25d r600g: disable render condition for some blitter operations 2011-06-15 15:24:37 +02:00
Mike Kaplinskiy 40aec11b75 r600g: fix TXD src regs needing fetching.
[airlied: final chunk of Mike's patch from bug 37476
this uses a loop to emit the GRADIENTS and does a check to
see if we need to fetch to a temporary register. It also
increases the context src gpr to 4 which is needed here.]

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-15 16:58:40 +10:00
Mike Kaplinskiy 6415f25663 r600g: use inlines for some common tex instr setup code.
[airlied: taken from Mike's patch in bug 37476]

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-15 16:58:40 +10:00
Mike Kaplinskiy de91ea1c06 r600g: fix TXD when shadowing is enabled.
Mike had actually done a lot of the TXD support in a patch in bug
37476 which I see now, I'll add the bits of his work that I didn't think
to add to my work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-15 15:54:21 +10:00
Dave Airlie 13c9a8552b r600g: add TXD support.
This at least passes the piglit arb_shader_texture_lod-texgrad test,
the AMD shader analyzer seems to multiply the V component by an unspecified
constant value no idea why.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-15 15:18:42 +10:00
Brian Paul 34a774797c i915g: add const qualifier to silence warning 2011-06-14 20:47:47 -06:00
Marek Olšák d9ca94836e r600g: also set TILE_MODE of the base level 2011-06-15 04:16:05 +02:00
Marek Olšák 677a4406d2 r600g: force OpenGL's BASE_LEVEL behavior on r600-r700
This sets the base level as the zero level, which fixes
piglit/texturing/tex-miplevel-selection*.

The r600 hardware ignores the BASE_LEVEL field in some cases, so we can't
use it.

Evergreen might need this too.
2011-06-15 03:39:24 +02:00
Marek Olšák 7d488ade23 r600g: fix RGB32F texturing 2011-06-14 20:47:57 +02:00
Marek Olšák df6355512a r600g: fix indentation and comments 2011-06-14 20:37:57 +02:00
Marek Olšák 13dcf3f20d r600g: disable shader_texture_lod until there is driver support 2011-06-14 20:03:04 +02:00
Adam Jackson 130e7ead87 llvmpipe: SSE2 fastpaths for b8g8r8x8 {un,}swizzle
Copy-and-paste from the bgra cases.  The C paths attempt to avoid
copying the 'x' channel, but it's harmless, you might as well.  Good for
about 5% in glxgears (740 to 780 fps).

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-06-14 11:51:13 -04:00
Christoph Bumiller a8b9a75b92 nv50: fix copy/paste error in nv50_gmtyprog_validate
Used the vertprog instead of gmtyprog.
2011-06-14 17:15:08 +02:00
Vadim Girlin 9346d895e7 r600g: skip SPI setup for position and face inputs
fixes fdo bug 38145

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-14 09:17:16 +10:00
Dave Airlie 2743851c1a r600g: move depth texture flushing out of line.
this needs a piglit run.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-14 09:17:16 +10:00
Daniel Vetter df8d26ec09 i915g: add a few more render target formats
Snatched from xvmc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 23:05:43 +02:00
Mathias Fröhlich 2f0b44f981 r600g: Put shaders into immutable buffers.
Put the shader programs into an immutable buffer object.
Also make sure that those object can be taken from the user
space buffer object pool.
2011-06-13 11:33:20 -04:00
Mathias Fröhlich e2529442e6 r600g: Fix typo.
Fix an obvious typo in the yet unused part of the shader setup.
2011-06-13 11:31:13 -04:00
Pierre-Eric Pelloux-Prayer 92563476e4 r600g: remove useless call to u_upload_flush
No regressions found with :
- piglit (quick.tests)
- Unigine Heaven
- Lightsmark
- openarena
- Imprudence (Second Life fork)

agd5f Note: this patch was previously reverted due to piglit
regressions, but I'm not able to reproduce them here.
See this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=34008
and discussion:
http://lists.freedesktop.org/archives/dri-devel/2011-June/011996.html

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-13 11:26:54 -04:00
Pierre-Eric Pelloux-Prayer b19d86701e r600g: fixed bo memory leak issue
pipe_resource_reference call was miossing, thus creating massive memory under certain conditions.
Fix : https://bugs.freedesktop.org/show_bug.cgi?id=37168
2011-06-13 10:47:07 -04:00
Marek Olšák 837dc61011 r300g: max_anisotropy of 1 is not anisotropic filtering 2011-06-11 23:03:20 +02:00
Christian König 003401f95c Merge remote-tracking branch 'origin/master' into pipe-video
Conflicts:
	src/gallium/tests/unit/u_format_test.c
	src/gallium/winsys/r600/drm/r600_hw_context.c
2011-06-09 09:35:09 +02:00
Marek Olšák da8b4c0798 r300g: fix texturing with non-3D textures and wrap R mode set to sample border
If the wrap R (3rd) mode is set to CLAMP or CLAMP_TO_BORDER and the texture
isn't 3D, r300 always samples the border color regardless of texture
coordinates.

I HATE THIS HARDWARE.

NOTE: This is a candidate for the 7.10 branch.
2011-06-09 04:19:03 +02:00
Marek Olšák 466ce95ddf r300g: don't enable aniso with nearest filtering 2011-06-09 04:19:03 +02:00
Dave Airlie 04554c7d3a r600g: adjust vs/ps gprs on r600/r700 cards when needed.
Ideally we'd have a compiler and register spilling and all that
but this is good enough for now to avoid the gpu hang in piglit,

glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined

on r600/r700 cards.

based on r600c patch
Andre Maasikas <amaasikas@gmail.com>
r600c: bump sq gpr resources if a shader needs more than default

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-09 11:25:02 +10:00
Marek Olšák d56fe67c62 r600g: remove unused variable 2011-06-09 01:34:24 +02:00
Marek Olšák 578d4539ba r300g: fix draw_vbo splitting on r3xx-r4xx
NOTE: This is a candidate for the 7.10 branch.
2011-06-09 01:25:52 +02:00
Marek Olšák f48412c39f r300g: make translate_primitive table-driven 2011-06-09 01:25:52 +02:00
Brian Paul 2d22186ca8 svga: fix typos, update comments 2011-06-08 15:08:19 -06:00
Alex Deucher fe3a343441 r600g: fix mixup in GPR resource reg setup
GLOBAL_GPR regs should be 0.  Need to set the
number of temp regs in SQ_GPR_RESOURCE_MGMT_1.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-08 10:50:18 -04:00
Brian Paul 5f2deba9f3 gallium: s/bool/boolean/ 2011-06-08 08:05:40 -06:00
Dave Airlie 19b9e523c5 r600g: missed one line in eg dyn gpr fallback.
need more sleep or something.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:53:11 +10:00
Dave Airlie 190bfea2de r600g: condition evergreen dyn gpr resource management
So only with kernel version 2.7 can this work, thanks to Alex
for pointing that out. Also add a workaround for a hw bug.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:50:58 +10:00
Dave Airlie c1f9884bbf r600g: enable dynamic GPR resource management on evergreen
Evergreen can do this as well as cayman, so we should enable it.

This fixes a gpu lockup with
glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined.shader_test

I need to add a better workaround for r600/r700.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:11:48 +10:00
Dave Airlie e66053d01c r600g: take alpha ref update out of line.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:47:00 +10:00
Dave Airlie ba78a5a679 r600g: split resource emit path from main register emit path
Since resources don't generally vary in size, this splits
the emit path, it also takes into a/c that texture and vertex resources
have different number of relocs, and avoids emitting the extra
reloc for vertex resources.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:47:00 +10:00
Dave Airlie 4707ae20ad r600g: inline r600_bo_reference.
This relies on the reference member being first, so document it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:46:59 +10:00
Alex Deucher 5d4c479822 r600g: remove pre-r6xx asic families and pci ids
Not sure why these were included originally.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07 17:04:52 -04:00
Marek Olšák d7111353bd r300g: consolidate deducing chipset info
Use the new PCI ID table, make it simpler.
2011-06-07 21:02:52 +02:00
Marek Olšák eaae63b715 r600g: add missing r300 families
Wondering why r600g needs to include r300_pci_ids.h
2011-06-07 21:02:52 +02:00
Stéphane Marchesin 7d2cb9a53c Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa 2011-06-06 20:42:30 -07:00
Stéphane Marchesin abb4365269 i915g: Do generic remapping.
With complex shaders there are often "holes" in the fs inputs, and we only
have 8 tex coorsd to map those to. To fix this, we remap fs inputs to [0..8].
This lets us to run many more GLSL programs.
2011-06-06 20:40:16 -07:00
Dave Airlie 63184bc8b2 r600g: use an enabled list to track enabled blocks.
At the end of flushing we were scanning over 450 blocks
with generally about 50 enabled. This reduces the scanning
to just the list of enabled blocks.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07 09:33:53 +10:00
Dave Airlie f356bb74de r600g/winsys: overhaul resource range/blocks.
There isn't much point taking the overhead of range/block lookups on resources
we aren't going to be getting resource registers at wierd offsets.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07 09:32:29 +10:00
Dave Airlie cf0f02e501 r600g: move resource setting to its own structures.
resource setting could be a fair bit more lightweight,
this patch just separates the resource structs from the standard
reg tracking structs in the driver, later patches will improve
the winsys.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07 09:30:55 +10:00
Stéphane Marchesin 2292025c49 i915g: implement more opcodes. 2011-06-06 12:36:00 -07:00
Stéphane Marchesin 0f091333d1 i915g: implement TGSI_OPCODE_SEQ. 2011-06-06 12:36:00 -07:00
Stéphane Marchesin 0ce977a66e i915g: handle varyings properly. 2011-06-06 12:36:00 -07:00
Stéphane Marchesin 893b92adff i915g: add missing and unsupported PIPE_CAPs to avoid debug messages. 2011-06-06 12:35:59 -07:00
Stéphane Marchesin 3103c08ae9 i915g: don't destroy a texture buffer if it's NULL. 2011-06-06 12:35:58 -07:00