summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_resource.h
AgeCommit message (Collapse)Author
2010-11-03r600g: remove unused flink, domain fields from r600_resourceKeith Whitwell
These were being set but not used anywhere.
2010-11-03r600g: use a buffer in GTT as intermediate on texture up and downloadsKeith Whitwell
Generalize the existing tiled_buffer path in texture transfers for use in some non-tiled up and downloads. Use a staging buffer, which the winsys will restrict to GTT memory. GTT buffers have the major advantage when they are mapped, they are cachable, which is a very nice property for downloads, usually the CPU will want to do look at the data it downloaded.
2010-10-21r600g: introduce a per-driver resource flag for transfers.Dave Airlie
this is to be used to decide not to tile a surface being used for transfers.
2010-10-21r600g: add r600 surface to store the aligned height.Dave Airlie
we need to know the aligned height when binding the surface to cb/zb, not the gallium surface height.
2010-10-21r600g: move to per-miplevel array mode.Dave Airlie
Since the hw transitions from 2D->1D sampling below the 2D macrotile size we need to keep track of the array mode per level so we can render to it using the CB.
2010-10-13r600g: drop all use of unsigned longDave Airlie
this changes size on 32/64 bit so is definitely no what you want to use here.
2010-10-13r600g: remove bpt and start using pitch_in_bytes/pixels.Dave Airlie
this mirror changes in r300g, bpt is kinda useless when it comes to some of the non-simple texture formats.
2010-10-13r600g: rename pitch in texture to pitch_in_bytesDave Airlie
2010-10-08r600g: drop width/height per level storage.Dave Airlie
these aren't used anywhere, so just waste memory.
2010-10-04r600g: rename radeon_ws_bo to r600_boJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-29r600g: delete old pathJerome Glisse
Lot of clean can now happen. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28r600g: use ptr for blit depth uncompress functionJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-23r600g: use blitter to do db->cb flushing.Dave Airlie
use the blitter + custom stage to avoid doing a whole lot of state setup by hand. This makes life a lot easier for doing this on evergreen it also keeps all the state setup in one place. We setup a custom context state at the start with a flag to denote its for the flush, when it gets generated we generate the correct state for the flush and no longer have to do it all by hand. this should also make adding texture *to* depth easier.
2010-09-22r600g: fix typo in struct member nameDave Airlie
2010-09-19r600g: Fix false and true.Corbin Simpson
2010-09-17r600g: alternative command stream building from contextJerome Glisse
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-17r600g: add upload manager support.Dave Airlie
this add support for the upload manager for uploading user vbo/index buffers. this provides a considerable speedup in q3 type games.
2010-09-17r600g: move constant buffer creation behind winsys abstraction.Dave Airlie
this paves the way for moving to pb bufmgrs now.
2010-09-17r600g: attempt to abstract kernel bos from pipe driver.Dave Airlie
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-01r600g: avoid dynamic allocation of statesJerome Glisse
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-01Revert "Revert "r600g: precompute some of the hw state""Jerome Glisse
This reverts commit 1fa7245c348cb7aced81f1672140f64cb6450e2f. Conflicts: src/gallium/drivers/r600/r600_state.c
2010-09-01Revert "r600g: precompute some of the hw state"Dave Airlie
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.
2010-08-30r600g: precompute some of the hw stateJerome Glisse
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-22r600g: fix DB decompressionJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-22r600g: depth buffer likely needs decompression when used as textureJerome Glisse
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-21r600g: partialy fix texturing from depth buffer + initial support for untilingJerome Glisse
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-07-29r600g: mipmap early support + EX2/ABS instruction + cullingJerome Glisse
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-28r600g: cleanup resource buffer/texture messJerome Glisse
Use a common function, fix the mess it was before. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-05-27r600g: adapt to latest interfaces changesMarek Olšák
- 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.