aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_context.h
Commit message (Collapse)AuthorAgeFilesLines
* r600g: add upload manager support.Dave Airlie2010-09-171-0/+12
| | | | | | this add support for the upload manager for uploading user vbo/index buffers. this provides a considerable speedup in q3 type games.
* r600g: attempt to abstract kernel bos from pipe driver.Dave Airlie2010-09-171-2/+2
| | | | | | 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.
* r600g: hide radeon_ctx inside winsys.Dave Airlie2010-09-171-1/+1
| | | | no need for this info to be exported to pipe driver.
* r600g: fixup texture state on evergreen.Dave Airlie2010-09-161-0/+17
| | | | This whole set of state just seems wrong, another cut-n-paste nightmare.
* r600g: use index min/max + index buffer offset.Dave Airlie2010-09-161-0/+2
| | | | more prep work for fixing up buffer handling
* r600g: pull r600_draw struct out into headerDave Airlie2010-09-161-5/+15
| | | | we need this for future buffer rework, it also makes the vtbl easier
* r600g: add initial evergreen supportDave Airlie2010-09-101-0/+7
| | | | | | | | | | 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
* r600g: align flushing of cb/db with DDX/r600c.Dave Airlie2010-09-101-0/+3
| | | | | | | | | 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.
* r600g: add support for constants in memory buffers.Dave Airlie2010-09-081-0/+6
| | | | | | 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.
* r600g: abstract the hw states out behind a vtbl.Dave Airlie2010-09-081-0/+41
| | | | | this is step one towards evergreen support, it lets us plug in whole new hw level states.
* r600g: refactor sample states into a reusable struct.Dave Airlie2010-09-031-10/+13
| | | | | | I will not cut-n-paste. I will not cut-n-paste. I will not cut-n-paste.
* r600g: reduce size of r600 context structure to !insaneDave Airlie2010-09-031-3/+6
| | | | Its now about 7.8k, and might actually fit in a cache.
* r600g: add texture border state.Dave Airlie2010-09-031-0/+2
| | | | | | | 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.
* r600g: kill r600_context_state functionDave Airlie2010-09-031-1/+0
| | | | | | 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.
* r600g: fix memory/bo leakJerome Glisse2010-09-021-0/+1
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: fix binding of same texture to several target slotJerome Glisse2010-09-011-5/+8
| | | | | | | | | 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 <[email protected]>
* r600g: refix db/cb stateJerome Glisse2010-09-011-1/+1
| | | | | Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: avoid dynamic allocation of statesJerome Glisse2010-09-011-18/+13
| | | | | | | | | | | 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]>
* Revert "Revert "r600g: precompute some of the hw state""Jerome Glisse2010-09-011-1/+1
| | | | | | | | This reverts commit 1fa7245c348cb7aced81f1672140f64cb6450e2f. Conflicts: src/gallium/drivers/r600/r600_state.c
* Revert "r600g: precompute some of the hw state"Dave Airlie2010-09-011-1/+1
| | | | | | | | | | This reverts commit de0b76cab22caa9fc7260f80acb8f151ccced6c5, 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.
* r600g: precompute some of the hw stateJerome Glisse2010-08-301-1/+1
| | | | | | | | | | 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 <[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: add occlusion query supportDave Airlie2010-08-201-1/+36
| | | | | Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: add user clip plane support.Dave Airlie2010-08-171-0/+1
| | | | | | | | | 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 <[email protected]>
* r600g: improve texture format checker.Dave Airlie2010-08-121-0/+3
| | | | | | | | | 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 <[email protected]>
* r600g: fix r600 context structure, avoid segfault when no scissorJerome Glisse2010-08-091-1/+1
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* Revert "r600g: don't use dynamic state allocation for states"Jerome Glisse2010-08-061-15/+14
| | | | | | | | | | | 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: start to fix up multiple targets.Dave Airlie2010-08-061-1/+1
| | | | | | fixup exports from pixel shader for multi-cbs + depth buffer writing. Still crashes GPU running any of the multi-buffer or depth writing
* r600g: don't use dynamic state allocation for statesJerome Glisse2010-08-051-14/+15
| | | | | | | | | | 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-36/+2
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: fix LIT + fix multiple constant one ALU + fix ALU block splittingJerome Glisse2010-08-031-2/+2
| | | | | | | | | | | | | 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 <[email protected]>
* r600g: add initial blend state.Dave Airlie2010-08-021-0/+1
| | | | migrates cb_cntl to be regenerated
* gallium: Keep only pipe_context::draw_vbo.Chia-I Wu2010-07-291-11/+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/+3
| | | | | | | | | | | | | | | 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-20/+127
| | | | | | | | | 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: texture supportJerome Glisse2010-07-271-0/+12
| | | | | | | | | | | | | 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: drop compiler stuff and switch over dumb tgsi assemblerJerome Glisse2010-07-231-2/+3
| | | | | | | | | | 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 <[email protected]>
* r600g: make blit functions static (private)Marek Olšák2010-06-041-0/+1
|
* r600g: use cast wrappersMarek Olšák2010-06-041-0/+8
|
* r600g: remove unused struct r600_stateMarek Olšák2010-05-311-18/+0
| | | | What was the purpose of it?
* r600g: fix gallium function parametersMarek Olšák2010-05-291-4/+4
|
* r600g: make a local copy of viewport stateMarek Olšák2010-05-291-1/+1
|
* r600g: various fixesBas Nieuwenhuizen2010-05-271-2/+9
| | | | | | | | | - 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-3/+3
| | | | | | | | | | | | | | | | | - 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/+101