summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_texture.c
AgeCommit message (Collapse)Author
2010-11-03r600g: propagate usage flags in texture transfersKeith Whitwell
2010-10-21r600g: add texture tiling enable under a debug option.Dave Airlie
At the moment you need kernel patches to have texture tiling work with the kernel CS checker, so once they are upstream and the drm version is bumped we can make this enable flip the other way most likely.
2010-10-21r600g: add texture tiling alignment support.Dave Airlie
this sets things up to align stride/height with tile sizes, it also adds support for the 2D/1D array mode cross over point.
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: start adding hooks for aligning width/height for tiles.Dave Airlie
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-21r600g: all non-0 mipmap levels need to be w/h aligned to POT.Dave Airlie
this adds a new minify function to the driver to ensure this.
2010-10-18r600g: retrieve tiling info from kernel for shared buffers.Dave Airlie
we need to know if the back is tiled so we can blit from it properly.
2010-10-18r600g: fix transfer function for tiling.Dave Airlie
this makes readback with tiled back work better.
2010-10-18r600g: depth needs to bound to dsDave Airlie
2010-10-18r600g: switch to a common formats.h file since they are in different regsDave Airlie
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: fix transfer stride.Dave Airlie
fixes segfaults
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-13r600g: use common texture object create functionDave Airlie
2010-10-13r600g: split out miptree setup like r300gDave Airlie
just a cleanup step towards tiling
2010-10-13r600g: add copy into tiled textureDave Airlie
2010-10-13r600g: fix depth0 settingDave Airlie
2010-10-13r600g: add support for S8, X24S8 and S8X24 sampler formats.Dave 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-30r600g: port r300g fix for X* formats in texformat codeDave Airlie
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: fix warnings since last commit.Dave Airlie
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: disable dirty handling on texture from depth code.Dave Airlie
nothing was every dirtying the object again, the mesa-demos reflect test was just stalling. this fixes glean readPixSanity.
2010-09-22r600g: fix typo in struct member nameDave Airlie
2010-09-21r600g: fixup evergreen miptree setup.Dave Airlie
eg seems to have a higher pitch aligmment requirement and uses r700 cube setup this fixes a couple of piglit tests here.
2010-09-20r600g: use pipe context for flushing inside mapJerome Glisse
This allow to share code path btw old & new, also remove check on reference this might make things a little slower but new design doesn't use reference stuff. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-20r600g: move chip class to radeon common structureJerome Glisse
So texture code can be shared btw new state design & old one. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-20r600g: fix r700 cube map sizing.Dave Airlie
this fixes fbo-cubemap on r700.
2010-09-20r600g: add color/texture support for more depth formats.Dave Airlie
2010-09-19r600g: Buffer object maps imply a wait.Henri Verbeet
Unless e.g. PB_USAGE_DONTBLOCK or PB_USAGE_UNSYNCHRONIZED would be specified.
2010-09-19r600g: Remove a redundant flush in r600_texture_transfer_map().Henri Verbeet
radeon_ws_bo_map() will already take care of that if needed.
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: 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-16r600g: fix texture bos and avoid doing depth blit on evergreenDave Airlie
since the depth blit code is hardcoded hex yay \o/
2010-09-16r600g: fixup texture state on evergreen.Dave Airlie
This whole set of state just seems wrong, another cut-n-paste nightmare.
2010-09-15r600g: misc cleanupJohn Doe
Avoid using r600_screen structure to get ptr to radeon winsys structure. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-10r600g: Fixed a bo leak in r600_texture_from_handle().Tilman Sauerbeck
We would leak bo if the argument check failed. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-10r600g: add initial evergreen supportDave Airlie
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-02r600g: fix depth texture testsDave Airlie
2010-09-01r600g: refix db/cb stateJerome Glisse
Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
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.