summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_draw.c
AgeCommit message (Collapse)Author
2010-11-08mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.Mario Kleiner
A call to radeon_prepare_render() at the beginning of draw operations was placed too deep in the call chain, inside r300RunRenderPrimitive(), instead of r300DrawPrims() where it belongs. This leads to emission of stale target color renderbuffer into the cs if bufferswaps via page-flipping are used, and thereby causes massive rendering corruption due to unsynchronized rendering into the active frontbuffer. This patch fixes such problems for use with the upcoming radeon page-flipping patches. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-07-11r300c: Fix vertex data setup for named buffer objects with unaligned offsetMaciej Cencora
Candidate for 7.8 branch Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
2010-02-19Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-14r300: Silence uninitialized variable warning.Vinson Lee
2010-02-06r300: Fix emit size prediction to know about primitive splitting.Pauli Nieminen
Fixes ut2004 warnings about overflowing command buffer.
2010-01-25Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/intel/intel_screen.c src/mesa/drivers/dri/intel/intel_swapbuffers.c src/mesa/drivers/dri/r300/r300_emit.c src/mesa/drivers/dri/r300/r300_ioctl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texstate.c
2010-01-23r300: Remove unnecessary headers.Vinson Lee
2010-01-23r300: half float supportDave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24radeon/r200/r300/r600: make bo mapping be explicitDave Airlie
This moves the bo mapping outside the DMA layer and makes it explicit, this should in theory make it simpler to split the clean up the dma/cmdbuf linkage that I created before that is broken. Tested on: r600, rv380 (tcl/no-tcl), rv200 (tcl/no-tcl) Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-08-31r300: Convert to shared debug code.Pauli Nieminen
2009-08-28r300: Fix emit prediction to account scissor emitting correctly.Pauli Nieminen
2009-08-25radeon/r200/r300/r600: Warn if we emit more than prediction was.Pauli Nieminen
Prediction code making too small prediction may cause space check aserttion failure later in rendering. So warning about any failure to predict correctly should be fixed.
2009-08-24Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into ↵Pauli Nieminen
r600_state_predict Conflicts: src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/radeon/radeon_cmdbuf.h
2009-08-22r300: Fix debug output.Pauli Nieminen
2009-08-22radeon/r300: Code clean up and logic fix.Pauli Nieminen
2009-08-22Fix r300 VBO support build on big endian.Michel Dänzer
2009-08-21r300: Remove calls to rcommonEnsureCmdBufSpace.Pauli Nieminen
All rendering is checked in r300PredictTryDrawPrimsSize which mamde these calls useless.
2009-08-21radeon: Improve state emit code.Pauli Nieminen
Trying to make understanding code easier with small refactoring and renaming.
2009-08-21r300: Add debug output to show how much was emited in TryDrawPrims.Pauli Nieminen
2009-08-21r300: Predict emit size for next rendering operation.Pauli Nieminen
We do flush for cmd buffer in case there isn't enough space left for whole rendering operation. This protects dma regions from getting released in middle of state emit. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21r300: Handle possible fall back if space check fails.Pauli Nieminen
2009-08-21r300: Delay allocation of dma regions in TryDrawprims.Pauli Nieminen
This makes it easier to predict size of next rendering operation so we can do early flush.
2009-08-18radeon: Optimize memory handling for dma operations.Pauli Nieminen
We keep dma buffer objects in list untill they have been unused for many draw operations. Current limit of having 100 flushes is just guess for good performance/memory trade off. Moving WARN_ONCE macro to common context because it is used in multiple drivers. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-18r300: fix the build on big endianAlex Deucher
2009-08-18r300: OQ reworkDave Airlie
Move to common code base so radeon/r200 can add support for this. Make OQ start a state emitted like all normal state, and make no-tcl flushing work in proper places. Really need a generic post emit space reservation mechanism like max_state so we can reserve some space for the emit this code passes demos/arbocclude, piglit occlusion query and glean occlusion query with TCL and NO-TCL on my rv530.
2009-08-18r300: fix big endian buildDave Airlie
2009-08-15r300: add occlusion queries supportMaciej Cencora
TODO: - use proper interface for checking if bo is idle when it's available - disable ZTOP only when needed - make it work under KMS
2009-08-15r300: fixup space checks since VBO codeDave Airlie
Hopefully this gets the ordering correct so the space checks don't fail.
2009-08-15radeon: enable vertex splitting for IBsDave Airlie
Based on Maciej's code, just fixed up the alignments for INDX_BUFFER ut2004 runs AS-Convoy
2009-08-15Merge branch 'vbo_clean'Maciej Cencora
Conflicts: src/mesa/drivers/dri/r300/r300_draw.c
2009-08-15r300: mark VBO buffer objects as persistentMaciej Cencora
2009-08-14r300: unmap buffer objects after usageMaciej Cencora
2009-08-14r300: remove broken vertex splittingMaciej Cencora
Revert to previous behaviour of dropping to big render operations.
2009-08-14r300: rework index buffer setupMaciej Cencora
Copy elements directly to DMA bo to get rid of one memcpy, and prepare for using VBOs for index buffer.
2009-08-14r300: use VBOs for vertex attributesMaciej Cencora
2009-08-12vbo: Avoid extra validation of DrawElements.Eric Anholt
This saves mapping the index buffer to get a bounds on the indices that drivers just drop on the floor in the VBO case (cache win), saves a bonus walk of the indices in the CheckArrayBounds case, and other miscellaneous validation. On intel it's a particularly a large win (50-100% in my app) because even though we let the indices stay in both CPU and GPU caches, we still end up waiting for the GPU to be done with the buffer before reading from it. Drivers that want the min/max_index fields must now check index_bounds_valid and use vbo_get_minmax_index before using them.
2009-07-27r300: Move vertex program compilation to compilerNicolai Hähnle
This is just the first step of refactoring. The separation is not yet clean enough with this commit. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Cleanup vertex_program structureNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-13r300: fix StrideB == 0 case when converting data formatMaciej Cencora
Reported-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-13r300: bind vertex program to fragment programMaciej Cencora
2009-07-08r300: fix regression introduced by ca13937ef97c7779f639dcfc95b3798a11de01bdMaciej Cencora
Stride == 0 means that we value for first vertex should be copied to every other vertices (e.g. constant color). This fixes glean/vertProg1 and sauerbraten with enabled shaders.
2009-07-06radeon: ensure cmdbuf space for state + AOS is availableDave Airlie
The problem is if we find out later we don't have any cmdbuf space but we've already written the arrays to the DMA buffer object, we end up emitting the current cmdbuf which has references to the current DMA object we then send that to the hw and we can't reference the arrays we just emitted to the old DMA buffer. things go bad, crash boom. This can probably be tuned further + swtcl probably needs some fixes
2009-07-05r300: fix vertex limitsMaciej Cencora
- don't limit vertex count if we are using indices - max indices count is 65535 not 65536 - remove some comments that don't apply anymore - remove unreachable code
2009-06-18r300: use vbo_split_prims to split up large vertex buffers.Dave Airlie
This lets ut2004 avoid hitting the elt warning.
2009-06-07r300: Endianness fixes for recent vertex path changes.Michel Dänzer
Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
2009-06-07r300: vertex array stride = 0 means that data are tightly packed in the arrayMaciej Cencora
2009-06-07r300: GL_(U)SHORT and GL_(U)BYTE with < 4 components can also be HW acceleratedMaciej Cencora
Also when index format is GL_UBYTE, convert it to GL_USHORT not GL_UINT. Fix license header too. Reported by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-06-07r300: add hw accelerated support for different vertex data formatsMaciej Cencora