summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_draw.c
Commit message (Collapse)AuthorAgeFilesLines
* r600g: delete old pathJerome Glisse2010-09-291-190/+0
| | | | | | Lot of clean can now happen. Signed-off-by: Jerome Glisse <[email protected]>
* Revert "r600g: add initial vertex translate support."Dave Airlie2010-09-291-170/+1
| | | | | | | This reverts commit 914b669b082258fc05d0fec047b69949d88585c4. I didn't mean to commit this yet, will redo in new state system once we clean it up.
* r600g: add initial vertex translate support.Dave Airlie2010-09-291-1/+170
|
* r600g: Cleaned up index buffer reference handling in the draw module.Tilman Sauerbeck2010-09-281-1/+3
| | | | | | This fixes a buffer leak. Signed-off-by: Tilman Sauerbeck <[email protected]>
* r600g: Remove unused variable.Vinson Lee2010-09-251-1/+1
| | | | | | Fixes this GCC warning. r600_draw.c: In function 'r600_draw_common': r600_draw.c:71: warning: unused variable 'format'
* r600g: drop index_offset parameter to index buffer translate.Dave Airlie2010-09-241-17/+13
| | | | r600 doesn't need this as we always have working index bias
* r600g: fix draw-elements and draw-elements-base-vertexDave Airlie2010-09-241-5/+6
|
* r600g: add some more vertex format support.Dave Airlie2010-09-241-2/+1
| | | | adds the sscaled formats, this passes some more of the draw-vertices tests.
* r600g: Fix false and true.Corbin Simpson2010-09-191-1/+1
|
* r600g: drop debugging that snuck inDave Airlie2010-09-201-1/+0
|
* r600g: modify index buffers for sizes the hw can't deal with.Dave Airlie2010-09-201-2/+37
| | | | this just uses the common code from r300g now in util to do translations on r600g.
* Revert "r600g: Flush upload buffers before draws instead of before flushes."Henri Verbeet2010-09-191-5/+0
| | | | | | | This reverts commit a1d9a58b825825723f1c5f7705f2ed3ef834038a. Flushing the upload buffers on draw is wrong, uploads aren't supposed to cause flushes in the first place. The real issue was radeon_bo_pb_map_internal() not respecting PB_USAGE_UNSYNCHRONIZED.
* r600g: Flush upload buffers before draws instead of before flushes.Henri Verbeet2010-09-191-0/+5
| | | | | | | | | | If a upload buffer is used by a previous draw that's still in the CS, accessing it would need a context flush. However, doing a context flush when mapping the upload buffer would then flush/destroy the same buffer we're trying to map there. Flushing the upload buffers before a draw avoids both the CS flush and the upload buffer going away while it's being used. Note that u_upload_data() could e.g. use a pool of buffers instead of allocating new ones all the time if that turns out to be a significant issue.
* r600g: Remove unused variable.Vinson Lee2010-09-181-1/+0
|
* r600g: add upload manager support.Dave Airlie2010-09-171-2/+6
| | | | | | this add support for the upload manager for uploading user vbo/index buffers. this provides a considerable speedup in q3 type games.
* r600g: hide radeon_ctx inside winsys.Dave Airlie2010-09-171-2/+2
| | | | no need for this info to be exported to pipe driver.
* r600g: add vgt dma src definesDave Airlie2010-09-161-3/+3
|
* r600g: use index min/max + index buffer offset.Dave Airlie2010-09-161-0/+6
| | | | more prep work for fixing up buffer handling
* r600g: pull r600_draw struct out into headerDave Airlie2010-09-161-14/+2
| | | | we need this for future buffer rework, it also makes the vtbl easier
* r600g: Fixed a bo reference leak in the draw module.Tilman Sauerbeck2010-09-101-0/+5
| | | | Signed-off-by: Tilman Sauerbeck <[email protected]>
* r600g: abstract the hw states out behind a vtbl.Dave Airlie2010-09-081-47/+5
| | | | | this is step one towards evergreen support, it lets us plug in whole new hw level states.
* r600g: fix memory/bo leakJerome Glisse2010-09-021-0/+4
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: refix db/cb stateJerome Glisse2010-09-011-2/+2
| | | | | Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: avoid dynamic allocation of statesJerome Glisse2010-09-011-47/+45
| | | | | | | | | | | 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 <[email protected]>
* r600g: fixup states generation in winsys.Dave Airlie2010-08-301-4/+7
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* r600g: fix vbo sizeJerome Glisse2010-08-271-1/+1
| | | | | | Silence the kernel, vbo size is size - 1. Signed-off-by: Jerome Glisse <[email protected]>
* Revert "r600g: simplify states"Dave Airlie2010-08-271-25/+21
| | | | | | | | | This reverts commit bd25e23bf3740f59ce8859848c715daeb9e9821f. 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.
* r600g: simplify statesJerome Glisse2010-08-251-21/+25
| | | | | | | | 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 <[email protected]>
* r600g: depth buffer likely needs decompression when used as textureJerome Glisse2010-08-221-1/+1
| | | | | | | | 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 <[email protected]>
* r600g: fix some warningsMarek Olšák2010-08-091-1/+1
|
* Revert "r600g: don't use dynamic state allocation for states"Jerome Glisse2010-08-061-52/+52
| | | | | | | | | | | This reverts commit 9c949d4a4dd43b7889e13bdf683bcf211f049ced. 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
* r600g: improve supported format selection.Dave Airlie2010-08-061-4/+2
| | | | | | | 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 <[email protected]>
* r600g: don't use dynamic state allocation for statesJerome Glisse2010-08-051-64/+51
| | | | | | | | | | 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 <[email protected]>
* r600g: flush and resubmit if we reach limitJerome Glisse2010-08-031-0/+4
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* gallium: Keep only pipe_context::draw_vbo.Chia-I Wu2010-07-291-50/+0
| | | | | | | 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.
* gallium: Implement draw_vbo and set_index_buffer for all drivers.Chia-I Wu2010-07-291-0/+27
| | | | | | | | | | | | | | | 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.
* r600g: split pipe state creating/binding from hw state creationJerome Glisse2010-07-281-18/+16
| | | | | | | | | 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 <[email protected]>
* r600g: cleanup resource buffer/texture messJerome Glisse2010-07-281-2/+3
| | | | | | Use a common function, fix the mess it was before. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: texture supportJerome Glisse2010-07-271-0/+11
| | | | | | | | | | | | | 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 <[email protected]>
* r600g: use cast wrappersMarek Olšák2010-06-041-2/+2
|
* r600g: fix gallium function parametersMarek Olšák2010-05-291-5/+5
|
* r600g: various fixesBas Nieuwenhuizen2010-05-271-4/+4
| | | | | | | | | - 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
* r600g: adapt to latest interfaces changesMarek Olšák2010-05-271-5/+7
| | | | | | | | | | | | | | | | | - 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.
* r600g: Initial importJerome Glisse2010-05-271-0/+215