Commit Graph

42720 Commits

Author SHA1 Message Date
Jakob Bornecrantz 3c74ecf687 i915g: Rework texture tiling a bit 2011-02-21 23:42:53 +00:00
Jakob Bornecrantz e7e1fd057e i915g: Anisotropic filtering works 2011-02-21 23:42:53 +00:00
Jakob Bornecrantz a641766576 i915g: TODO about point sprites 2011-02-21 23:42:53 +00:00
Jakob Bornecrantz e7cdcefbee i915g: TODO about untested code hidden behind caps
Should be fairly easy to test and fix since you can look at
the code in the classic driver.
2011-02-21 23:42:53 +00:00
Jakob Bornecrantz e3c9bf1a67 i915g: Reorg caps 2011-02-21 23:42:53 +00:00
Brian Paul 7dbafea860 st/mesa: fix incorrect texture size allocation in st_finalize_texture()
If finalizing a non-POW mipmapped texture with an odd-sized base texture
image we were allocating the wrong size of gallium texture (off by one).
Need to be more careful about computing the base texture image size.

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=34463
2011-02-21 15:15:53 -07:00
Brian Paul 4cdcec08d1 st/mesa: refactor guess_and_alloc_texture() code 2011-02-21 15:15:53 -07:00
Brian Paul 51f9713e39 st/mesa: fix mipmap generation for non-POW textures
This is part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=34463
2011-02-21 15:15:53 -07:00
Brian Paul e9ff76aa81 mesa: convert macros to inline functions 2011-02-21 15:15:53 -07:00
Brian Paul da9adb9613 vbo: more comments 2011-02-21 15:15:52 -07:00
Brian Paul 6f027ba20d vbo: make vbo_exec_FlushVertices_internal() static 2011-02-21 15:15:52 -07:00
Brian Paul bbd756e824 vbo: remove old debug code, add comments 2011-02-21 15:15:52 -07:00
Brian Paul 7cba2df4a6 vbo: rename, document function params 2011-02-21 15:15:52 -07:00
Brian Paul f0c8e7c327 vbo: comments 2011-02-21 15:15:52 -07:00
Brian Paul 0ba2810e47 vbo: replace assert(0) with proper assertions 2011-02-21 15:15:52 -07:00
Brian Paul ae4b6e04cd vbo: rename some vars, add new comments, fix formatting, etc. 2011-02-21 15:15:52 -07:00
Brian Paul 8b2598d000 vbo: use ctx instead of exec->ctx 2011-02-21 15:15:52 -07:00
Brian Paul f9e1542286 radeon: add default switch case to silence unhandled enum warning 2011-02-21 15:15:52 -07:00
Ian Romanick 497baf4e4a Use C-style system headers in C++ code to avoid issues with std:: namespace 2011-02-21 13:07:29 -08:00
Chris Wilson 5a1fbf0f70 intel: Fix insufficient integer width for upload buffer offset
I was being overly miserly and gave the offset of the buffer into the bo
insufficient bits, distracted by the adjacency of the buffer[4096].

Ref: https://bugs.freedesktop.org/show_bug.cgi?id=34541
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 20:58:09 +00:00
José Fonseca dcb21d8b1c svga: Remove some remaining fake S3TC rendering support. 2011-02-21 18:36:51 +00:00
Chris Wilson a43f20e069 i965: Remove spurious duplicate ADVANCE_BATCH
... a leftover from a bad merge.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 16:02:26 +00:00
Chris Wilson 2c6793fb6b i915: Emit a single relocation per vbo
Reducing the number of relocations has lots of nice knock-on effects,
not least including reducing batch buffer size, auxilliary array sizes
(vmalloced and copied into the kernel), processing of uncached
relocations etc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 13:04:46 +00:00
Chris Wilson 298ebb78de i915: Suppress emission of redundant stencil updates
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 13:04:46 +00:00
Chris Wilson 7c97e288fb i915: Separate BLEND from general context state.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 13:04:46 +00:00
Chris Wilson 4f82585e27 i915: Only flag context changes if the actual state is changed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 13:04:45 +00:00
Chris Wilson 0b0cad38c5 i915: suppress repeated sampler state emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 13:04:41 +00:00
Chris Wilson 87641cffd9 i915: Eliminate redundant CONSTANTS updates
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:37 +00:00
Chris Wilson 41260a9bf6 i965: Use compiler builtins when available
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:37 +00:00
Chris Wilson 8ea6e98c7b i965: Micro-optimise check_state
Replace the intermediate tests due to the logical or with the bitwise
or.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:37 +00:00
Chris Wilson 50ade6ea69 intel: use throttle ioctl for throttling
Rather than waiting on the first batch after the last swapbuffers to be
retired, call into the kernel to wait upon the retirement of any request
less than 20ms old. This has the twofold advantage of (a) not blocking
any other clients from utilizing the device whilst we wait and (b) we
attain higher throughput without overloading the system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:37 +00:00
Chris Wilson 46131a824f i965: Remove unused 'next_free_page' member
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:36 +00:00
Chris Wilson 57ca0803b3 intel: Skip the flush before read-pixels via blit
As we will flush when reading the return values of the blit, we can forgo
the earlier flush.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:36 +00:00
Chris Wilson c625aa19cb intel: extend current vertex buffers
If the next vertex arrays are a (discontiguous) continuation of the
current arrays, such that the new vertices are simply offset from the
start of the current vertex buffer definitions we can reuse those
defintions and avoid the overhead of relocations and invalidations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:36 +00:00
Chris Wilson a07e481179 intel: Use specified alignment for writes into the upload buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:36 +00:00
Chris Wilson d9e591391d i965: Clean up brw_prepare_vertices()
Use a temporary glarray variable to replace the numerous input->glarray.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:36 +00:00
Chris Wilson 3630d5b69a intel: combine short memcpy using a temporary allocated buffer
Using a temporary buffer for large discontiguous uploads into the common
buffer and a single buffered upload is faster than performing the
discontiguous copies through a mapping into the GTT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:36 +00:00
Chris Wilson dfc6c96e5c i965: upload normal arrays as interleaved
Upload the non-vbo arrays into a single interleaved buffer object, and
so need to just emit a single vertex buffer relocation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:35 +00:00
Chris Wilson 94d73d700e i965: interleaved vbo
If the user passed in several arrays interleaved in the same vbo, only
emit a single vertex buffer and relocation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:35 +00:00
Chris Wilson 559435d915 i965: emit one vb packet per vbo
Track reuse of the vertex buffer objects and so minimise the number of
vertex buffers used by the hardware (and their relocations).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:35 +00:00
Chris Wilson abb5109756 i965: upload transient indices into the same discontiguous buffer
As we now pack the indices into a common upload buffer, we can reuse a
single CMD_INDEX_BUFFER packet and translate each invocation with a
start vertex offset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:35 +00:00
Chris Wilson 60bb3e5614 i965: suppress repeat-emission of identical vertex elements
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:35 +00:00
Chris Wilson aac120977d i965: Move repeat-instruction-suppression to batchbuffer core
Move the tracking of the last emitted instructions into the core
batchbuffer routines and take advantage of the shadow batch copy to
avoid extra memory allocations and copies.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:35 +00:00
Chris Wilson 8d68a90e22 intel: use pwrite for batch
It's faster. Not only is the memcpy more efficiently performed in the
kernel (making up for the system call overhead), but by not using mmap
we remove the greater overhead of tracking the vma of every batch.

And it means we can read back from the batch buffer without incurring
the cost of a uncached read through the GTT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:35 +00:00
Chris Wilson 3f55683927 i965: drop state_bo references to batch_bo
As we use state relocations and we know that all the state belongs to
the same bo, we can drop the multiple references to the same bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:34 +00:00
Chris Wilson 1be3764dbe i965: directly write wm state to batch
As we write directly into the batch in system memory, we do not need to
write first to the stack (as was to avoid read back through the GTT)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:34 +00:00
Chris Wilson df156549e7 i965: write cc straight to batch
As we write directly into the batch in system memory, we do not need to
write first to the stack (as was to avoid read back through the GTT)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:34 +00:00
Chris Wilson f29606598e i965: switch gen6 to use its own cc state bo
In preparation for a greater change, use the color_calc_state_bo already
provisioned for this purpose.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:34 +00:00
Chris Wilson 8a9e67b8df intel: Buffered upload
Rather than performing lots of little writes to update the common bo
upon each update, write those into a static buffer and flush that when
full (or at the end of the batch). Doing so gives a dramatic performance
improvement over and above using mmaped access.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:34 +00:00
Chris Wilson 40ee15407a intel: Replace the bo for a complete update
Rather than performing a blit to completely overwrite a busy bo, simply
discard it and create a new one with the fresh data.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21 12:59:34 +00:00