Commit Graph

831 Commits

Author SHA1 Message Date
Henri Verbeet 89dc31a28d r600g: Replace the CHIPREV_* defines with the chip_class enum.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-09 18:12:50 +02:00
Henri Verbeet 4f7dfd8ad3 r600g: Get rid of the superfluous family field from r600_shader.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-09 18:12:50 +02:00
Henri Verbeet b3b946b0ab r600g: Store the chip class in r600_pipe_context.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-09 18:12:50 +02:00
Henri Verbeet 949896b82f r600g: Fix the type of the family field in r600_pipe_context.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-09 18:12:50 +02:00
Vadim Girlin 3efb47f0b0 r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP
SUB & LRP instructions should toggle NEG bit instead of setting it,
otherwise e.g. "SUB a,b,-1" is translated as "ADD a,b,-1"

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-07-08 17:21:32 -04:00
Vadim Girlin f87d566f4b r600g: introduce r600_bc_src_set_abs helper and fix LOG
LOG instruction should use absolute values of source operand.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-07-08 17:21:32 -04:00
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
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
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
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
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
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
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
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
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
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
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
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
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