summaryrefslogtreecommitdiff
path: root/src/mesa
AgeCommit message (Collapse)Author
2011-02-21i915: Eliminate redundant CONSTANTS updatesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21i965: Use compiler builtins when availableChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21i965: Micro-optimise check_stateChris Wilson
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-21intel: use throttle ioctl for throttlingChris Wilson
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-21i965: Remove unused 'next_free_page' memberChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Skip the flush before read-pixels via blitChris Wilson
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-21intel: extend current vertex buffersChris Wilson
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-21intel: Use specified alignment for writes into the upload bufferChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21i965: Clean up brw_prepare_vertices()Chris Wilson
Use a temporary glarray variable to replace the numerous input->glarray. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: combine short memcpy using a temporary allocated bufferChris Wilson
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-21i965: upload normal arrays as interleavedChris Wilson
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-21i965: interleaved vboChris Wilson
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-21i965: emit one vb packet per vboChris Wilson
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-21i965: upload transient indices into the same discontiguous bufferChris Wilson
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-21i965: suppress repeat-emission of identical vertex elementsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21i965: Move repeat-instruction-suppression to batchbuffer coreChris Wilson
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-21intel: use pwrite for batchChris Wilson
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-21i965: drop state_bo references to batch_boChris Wilson
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-21i965: directly write wm state to batchChris Wilson
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-21i965: write cc straight to batchChris Wilson
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-21i965: switch gen6 to use its own cc state boChris Wilson
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-21intel: Buffered uploadChris Wilson
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-21intel: Replace the bo for a complete updateChris Wilson
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-21i965: Combine vb upload buffer with the general upload bufferChris Wilson
Reuse the new common upload buffer for uploading temporary indices and rebuilt vertex arrays. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Pack dynamic draws togetherChris Wilson
Dynamic arrays have the tendency to be small and so allocating a bo for each one is overkill and we can exploit many efficiency gains by packing them together. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Use system memory for DYNAMIC_DRAW source objectsChris Wilson
Dynamic draw buffers are used by clients for temporary arrays and for uploading normal vertex arrays. By keeping the data in memory, we can avoid reusing active buffer objects and reallocate them as they are changed. This is important for Sandybridge which can not issue blits within a batch and so ends up flushing the batch upon every update, that is each batch only contains a single draw operation (if using dynamic arrays or regular arrays from system memory). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21i965: Trim the trailing NOOP from 3DSTATE_INDEX_BUFFERChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21i965: Fallback on encountering a NULL render bufferChris Wilson
Following a GPU hang, or other error, the render target is not likely to have an allocated BO and so we must fallback to avoid using it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32534 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-18vbo: add debug code to verify that buffers are unmapped before drawingBrian Paul
2011-02-18mesa: MESA_VERBOSE logging for glRead/Draw/CopyPixels, glBlitFramebufferBrian Paul
2011-02-18st/mesa: set renderbuffer _BaseFormat in a few placesBrian Paul
NOTE: This is a candidate for the 7.9 and 7.10 branches
2011-02-18st/mesa: check buffer orientation in blit_copy_pixels()Brian Paul
Can't invert the region if copying between surfaces with different orientations.
2011-02-18st/mesa: fix geometry corruption by always re-binding vertex arraysMarek Olšák
This is a temporary workaround. It fixes sauerbrauten with shaders enabled. I guess we might be changing vertex attribs somewhere and not updating the appropriate dirty flags, therefore we can't rely on them for now. Or maybe we need to make this state dependent on some other flags too. More info: https://bugs.freedesktop.org/show_bug.cgi?id=34378
2011-02-18Point to bugs.freedesktop.org rather than bugzilla.freedesktop.orgCyril Brulebois
Suggested by a freedesktop.org admin. Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-02-17st/mesa: implement blit-based path for glCopyPixelsBrian Paul
If doing a simple non-overlapping glCopyPixels with no per-fragment ops we can use pipe_context::resource_copy_region().
2011-02-17mesa: fix comments for _mesa_clip_readpixels()Brian Paul
2011-02-17st/mesa: indentation fixBrian Paul
2011-02-17st/mesa: fix incorrect glCopyPixels position on fallback pathBrian Paul
If we hit the pipe_get/put_tile() path for setting up the glCopyPixels texture we were passing the wrong x/y position to pipe_get_tile(). The x/y position was already accounted for in the pipe_get_transfer() call so we were effectively reading from 2*readX, 2*readY. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-17mesa: Do copy propagation across if-else-endif.José Fonseca
Addresses excessive TEMP allocation in vertex shaders where all CONSTs are stored into TEMPS at the start, but copy propagation was failing due to the presence of IFs. We could do something about loops, but ifs are easy enough.
2011-02-17st/mesa: remove unused screen variablesBrian Paul
2011-02-17mesa: remove the MESA_NO_DITHER env varBrian Paul
This was sometimes useful back when 16-bit framebuffers were prominent.
2011-02-16mesa: make _mesa_write_renderbuffer_image() non-staticBrian Paul
2011-02-16mesa: 80-column wrapBrian Paul
2011-02-16mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2 and 4_4Marek Olšák
Oops, I copy-pasted a typo from 3_3_2. The 3_3_2 part is a candidate for 7.9 and 7.10. The 4_4 part isn't, because AL44 is in neither branches.
2011-02-16mesa: fix mipmap generation for MESA_FORMAT_AL44Marek Olšák
This was missed when implementing AL44.
2011-02-16mesa: Remove the DXT compression via blit path.José Fonseca
No longer used.
2011-02-16mesa: use gl_format type instead of GLuintBrian Paul
2011-02-15tnl: Add support for datatype GL_FIXED in vertex arraysChad Versace
Before populating the vertex buffer attribute pointer (VB->AttribPtr[]), convert vertex data in GL_FIXED format to GL_FLOAT. Fixes bug: http://bugs.freedesktop.org/show_bug.cgi?id=34047 NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-15gallium: add usage parameter to pipe_buffer_createMarek Olšák
And set a reasonable buffer usage flag everywhere instead of just PIPE_USAGE_DEFAULT.
2011-02-15st/mesa: fix compressed mipmap generation.Dave Airlie
If the underlying transfer had a stride wider for hw alignment reasons, the mipmap generation would generate badly strided images. this fixes a few problems I found while testing r600g with s3tc Signed-off-by: Dave Airlie <airlied@redhat.com>