Commit Graph

831 Commits

Author SHA1 Message Date
Vinson Lee 694b1883ee r600g: Remove unnecessary header. 2010-09-17 12:38:29 -07:00
Jerome Glisse fd266ec62c r600g: alternative command stream building from context
Winsys context build a list of register block a register block is
a set of consecutive register that will be emited together in the
same pm4 packet (the various r600_block* are there to provide basic
grouping that try to take advantage of states that are linked together)
Some consecutive register are emited each in a different block,
for instance the various cb[0-7]_base. At winsys context creation,
the list of block is created & an index into the list of block. So
to find into which block a register is in you simply use the register
offset and lookup the block index. Block are grouped together into
group which are the various pkt3 group of config, context, resource,

Pipe state build a list of register each state want to modify,
beside register value it also give a register mask so only subpart
of a register can be updated by a given pipe state (the oring is
in the winsys) There is no prebuild register list or define for
each pipe state. Once pipe state are built they are bound to
the winsys context.

Each of this functions will go through the list of register and
will find into which block each reg falls and will update the
value of the block with proper masking (vs/ps resource/constant
are specialized variant with somewhat limited capabilities).

Each block modified by r600_context_pipe_state_set* is marked as
dirty and we update a count of dwords needed to emit all dirty
state so far.

r600_context_pipe_state_set* should be call only when pipe context
change some of the state (thus when pipe bind state or set state)

Then to draw primitive you make a call to r600_context_draw
void r600_context_draw(struct r600_context *ctx, struct r600_draw *draw)
It will check if there is enough dwords in current cs buffer and
if not will flush. Once there is enough room it will copy packet
from dirty block and then add the draw packet3 to initiate the draw.

The flush will send the current cs, reset the count of dwords to
0 and remark all states that are enabled as dirty and recompute
the number of dwords needed to send the current context.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-17 10:49:05 -04:00
Tilman Sauerbeck d80bed1566 r600g: Fixed the shift in S_02880C_KILL_ENABLE.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-17 14:08:54 +02:00
Tilman Sauerbeck 54d688f148 r600g: Enable PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-17 12:49:51 +02:00
Tilman Sauerbeck 70a85c39a9 r600g: Only set PA_SC_EDGERULE on rv770 and greater.
This is what xf86-video-ati and r600c do.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-17 12:17:48 +02:00
Tilman Sauerbeck 5f97d0a218 r600g: Added DB_SHADER_CONTROL defines.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-17 12:06:07 +02:00
Tilman Sauerbeck 5edb778c1b r600g: Formatting fixes.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-17 12:06:07 +02:00
Dave Airlie 0d76bb5d4c r600g: add upload manager support.
this add support for the upload manager for uploading user vbo/index buffers.

this provides a considerable speedup in q3 type games.
2010-09-17 15:29:31 +10:00
Dave Airlie da96313afe r600g: add support for kernel bo
this moves to using a pb bufmgr instead of kernel bos directly.
2010-09-17 15:29:31 +10:00
Dave Airlie 7c1fcc41be r600g: move constant buffer creation behind winsys abstraction.
this paves the way for moving to pb bufmgrs now.
2010-09-17 15:29:31 +10:00
Dave Airlie f70f79f6f6 r600g: attempt to abstract kernel bos from pipe driver.
introduce an abstraction layer between kernel bos and the winsys BOs.

this is to allow plugging in pb manager with minimal disruption to pipe driver.
2010-09-17 10:57:49 +10:00
Dave Airlie ec9d838aa5 r600g: hide radeon_ctx inside winsys.
no need for this info to be exported to pipe driver.
2010-09-17 10:57:44 +10:00
Tilman Sauerbeck df62338c49 r600g: Use clamped math for RCP and RSQ.
This is likely only correct for OpenGL and not other state trackers.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-16 11:08:00 +02:00
Tilman Sauerbeck 2108caac25 r600g: Fixed a bo leak in r600_blit_state_ps_shader().
We would leak the newly created bo if it cannot be mapped.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-16 11:07:32 +02:00
Dave Airlie ef2808f56f r600g: fix texture bos and avoid doing depth blit on evergreen
since the depth blit code is hardcoded hex yay \o/
2010-09-16 21:48:02 +10:00
Dave Airlie 9a589961a2 r600g: fixup texture state on evergreen.
This whole set of state just seems wrong, another cut-n-paste nightmare.
2010-09-16 21:29:08 +10:00
Dave Airlie 1a20aae581 r600g: add vgt dma src defines 2010-09-16 09:41:43 +10:00
Dave Airlie 3ead528bbb r600g: use index min/max + index buffer offset.
more prep work for fixing up buffer handling
2010-09-16 09:40:42 +10:00
Dave Airlie 05433f20b6 r600g: pull r600_draw struct out into header
we need this for future buffer rework, it also makes the vtbl easier
2010-09-16 09:40:42 +10:00
John Doe e0b6df4fcc r600g: misc cleanup
Avoid using r600_screen structure to get ptr to radeon
winsys structure.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-15 11:48:34 -04:00
Vinson Lee efab1c8642 r600g: Silence unused variable warning.
The code that uses dname is currently ifdef'ed out.
2010-09-15 06:14:02 -07:00
Vinson Lee 1ce4f86803 r600g: Silence uninitialized variable warning. 2010-09-15 06:09:28 -07:00
Vinson Lee a712e193a3 r600g: Silence uninitialized variable warning. 2010-09-15 05:52:16 -07:00
Vinson Lee 76c0576101 r600g: Silence uninitialized variable warning. 2010-09-15 05:46:34 -07:00
Vinson Lee 9aee4be5e0 r600g: Silence uninitialized variable warning. 2010-09-15 05:34:29 -07:00
Vinson Lee 7290c5982c r600g: Silence uninitialized variable warning. 2010-09-15 05:31:31 -07:00
Vinson Lee 6a8a506158 r600g: Remove unnecessary headers. 2010-09-14 17:42:47 -07:00
Luca Barbieri a508d2dddc gallium: introduce get_shader_param (ALL DRIVERS CHANGED) (v3)
Changes in v3:
- Also change trace, which I forgot about

Changes in v2:
- No longer adds tessellation shaders

Currently each shader cap has FS and VS versions.

However, we want a version of them for geometry, tessellation control,
and tessellation evaluation shaders, and want to be able to easily
query a given cap type for a given shader stage.

Since having 5 duplicates of each shader cap is unmanageable, add
a new get_shader_param function that takes both a shader cap from a
new enum and a shader stage.

Drivers with non-unified shaders will first switch on the shader
and, within each case, switch on the cap.

Drivers with unified shaders instead first check whether the shader
is supported, and then switch on the cap.

MAX_CONST_BUFFERS is now per-stage.
The geometry shader cap is removed in favor of checking whether the
limit of geometry shader instructions is greater than 0, which is also
used for tessellation shaders.

WARNING: all drivers changed and compiled but only nvfx tested
2010-09-14 06:07:41 +02:00
Dave Airlie 61c2861b4e r600g: evergreen fixup dsa state for running query.
evergreen is always the same as r700 here.
2010-09-13 19:57:29 +10:00
Dave Airlie b5fcf0c8e0 pb: add void * for flush ctx to mapping functions
If the buffer we are attempting to map is referenced by the unsubmitted
command stream for this context, we need to flush the command stream,
however to do that we need to be able to access the context at the lowest
level map function, currently we set the buffer in the toplevel map, but this
racy between context. (we probably have a lot more issues than that.)

I'll look into a proper solution as suggested by jrfonseca when I get some time.
2010-09-12 13:32:43 +10:00
Tilman Sauerbeck 33b1d14913 r600g: Undo bo placement change.
This reverts a part of e795ca8f31
that causes artefacts and a performance drop.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-11 18:40:45 +02:00
Tilman Sauerbeck ec2e0fd1e9 r600g: Fixed a bo reference leak in the draw module.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-10 13:09:33 +02:00
Tilman Sauerbeck ac2bddb9f2 r600g: Fixed a bo leak in r600_texture_from_handle().
We would leak bo if the argument check failed.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-10 13:09:33 +02:00
Tilman Sauerbeck ae23d425c2 r600g: Don't leave stale references in query_list when we cannot create bo.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-10 13:09:33 +02:00
Tilman Sauerbeck 96a4edb8cc r600g: Implemented the y component write for the LOG opcode.
This makes the 'vp1-LOG test' piglit test work.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-10 13:09:32 +02:00
Dave Airlie fcae8ca575 r600g: fixup state calculations for picking states.
for evergreen I ended up using a non-contig array of states, but
this code needs a bit of fixing up to deal with that.
2010-09-10 22:41:00 +10:00
Dave Airlie f61b241eba r600g: fixup CB state numbering header 2010-09-10 21:59:06 +10:00
Dave Airlie cc1b3b1013 r600g: fix warning in r600 pipe driver 2010-09-10 14:07:49 +10:00
Dave Airlie ad5ada4372 r600g: evergreen CBs are more sane to support with a single state 2010-09-10 13:52:02 +10:00
Dave Airlie 50526e094f r600g: add initial evergreen support
adds shader opcodes + assembler support (except ARL)
uses constant buffers
add interp instructions in fragment shader
adds all evergreen hw states
adds evergreen pm4 support.

this runs gears for me on my evergreen
2010-09-10 19:41:18 +10:00
Dave Airlie 42da027433 r600g: align flushing of cb/db with DDX/r600c.
the DDX and r600c both flush cb/db after the draw is emitted,
as long as they do that, r600g can't be different, as it races.

We end up with r600g flush, set CB, DDX set CB, flush. This
was causing misrendering on my evergreen, where sometimes the drawing
would go to an old CB.
2010-09-10 11:29:23 +10:00
Dave Airlie e795ca8f31 r600g: don't need 3 bos here.
the code should reloc correctly a single BO 3 times.
2010-09-10 11:29:23 +10:00
Dave Airlie bf346f065c r600g: add initial bank swizzle support.
this is ported from r600c mostly, bank swizzling is real messy and I don't think
I got enough sleep last night to fully understand it.
2010-09-08 14:12:21 +10:00
Tilman Sauerbeck 1e28dd4ebe r600g: Added missing r600_bc_add_literal() calls to XPD implementation.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08 09:10:46 +10:00
Tilman Sauerbeck 460c5304ab r600g: Added preliminary support for the LOG opcode.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08 09:10:07 +10:00
Tilman Sauerbeck 42c966bc49 r600g: Added missing abs-ification to RSQ.
This makes the 'fp1-RSQ test 2' piglit test work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08 09:07:02 +10:00
Dave Airlie a3a94554f5 r600g: split opcodes out and add wrapper around usage.
This splits the r600 opcodes out of the sq file and adds a wrapper
so we can convert to evergreen opcodes later without touching these functions
too much.
2010-09-08 08:49:00 +10:00
Dave Airlie d42efb9e8d r600g: add support for constants in memory buffers.
DX9 constants were in the constant file, and evergreen no longer support
cfile. r600/700 can also use constants in memory buffers, so add the code
(disabled for now) to enable that as precursor for evergreen.
2010-09-08 08:41:57 +10:00
Dave Airlie 9ef1c51be1 r600g: abstract the hw states out behind a vtbl.
this is step one towards evergreen support, it lets us plug in whole
new hw level states.
2010-09-08 08:30:59 +10:00
Dave Airlie 35e01b79cb r600g: add error print for no literals for r700s as well 2010-09-06 10:38:29 +10:00
Dave Airlie 2caf6f5e84 r600g: fixup r700 assembler for clamp/relative addressing 2010-09-06 10:35:51 +10:00
Dave Airlie 48cdad70d9 r600g: add script to generate header file with offsets into state objects.
This was inherently fragile as any changes to r600_states.h would also
need manual updating of all of the bits in radeon.h. Just add a simple
python script to do the conversion, its not hooked up to make at all.

This also will make adding evergreen a bit easier.
2010-09-06 10:28:08 +10:00
Dave Airlie 5b82777311 r600g: fix up surface references
We end up referencing the new surf and derefing the old surface which
is a copy of the pointer to the new surf. So just bump the ref count directly.
2010-09-06 09:15:42 +10:00
Dave Airlie 3a672785df r600g: search for sampler views in context on removal.
Need to remove from context as well.
2010-09-06 09:15:42 +10:00
Dave Airlie 6ec0fff822 r600g: add missing printf operand 2010-09-06 09:15:41 +10:00
Dave Airlie 50c1b6f2e8 r600g: fix segfault in state after rework
probably can improve this a bit.
2010-09-03 19:39:14 +10:00
Dave Airlie 191bfc5c3b r600g: refactor sample states into a reusable struct.
I will not cut-n-paste.
I will not cut-n-paste.
I will not cut-n-paste.
2010-09-03 14:12:38 +10:00
Dave Airlie 9ef228ee2d r600g: reduce size of r600 context structure to !insane
Its now about 7.8k, and might actually fit in a cache.
2010-09-03 13:53:39 +10:00
Dave Airlie b5fcf82749 r600g: add texture border state.
Okay I finally wrapped my head around what r600_context_state is meant to be,
maybe I should just rename all the structs so that have distinct names.

I've no idea however why 16 is a good magic number for R600_MAX_RSTATE.
2010-09-03 13:34:57 +10:00
Dave Airlie ce7077423f r600g: deref old driver states for set entry points. 2010-09-03 12:01:59 +10:00
Dave Airlie 4ca207b174 r600g: drop r600_bind_state.
This was another ugly function that really wasn't needed.

The 3 calls to it from the gallium api were shorter than it,
and all the calls from the set_ functions were pointless.
2010-09-03 11:56:07 +10:00
Dave Airlie 49b4f5259b r600g: kill r600_context_state function
having some sort of locality of code really matters, just create
and setup state at time. Not sure if this is just further polishing of a bad thing,
but at least it makes it more readable.
2010-09-03 11:35:08 +10:00
Dave Airlie 1bd8493a0b r600g: move lots of state inline helpers to separate header.
this gets them out of sight of the main codeflow.
2010-09-03 10:55:54 +10:00
Dave Airlie 883cbbd99c r600g: drop magic numbers in depth state.
this also fixes occulsion queries.
2010-09-03 09:48:40 +10:00
Jerome Glisse f8d11b2e8e r600g: force unbind of previously bind sampler/sampler_view
Previously bind sampler/sampler_view can be converted and endup
overwritting the current state we want to schedule. Example :
bind texA texB to sampler_view[0] & sampler_view[1], render,
bind texB to sampler_view[0] render. Now state associated to
texB are set to configure sampler_view slot 0, but as we don't
unbind sampler_view[1] still point to texB state so we end up
with sampler_view[1] overwritting sampler_view[0], which gives
wrong rendering if next rendering bind texA to sampler_view[0],
it will endup as texB is bound to sampler_view[0]. If you are
not confuse at that point give me a call i will be buying you
beer.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-02 16:58:47 -04:00
Jerome Glisse e73c5501b2 r600g: fix memory/bo leak
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-02 11:47:30 -04:00
Dave Airlie 5d5f693cef r600g: fix thinko in shadow code.
spotted by taiu on irc
2010-09-02 21:26:12 +10:00
Dave Airlie 76d0541e79 r600g: fix logicop, the 3d ROP is the 2D rop shifted twice. 2010-09-02 16:40:41 +10:00
Dave Airlie e8ff0f63b6 r600g: fix depth texture tests 2010-09-02 15:51:23 +10:00
Dave Airlie 7299023c2a r600g: add missing vertex fetch formats to the translation table.
fixes at least 2 more piglits.
2010-09-02 13:32:25 +10:00
Jerome Glisse 31b84acbd2 r600g: fix binding of same texture to several target slot
One can bind same texture or sampler to different slot,
each slot needs it own state. The solution implemented
here is not exactly beautifull or optimal need to think
to somethings better.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 21:59:28 -04:00
Dave Airlie 36192b772e r600g: fix incorrect state naming in pipe_sampler vs pipe_sampler_view
fixes problems in valgrind with uninitialised values.
2010-09-02 11:17:37 +10:00
Jerome Glisse ffcb443cd7 r600g: silence compiler warning
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 18:09:37 -04:00
Jerome Glisse 67234b4b42 r600g: refix db/cb state
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 18:05:52 -04:00
Alex Deucher c70459a1b9 r600g: fix up default state differences between r6xx and r7xx
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-01 14:41:03 -04:00
Jerome Glisse 66e4cb1cd5 r600g: avoid dynamic allocation of states
Make state statically allocated, this kills a bunch of code
and avoid intensive use of malloc/free. There is still a lot
of useless duplicate function wrapping that can be kill. This
doesn't improve yet performance, needs to avoid memcpy states
in radeon_ctx_set_draw and to avoid rebuilding vs_resources,
dsa, scissor, cb_cntl, ... states at each draw command.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 13:16:23 -04:00
Jerome Glisse 15ce70252c Revert "Revert "r600g: precompute some of the hw state""
This reverts commit 1fa7245c34.

Conflicts:

	src/gallium/drivers/r600/r600_state.c
2010-09-01 13:04:42 -04:00
Dave Airlie 1d7b4af817 r600g: correct cb/zb offset emits.
This fixes fbo-3d and fbo-cubemap
2010-09-01 14:59:18 +10:00
Dave Airlie 1fa7245c34 Revert "r600g: precompute some of the hw state"
This reverts commit de0b76cab2, its pre-computes the texture state wrong,

you can't just use an array of levels, since you can have FBOs to depth texture slices inside a level as well
it would get really messy quickly. Probably need to split commits like this up into pieces for each piece
of state, so we can revert bits easier in case of regressions.

This also break 5 piglit tests, and valgrind starts to warn about invalid read/writes after this.
2010-09-01 14:56:04 +10:00
Dave Airlie d7e2509692 r600g: fix typo causing segfault.
fixes warning that
r600_blit.c: In function ‘r600_resource_copy_region’:
r600_blit.c:136: warning: passing argument 1 of ‘util_resource_copy_region’ from incompatible pointer type

and also 7 more piglit tests.
2010-09-01 13:55:56 +10:00
Dave Airlie bea5f559a6 r600g: fix glean texCube and shadows.
add cube and shadow support to the texture code.
2010-09-01 12:55:21 +10:00
Dave Airlie b87b6e5bf7 r600g: fix up depth write swizzles.
For some reason r600c, emits extra instructions in the FP to do the depth write output swizzle,
I'm not sure this is required, so here I'm doing it in the exports.

this fixes the mesa trivial demos tri-depthwrite and tri-depthwrite2, it doesn't fix
the glsl1 gl_FragDepth writing test however.
2010-08-31 16:15:04 +10:00
Dave Airlie ad202678fc r600g: fix fp-fragment-position test. 2010-08-31 15:13:24 +10:00
Dave Airlie 580781babe r600g: fix typo in last commit 2010-08-31 15:13:21 +10:00
Dave Airlie 5d66a8606d r600g: fix position input to fragment shader.
this fixes a few if the fs shader tests, 10 more piglits
2010-08-31 14:55:32 +10:00
Dave Airlie 4e61f085d0 r600g: remove unneeded function call from scs 2010-08-31 14:55:32 +10:00
Dave Airlie d3fa92584b r600g: make LIT work properly
this is a bit of a workaround, something is wrong with the literal emits here
so we just use the trig copy function to copy the immd to a temp at start of op.

fix VP/FP LIT tests
2010-08-31 12:59:10 +10:00
Dave Airlie be7816f2b7 r600g: fixup trig functions when input is a literal
So as the trig functions used up the literal spots for the PI work, if the arg0 was an immediate
we'd hit failure, so copy the literal before starting.

add some tracking of max temp used to avoid trashing temp regs.

5 more piglits, fp1 COS,SCS,SIN tests
2010-08-31 11:44:34 +10:00
Dave Airlie ee0153f891 r600g: make sure LIT splits constants 2010-08-31 10:47:08 +10:00
Dave Airlie 9bbc54a10d r600g: fix constant splitting
constant splitting was broken for multi-constant cases, fixes fp1 CMP+MAD, vp1 CMP.
2010-08-31 10:47:03 +10:00
Dave Airlie 85e401d8bf r600g: fix LIT tests 2010-08-31 10:46:58 +10:00
Dave Airlie 5ea238b799 r600g: add missing literals
Also add an error if we hit this problem again, we need to do this better
possibly tying the literal addition to the last flag.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-31 09:43:48 +10:00
Jerome Glisse de0b76cab2 r600g: precompute some of the hw state
Idea is to build hw state at pipe state creation and
reuse them while keeping a non PM4 packet interface
btw winsys & pipe driver. This commit also force rebuild
of pm4 packet on each call to radeon_state_pm4 which
in turn slow down everythings, this will be addressed.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-30 15:00:55 -04:00
Jerome Glisse 0bba7796a3 r600g: fix depth buffer decompression after states rework
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-30 15:00:55 -04:00
Dave Airlie 69c30f5d6d r600g: fixup states generation in winsys.
The current states code had an unhealthy relationship between
that had to somehow magically align themselves, editing either
place meant renumbering all states after the one you were on,
and it was pretty unapproachable code.

This replaces the huge types structures with a simple type + sub
type struct, which is keyed on an stype enum in radeon.h. Each
stype can have a per-shader type subclassing (4 types supported,
PS/VS/GS/FS), and also has a number of states per-subtype. So you
have 256 constants per 4 shaders per one CONSTANT stype.

The interface from the driver is changed to pass in the tuple,
(stype, id, shader_type), and we look for this. If
radeon_state_shader ever shows up on profile, it could use a
hashtable based on stype/shader_type to speed things up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30 15:00:55 -04:00
Dave Airlie 57eecbbf6c r600g: add DST opcode support. 2010-08-30 16:22:54 +10:00
Dave Airlie 92f5c7a597 r600g: add SCS support. 2010-08-30 16:09:39 +10:00
Dave Airlie db92a03aac r600g: fix warning introduced by last commit. 2010-08-30 15:50:52 +10:00
Dave Airlie 47d5a19df1 r600g: add initial relative support to assembler
passes another ~20 piglits.

/me starts to run out low hanging fruit around now.
2010-08-30 15:47:49 +10:00
Dave Airlie 4502b17901 r600g: add KILP support
passes glsl1-discard tests
2010-08-30 15:04:40 +10:00
Dave Airlie cb08b9fa84 r600g: fix SSG and op3 neg writing
8 more piglits, mainly the two SSG tests.
2010-08-30 14:22:12 +10:00
Dave Airlie 09547e1bce r600g : add basic loop support.
Adds BGNLOOP, BRK, CONT, ENDLOOP support, ported from r600c.

17 piglits more on r300g.tests.
2010-08-30 13:38:33 +10:00
Bas Nieuwenhuizen cd4bd4fb53 r600g: use the values from the correct literals
Created an array for literals as we should not always use the last declared literal.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30 09:41:02 +10:00
Bas Nieuwenhuizen e77b1e777d r600g: added literals where needed for POW instruction
Fixes size calculation for the bytecode buffer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30 09:41:02 +10:00
Jerome Glisse 48d8814c03 r600g: fix vbo size
Silence the kernel, vbo size is size - 1.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-27 16:54:00 -04:00
Dave Airlie 2184f3ec30 Revert "r600g: simplify states"
This reverts commit bd25e23bf3.

Apart from introducing a lot of hex magic numbers and being highly impenetable code,
it causes lots of lockups on an average piglit run that always runs without lockups.

Always run piglit before/after doing big things like this.
2010-08-27 15:45:58 +10:00
Dave Airlie a03d456f5a r600g: add initial if/else/endif support
this adds handling for some more CF instructions and conditions
also adds parameter for stack size emission

These seem to pass on VS with the stack size hack but not on FS,

TODO: fix FS + stack size calcs
2010-08-27 15:30:07 +10:00
Dave Airlie d8fb13bae3 r600g: optimise op2 and swapped op2 emission.
this makes op2 emission smaller, since it skips instructions
that don't write to the dst. not sure if this could have unwanted
side effects but try it and see.
2010-08-27 15:29:04 +10:00
Dave Airlie 36d91be75e r600g: add exp support in theory.
though it isn't passing the test, and this instruction is pure bonghits.
2010-08-27 15:29:04 +10:00
Dave Airlie e57437ccd6 r600g: add DPH support. 2010-08-27 15:29:03 +10:00
Jerome Glisse bd25e23bf3 r600g: simplify states
Directly build PM4 packet, avoid using malloc (no states are
bigger than 128 dwords), remove unecessary informations,
remove pm4 building in favor of prebuild pm4 packet.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-25 17:41:50 -04:00
Henri Verbeet 547e867558 r600g: Add support for PIPE_FORMAT_R32_FLOAT. 2010-08-24 20:52:21 +02:00
Dave Airlie 0e6a02d299 r600g: add XPD support
ported from r600c.
2010-08-24 09:56:22 +10:00
Dave Airlie 87f44d5723 r600g: add CMP support.
ported from r600c, fixes fp-cmp, glsl1-sqrt*
2010-08-24 09:18:32 +10:00
Henri Verbeet 6fb39f0fa2 r600g: Add support for PIPE_CAP_DEPTH_CLAMP. 2010-08-23 22:13:18 +02:00
Jerome Glisse bcf7f66a93 r600g: export one component per pixel + r7xx uncompression shader
We need to always at least export one component (wether it's depth
or color. Add valid r7xx shader program for depth decompression.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-23 15:42:32 -04:00
Jerome Glisse d843bbfd3f r600g: fix DB decompression
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-22 17:14:48 -04:00
Jerome Glisse ed99c28d12 r600g: depth buffer likely needs decompression when used as texture
Before using depth buffer as texture, it needs to be decompressed
(tile pattern of db are different from one used for colorbuffer
like texture)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-22 14:26:05 -04:00
Jerome Glisse 36efb86c05 r600g: partialy fix texturing from depth buffer + initial support for untiling
Partialy fix texturing from depth buffer, depth buffer is tiled
following different tile organisation that color buffer. This
properly set the tile type & array mode field of texture sampler
when sampling from db resource.

Add initial support to untiling buffer when transfering them,
it's kind of broken by corruption the vertex buffer of previous
draw.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-21 22:52:38 -04:00
Jerome Glisse a4b10a5614 r600g: add POW instruction
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-20 18:54:26 +02:00
Jerome Glisse 921c987c6f r600g: cleanup definition, fix segfault when no valid pixel shader
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-20 18:54:26 +02:00
Dave Airlie 63d010115c r600g: add occlusion query support
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-20 16:43:44 +02:00
Luca Barbieri ae0ef6f69f gallium: make all checks for PIPE_TEXTURE_2D check for PIPE_TEXTURE_RECT too
Searched for them with:
git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D'

Behavior hasn't been changed.
2010-08-20 12:04:00 +02:00
Alex Deucher 076c53879b r600g: update comments about ALU src operands 2010-08-19 12:06:20 -04:00
Dave Airlie 88f5976484 r600g: add sin/cos
This pretty much ports the code from r600c, however it doesn't
always seem to work quite perfectly, but I can't find anything in this
code that is wrong. I'm guessing either literal input or constants
aren't working always.
2010-08-19 15:36:55 +10:00
Dave Airlie 098064e8cb r600g: add a chiprev type for r600/r700/evergreen instead of using family 2010-08-19 15:36:54 +10:00
Dave Airlie 0d48925a56 r600g: add SSG, SEQ, SGT and SNE 2010-08-19 15:36:54 +10:00
Dave Airlie 3af87162cd r600g: add FRC, FLR, DDX and DDY
the first two are straight op2's and the DDX/DDY are taken from r600c.
2010-08-18 16:10:16 +10:00
Dave Airlie be288c3505 r600g: add SGE and SLE opcodes
fixes fp-set-01 and glsl-fs-step
2010-08-18 16:03:49 +10:00
Dave Airlie d01c0025e8 r600g: add TXB support
fixes biased texturing tests
2010-08-18 15:42:03 +10:00
Dave Airlie b777db3254 r600g: fix TXP vs TEX in shader.
Don't do perspective for TEX, and also copy input to a temporary for TEX

also add tex opcode names
2010-08-18 15:42:02 +10:00
Dave Airlie 4558b63455 r600g: add two simple tgsi opcodes.
makes glsl-fs-log2 and glsl1-integer division with uniform var pass
2010-08-18 13:48:04 +10:00
Dave Airlie 1147814365 r600g: fix point size
fixes piglit pointAtten and point-sprite tests
2010-08-18 13:30:34 +10:00
Dave Airlie 03c59e4ab1 r600g: fixup pitch alignment like r600c.
This still needs work, passes tex3d, fbo-scissor-bitmap, scissor-bitmap
2010-08-18 12:49:59 +10:00
Dave Airlie edb465e9bb r600g: fix height calcs for miptree
h needs to be rounded up, this probably needs revisiting when we get
to tiling etc.

fixes fbo-generatemipmap-npot
2010-08-18 10:50:19 +10:00
Dave Airlie 1d18739290 r600g: emit texture level offset in CB/DB setup.
8 more piglit tests pass,
fbo-clearmipmap, fbo-copyteximage, fbo-generatemipmap,
fbo-generatemipmap-nonsquare, fbo-generatemipmap-scissor,
fbo-generatemipmap-viewport, gen-teximage, gen-texsubimage
2010-08-18 10:35:09 +10:00
Jerome Glisse 608f749ec3 r600g: fix fake pixel output
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-17 17:25:08 -04:00
Dave Airlie 3e58007892 r600g: add user clip plane support.
Apart from the fact that the radeon.h/r600_states.h editing is a nightmare, this
wasn't so bad.

passes piglit user-clip test now also trivial tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-17 14:19:09 +10:00
Marek Olšák 4985ce1755 r600g: update shader caps
Sent on ML by Владимир.

These values are what fglrx returns.
2010-08-13 03:28:35 +02:00
Dave Airlie f2804e7062 r600g: fix memory leaks running gears.
I noticed gears memory usage was heading skywards, some r600 "states"
aren't properly refcounted, and the ctx->state is never freed.
2010-08-13 10:22:46 +10:00
Dave Airlie 582129ced6 r600g: fix typo in stencil translate.
fixes piglit stencil-twoside and stencil-wrap
2010-08-12 16:32:19 +10:00
Dave Airlie 13bc2098ca r600g: fix provoking-vertex piglit test. 2010-08-12 16:29:04 +10:00
Dave Airlie e2df0a8b23 r600g: improve texture format checker.
This takes the r300g texture format checker and fixes it up for r600g,
it passes glean texSwizzle, pixelformats, and texture_srgb tests,

however I think it L8S8_SRGB is broken as is L8_SRGB, need to investigate.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-12 16:20:31 +10:00
Jerome Glisse 481b65abae r600g: accept empty frag prog shader
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11 14:26:07 -04:00
Jerome Glisse 1bb0427a85 r600g: add src negation support
Should fix few glBitmap cases.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11 13:50:19 -04:00
Jerome Glisse 457378e031 r600g: add point/sprite rendering support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11 12:20:28 -04:00
Jerome Glisse 72f8edfc0b r600g: avoid reemiting literal, avoid scheduling empty cs
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-10 11:53:05 -04:00
Jerome Glisse 95fb0bf58d r600g: fix r600 context structure, avoid segfault when no scissor
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-09 11:33:25 -04:00
Marek Olšák 2cad5350f9 r600g: fix some warnings 2010-08-09 15:00:19 +02:00
Marek Olšák 00963589b4 r600g: fill out some missing caps and sort them
The shader caps need additional corrections.

(based on a patch from netkas at Phoronix)
2010-08-09 14:59:54 +02:00
Jerome Glisse d9f72b9f90 r600g: add PA_CL_CLIP_CNTL definition
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 17:27:36 -04:00
Jerome Glisse 32251c34f0 r600g: fix rendering, only enable target we write too
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 17:23:43 -04:00
Jerome Glisse b474478f20 r600g: really fix multi target support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 17:13:28 -04:00
Jerome Glisse c3ad060488 r600g: finish multi target rendering support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 16:12:22 -04:00
Jerome Glisse 27041d7cb3 r600g: fix color format, indentation, defines
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 11:28:33 -04:00
Jerome Glisse 6e6103004c Revert "r600g: don't use dynamic state allocation for states"
This reverts commit 9c949d4a4d.

Conflicts:

	src/gallium/drivers/r600/r600_context.h
	src/gallium/drivers/r600/r600_draw.c
	src/gallium/drivers/r600/r600_shader.c
	src/gallium/drivers/r600/r600_state.c
2010-08-06 10:59:27 -04:00
Dave Airlie 5f6ab5e259 r600g: start to fix up multiple targets.
fixup exports from pixel shader for multi-cbs + depth buffer writing.

Still crashes GPU running any of the multi-buffer or depth writing
2010-08-06 16:05:24 +10:00
Dave Airlie 0a2a6c75bf r600g: add SRGB support.
This enables GL2.1 and passes glean's texture_srgb test.
2010-08-06 15:21:44 +10:00
Dave Airlie fc47cb9d71 r600g: fixup z format translations.
this enables GL_EXT_packed_depth_stencil. fbo-d24s8 passes
2010-08-06 15:06:25 +10:00
Dave Airlie b8de7788a4 r600g: fix targetmask to work correctly.
At least this seems to fix the glean maskedClear test.
2010-08-06 14:54:24 +10:00
Dave Airlie 2b90364765 r600g: improve supported format selection.
This fixes fbo-readpixels piglit test, and adds support for swapping
the formats. Not all formats are correct yet I don't think.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-06 14:53:38 +10:00
Dave Airlie 121a625c16 r600g: add bo wait after map. 2010-08-06 11:46:52 +10:00
Jerome Glisse 9c949d4a4d r600g: don't use dynamic state allocation for states
Simplify state handly by avoiding state allocation.
Next step is to allocate once for all context packet
buffer and then avoid rebuilding pm4 packet each time
(through use of combined crc) this would also avoid
number of memcpy.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-05 15:41:35 -04:00
Jerome Glisse 12dac449fb r600g: force flush on map as temporary fix to readpixel
Should allow more piglit test to pass. Need to plugin
proper flushing.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-04 16:29:56 -04:00
Jerome Glisse 9a78e790dc r600g: always perform texture perspective divide + fix blending
quake3 engine seems to run fine at this point (ioquake)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-04 16:11:39 -04:00
Jerome Glisse dd863bf5e7 r600g: add polygon offset support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-03 17:45:51 -04:00
Jerome Glisse a0b3944c30 r600g: flush and resubmit if we reach limit
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-03 17:02:48 -04:00
Jerome Glisse 3a8d4a8979 r600g: fix color target mask
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-03 16:16:01 -04:00
Jerome Glisse 8f6341d421 r600g: fix stencil
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-03 15:49:21 -04:00
Jerome Glisse 7e42b7e5d2 r600g: fix LIT + fix multiple constant one ALU + fix ALU block splitting
Make sure LIT fills all slot for instruction (can't do W instruction
without having the Z slot filled with at least a NOP).

ALU instruction can't access more than 4 constant, move constant to
temporary reg if we reach the limit.

Fix ALU block splitting, only split ALU after ALU with last instruction
bit sets.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-03 14:31:49 -04:00
Jerome Glisse f031817450 r600g: split alu block to conform to limit + RCP opcode
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-02 17:41:52 -04:00
Jerome Glisse 313df41562 r600g: add autogenerated reg definition + debug print cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-02 14:22:58 -04:00
Dave Airlie 4af5f11c32 r600g: add stencil op/func translation 2010-08-02 16:27:15 +10:00
Dave Airlie 3f4ec394b0 r600g: initial alpha test state 2010-08-02 16:27:15 +10:00
Dave Airlie 7bcd39ce50 r600g: add initial blend state.
migrates cb_cntl to be regenerated
2010-08-02 16:27:01 +10:00
Dave Airlie 01984cf34f r600g: set correct tex coord type for rect textures. 2010-08-02 14:56:20 +10:00
Dave Airlie 919750a557 r600g: make r600_db_format static.
this isn't used anywhere else yet.
2010-08-02 14:31:49 +10:00
Vinson Lee 1d74a1674c r600g: Remove unnecessary header. 2010-07-31 19:23:14 -07:00
Vinson Lee 5fa1af0905 r600g: Remove unnecessary header. 2010-07-31 14:56:53 -07:00
Jerome Glisse 094d66f459 r600g: add KIL opcode support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-30 18:05:07 -04:00
Jerome Glisse 6c288d06ac r600g: fix typo in tex instruction + shader semantic id fix
It seems we never get semantic id from TGSI so fallback
to use output number as id.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-30 11:12:10 -04:00
Jerome Glisse 7a73390f91 r600g: mipmap early support + EX2/ABS instruction + culling
Add mipmap support (demos/src/redbook/mipmap is working)
Add EX2/ABS shader instruction support.
Add face culling support.

Misc fixes.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-29 19:05:57 -04:00
Chia-I Wu a57f842519 gallium: Keep only pipe_context::draw_vbo.
That is, remove pipe_context::draw_arrays, pipe_context::draw_elements,
pipe_context::draw_arrays_instanced,
pipe_context::draw_elements_instanced,
pipe_context::draw_range_elements.
2010-07-29 13:45:31 +08:00
Chia-I Wu 6d28bf917f gallium: Implement draw_vbo and set_index_buffer for all drivers.
Some drivers define a generic function that is called by all drawing
functions.  To implement draw_vbo for such drivers, either draw_vbo
calls the generic function or the prototype of the generic function is
changed to match draw_vbo.

Other drivers have no such generic function.  draw_vbo is implemented by
calling either draw_arrays and draw_elements.

For most drivers, set_index_buffer does not mark the state dirty for
tracking.  Instead, the index buffer state is emitted whenever draw_vbo
is called, just like the case with draw_elements.  It surely can be
improved.
2010-07-29 13:45:30 +08:00
Jerome Glisse 42c1f27149 r600g: state context ptr in sampler_view & add I8/L8 buffer format
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 20:09:15 -04:00
Jerome Glisse 35e044ab56 r600g: switch btw flat/linear interpolation
I am not sure how to properly handle flat shading regarding
non color parameter to fragment shader. It seems we should
still interpolate non color using linear interpolation and
flat shade only apply to color.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 19:59:38 -04:00
Jerome Glisse 6f0f6c6459 r600g: split pipe state creating/binding from hw state creation
Split hw vs pipe states creation handling as hw states group doesn't
match pipe state group exactly. Right now be dumb about that and
rebuild all hw states on each draw call. More optimization on that
side coming.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 19:36:16 -04:00
Jerome Glisse 742ee7935d r600g: cleanup resource buffer/texture mess
Use a common function, fix the mess it was before.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 12:18:19 -04:00
Jerome Glisse b346c4205d r600g: add lrp instruction support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 10:35:32 -04:00
Jerome Glisse 9961a0b92d r600g: actualy fix the literal emission
Previous patch added literal emission to wrong place, we
want to emit literal before emitting a new alu group.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-28 09:11:14 -04:00
Dave Airlie 2ab24a6fae r600g: fix up segfault with variation between views and count.
For some reason gallium hands us something with lots of empty views, and
we are expected to deal with it, just do what r300g does for this bit.
2010-07-28 15:28:18 +10:00
Dave Airlie f514ad0a9b r600g: use gallium util for float->ui conversion 2010-07-28 11:55:09 +10:00
Jerome Glisse 641c9adb09 r600g: texture support
Add texture mapping support, redbook/texbind works if
you comment out glClear and second checkboard. Need to
fix :
 - texture overwritting
 - lod & mip/map handling
 - unormalized coordinate handling
 - texture view with first leve > 0
 - and many other things

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-27 20:18:32 -04:00
Vinson Lee 6a20539580 r600g: Move declaration before code.
Fixes SCons build.
2010-07-27 15:33:45 -07:00
Jerome Glisse 2b3b76a4a0 r600g: always emit literal after emiting an alu instruction
Make sure we always fill in the literal after alu instruction.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-27 13:50:11 -04:00
Stephan Schmid 0bebdc230f r600g: implememt the LIT instruction 2010-07-26 10:34:05 -04:00
Jerome Glisse 33241134e6 r600g: first pass at texture support
This add texture support to the assembler, generated code is
wrong (tested against working dump).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-23 20:57:21 -04:00
Vinson Lee bd27db400a r600g: Fix SCons build. 2010-07-23 17:50:35 -07:00
Jerome Glisse cf864fd58b r600g: fix dp2, dp3, dp4 tokens
We need to make sure dp are all mirror accross the alu unit.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-23 18:19:13 -04:00
Jerome Glisse 5cc2974dff r600g: add RSQ token support
Could serve as an example on how to add more token
support.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-23 17:49:26 -04:00
Jerome Glisse de553d906b r600g: drop compiler stuff and switch over dumb tgsi assembler
Writing a compiler is time consuming and error prone in
order to allow r600g to further progress in the meantime
i wrote a simple tgsi assembler, it does stupid thing but
i would rather keep the code simple than having people
trying to optimize code it does.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-23 17:35:36 -04:00
Jerome Glisse 0bca8fbfda r600g: add support for all R6XX/R7XX asic
This configure some of the value properly based on
asic so others asic than RV710 works too.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-21 17:05:37 -04:00
Dave Airlie 4b2820534e r600g: add r600 compile mode to compiler.
some of the ALU instructions are different on r6xx vs r7xx,
separate the alu translation to separate files, and use family
to pick which compile stage to use.
2010-07-21 17:05:37 -04:00
Dave Airlie 9433d0e801 r600g: add family retrival
allow pipe driver to get the family of the gpu.
2010-07-21 17:05:36 -04:00
Jerome Glisse 62f8b56dc6 r600g: split trans unit computation
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-20 15:07:32 -04:00
Dave Airlie 8556b77c56 r600: use gallium list macros instead of making our own.
before this change, r600 glxinfo segfaulted in the list code, and I wasn't
debugging another linked list implementation, its 2010 after all.

So add the two missing list macros to the gallium header from X.org list header file (after fixing them), then port all r600 lists to the new header.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-02 15:27:17 +10:00
Jakob Bornecrantz a01e0afd9f Merge branch 'gallium-drm-driver-drescriptor'
Conflicts:
	src/gallium/state_trackers/egl/x11/native_dri2.c
	src/gallium/state_trackers/egl/x11/native_x11.c
	src/gallium/state_trackers/egl/x11/native_x11.h
	src/gallium/state_trackers/xorg/xorg_driver.c
	src/gallium/winsys/radeon/drm/radeon_drm.c
2010-06-28 21:14:45 +02:00
Jakob Bornecrantz 92fde20de3 r600g: Move bootstrap code to target 2010-06-24 02:15:50 +02:00
Marek Olšák eee570a0fe r600g: save vertex buffers in blitter 2010-06-09 02:26:44 +02:00
Zack Rusin 34f7681669 gallium: adjust the query interface to support custom types
we need to change it to support composite types
2010-06-08 06:28:11 -04:00
Vinson Lee 1574fb7846 r600g: Remove unnecessary header. 2010-06-07 16:54:18 -07:00
Jerome Glisse c6131879eb r600g: add shader literal constant support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-06-06 22:16:47 +02:00
Jerome Glisse 0db388eedd r600g: split instruction into scalar
Split instruction into scalar in core compiler this simplify
the way we translate the instruction in latter stage.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-06-05 17:13:25 +02:00
Marek Olšák 8819421a3b r600g: implement clear_{render_target, depth_stencil}, resource_copy_region
resource_copy_region uses a software fallback because it relies on texture
samplers which haven't been implemented yet.
2010-06-04 03:04:16 +02:00
Marek Olšák 7d0418d3dc r600g: make blit functions static (private) 2010-06-04 03:04:16 +02:00
Marek Olšák ffd0a2e215 r600g: use cast wrappers 2010-06-04 03:04:16 +02:00
Vinson Lee 42aad574f2 r600g: Move declaration before code.
Fixes SCons build.
2010-06-03 17:41:57 -07:00
Bas Nieuwenhuizen d6ba70c658 r600g: added code for depthtesting
- added code to configure the depth buffer and to set up depth testing.
2010-06-03 21:38:53 +02:00
Roland Scheidegger c674ce5e3a r600g: adapt to interface changes
r600g should be able to handle separate depth stencil clears as well.
Also adapt surface_fill/copy stubs to new interface (not that it matters).
2010-06-03 17:46:47 +02:00
Vinson Lee d062d21416 scons: Handle Python OSError exception when missing libdrm_radeon.
Instead of crashing when libdrm_radeon is unavailable, the SCons build
just does not build r600g.
2010-06-03 00:08:22 -07:00
Marek Olšák 4182d3ea00 r600g: remove unused struct r600_state
What was the purpose of it?
2010-05-31 04:16:24 +02:00
Vinson Lee 1202f17063 r600g: Remove unnecessary headers. 2010-05-30 15:30:05 -07:00
Marek Olšák 7d9396d7cf r600g: fix gallium function parameters 2010-05-29 15:41:22 +02:00
Marek Olšák 1d57b6ebd1 r600g: make a local copy of viewport state 2010-05-29 15:41:22 +02:00
Jerome Glisse 6a143b8424 r600g: disable rendering
Disable rendering to avoid GPU lockup.
Use radeondb to debug shader compiler :
radeondb -c gallium.bof
radeondb -s gallium.json
Will print shader generated, best is to use fp demos to test
the compiler.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-05-27 23:24:26 +02:00
Bas Nieuwenhuizen 9e8a6f801d r600g: various fixes
- enabled flushing a buffer more than once
- enabled the blitter for r600_clear
- added some more colors to r600_is_format_supported (copied from r600_conv_pipe_format)
- r600_set_framebuffer_state now sets rctx->fb_state
- more states are saved before a blit (had to add some accounting for the viewport and the vertex elements state)
- fixed a few errors with reference counting
2010-05-27 23:24:22 +02:00
Jerome Glisse e68b4e5053 r600g: fix driver + shader compiler backend change
Change the way we translate from c_compiler to the
asic specific representation. Should make things
simpler.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-05-27 23:24:17 +02:00
Jakob Bornecrantz aeee52691c r600g: Integrate into build
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
2010-05-27 23:24:12 +02:00
Jakob Bornecrantz 9abfc5ef60 r600g: Fix buffer offsets
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
2010-05-27 23:24:07 +02:00
Marek Olšák b8fb1d75ce r600g: adapt to latest interfaces changes
- Wrapped the buffer and texture create/destroy/transfer/... functions
  using u_resource, which is then used to implement the resource functions.
- Implemented texture transfers.
  I left the buffer and texture transfers separate because one day we'll
  need a special codepath for textures.
- Added index_bias to the draw_*elements functions.
- Removed nonexistent *REP and *FOR instructions.
- Some pipe formats have changed channel ordering, so I've removed/fixed
  nonexistent ones.
- Added stubs for create/set/destroy sampler views.
- Added a naive implementation of vertex elements state (new CSO).
- Reworked {texture,buffer}_{from,to}_handle.
- Reorganized winsys files, removed dri,egl,python directories.
- Added a new build target dri-r600.
2010-05-27 23:24:02 +02:00
Jerome Glisse 72128962d6 r600g: Initial import 2010-05-27 23:23:56 +02:00