aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák2017-05-101-13/+20
| | | | | | | | | | | | | | pipe_draw_info::indexed is replaced with index_size. index_size == 0 means non-indexed. Instead of pipe_index_buffer::offset, pipe_draw_info::start is used. For indexed indirect draws, pipe_draw_info::start is added to the indirect start. This is the only case when "start" affects indirect draws. pipe_draw_info::index is a union. Use either index::resource or index::user depending on the value of pipe_draw_info::has_user_indices. v2: fixes for nine, svga
* gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák2017-05-101-3/+3
|
* gallium: fold u_trim_pipe_prim call from st/mesa to driversMarek Olšák2017-04-201-0/+3
| | | | | | | Most drivers don't need it and shouldn't need it because it can't be used in some cases (indirect draws, primitive restart, count from streamout). Reviewed-by: Brian Paul <[email protected]>
* gallium/radeon: use cs_check_space throughoutNicolai Hähnle2016-06-011-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: remove use_reusable_pool parameter from buffer_createNicolai Hähnle2016-04-271-1/+1
| | | | | | All callers set this parameter to true. Reviewed-by: Marek Olšák <[email protected]>
* u_upload_mgr: pass alignment to u_upload_data manuallyMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove radeon_winsys_cs_handleMarek Olšák2015-12-111-5/+4
| | | | | | | | "radeon_winsys_cs_handle *cs_buf" is now equivalent to "pb_buffer *buf". Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: allow the winsys to choose the IB sizeMarek Olšák2015-08-061-1/+1
| | | | | | | Picked from the amdgpu branch. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-1/+1
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* r300g: pointless assignment of info.indexedDave Airlie2014-09-031-2/+0
| | | | | | | Did this code mean to do something else, you tell me! Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g/radeonsi: Use write-combined CPU mappings of some BOs in GTTMichel Dänzer2014-07-231-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* r300g/swtcl: fix a lockup in MSAA resolveMarek Olšák2013-07-151-0/+7
| | | | Cc: [email protected]
* r300g/swtcl: fix geometry corruption by uploading indices to a bufferMarek Olšák2013-07-151-39/+24
| | | | | | | | | | | | | The splitting of a draw call into several draw commands was broken, because the split sometimes took place in the middle of a primitive. The splitting was supposed to be dealing with the case when there are more indices than the maximum size of a CS. This commit throws that code away and uses a real index buffer instead. https://bugs.freedesktop.org/show_bug.cgi?id=66558 Cc: [email protected]
* r300g: implement MSAAMarek Olšák2013-01-061-52/+0
| | | | | | | | | | | | | | | | | | | | | | This is not as optimized as r600g - the MSAA compression is missing, so r300g needs a lot of bandwidth (more than r600g to do the same thing). However, if the bandwidth is not an issue for you, you can enjoy this unoptimized MSAA support. The only other missing optimization for MSAA is the fast color clear. MSAA is enabled on r500 only, because that's the only GPU family I tested. That said, MSAA should work on r300 and r400 as well (but you must set RADEON_MSAA=1 to allow it, then turn MSAA on in your app or set GALLIUM_MSAA=n, n >= 2, n <= 6) I will enable the support by default on r300-r400 once someone (other than me) tests those chipsets with piglit. The supported modes are 2x, 4x, 6x. The supported MSAA formats are RGBA8, BGRA8, and RGBA16F (r500 only). Those 3 formats are used for all GL internal formats. Tested with piglit. (I have ported all MSAA tests to GL2.1)
* r300g/swtcl: use memcpy to emit indicesMarek Olšák2013-01-041-10/+11
|
* r300g/swtcl: simplify vertex uploadingMarek Olšák2013-01-041-73/+32
| | | | | | | | - skip the vertex buffer reallocation in flush and just use the unsynchronized flag to get new memory. - remove the cruft needed to get around the issues with the vertex buffer reallocation in flush - use pb_buffer instead of pipe_resource
* r300g: don't call buffer_unmap in draw functionsMarek Olšák2012-11-131-11/+0
| | | | It's been a no-op anyway.
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-311-2/+0
| | | | | | | | | | | | | | | | | | | | | This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <[email protected]>
* gallium: remove resource_resolveMarek Olšák2012-09-301-2/+2
| | | | | | | The functionality is provided by the new blit function. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: add gallium blit implementationMarek Olšák2012-09-301-2/+1
| | | | | | | The original blit function is extended and the otAher functions reuse it. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "gallium: specify resource_resolve destination via a pipe_surface"Christoph Bumiller2012-08-011-1/+6
| | | | | | | | | | | This reverts commit 5d5af7d359e0060fa00b90a8f04900b96f9058b0. It turns out the issue this was supposed to fix merely counter-acted a bug in the hardware driver that I wasn't aware of. The resource_resolve is not supposed to do sRGB conversion, period. (This would violate the requirement that source and destination must be of the same format).
* gallium: specify resource_resolve destination via a pipe_surfaceChristoph Bumiller2012-07-281-6/+1
| | | | | | | | | | | The format member of pipe_surface may differ from that of the pipe_resource, which is used to communicate, for instance, whether sRGB encode should be enabled in the resolve operation or not. Fixes resolve to sRGB surfaces in mesa/st when GL_FRAMEBUFFER_SRGB is disabled. Reviewed-by: Brian Paul <[email protected]>
* r300g/swtcl: move vertex buffer updates into set_vertex_buffersMarek Olšák2012-05-121-11/+0
|
* r300g/swtcl: move index buffer updates from swtcl_draw_vbo into set_index_bufferMarek Olšák2012-05-121-10/+0
|
* r300g/swtcl: malloc vertex and index buffers (don't use radeon DRM to get them)Marek Olšák2012-05-121-31/+8
| | | | | | Vertex and index buffers are never used by hardware, only by Draw. SWTCL chipsets usually have very little memory, so this might help with stability and reliability.
* gallium: add void *user_buffer in pipe_index_bufferMarek Olšák2012-04-301-21/+26
| | | | | | | Adapted drivers: i915, llvmpipe, r300, r600, radeonsi, softpipe. User index buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
* gallium: add void *user_buffer in pipe_vertex_bufferMarek Olšák2012-04-301-2/+6
| | | | | | | | | | | | This reduces CPU overhead in st_draw_vbo and removes a lot of unnecessary code in that function which was required only to comply with the gallium interface, but wasn't any useful really. Adapted drivers: i915, llvmpipe, r300, softpipe. No changes required in: r600, radeonsi. User vertex buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
* winsys/radeon: simplify buffer map/unmap functionsMarek Olšák2012-04-291-4/+4
| | | | | The idea is not to use pb_map and pb_unmap wrappers, calling straight into the winsys.
* u_vbuf: pull u_vbuf_draw_max_vertex_count into r300gMarek Olšák2012-04-241-1/+50
|
* u_vbuf: remove u_vbuf_resourceMarek Olšák2012-04-241-7/+7
|
* u_vbuf: override draw_vboMarek Olšák2012-04-241-5/+1
|
* u_vbuf: override set_vertex_buffersMarek Olšák2012-04-241-13/+9
|
* u_vbuf: override set_index_bufferMarek Olšák2012-04-241-11/+11
| | | | This makes u_vbuf_mgr call the driver instead of the other way around.
* r300g: initialize state & render functions before creating u_vbuf & u_blitterMarek Olšák2012-04-041-7/+6
|
* r300g/swtcl: don't enter u_vbuf_mgrMarek Olšák2012-04-041-7/+7
|
* r300g: assert-fail when calling resource_resolveMarek Olšák2012-02-121-0/+3
| | | | And reset the dest pointer to NULL after it.
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <[email protected]> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <[email protected]> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <[email protected]> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* gallium: make vbuf_render::set_primitive() return voidBrian Paul2012-01-071-4/+2
| | | | All the implementations of this function always return TRUE.
* r300g: set max_index to 0xffffff if there are no per-vertex attribsMarek Olšák2011-11-201-2/+11
|
* u_vbuf_mgr: correctly compute max vertex count from hw buffersMarek Olšák2011-11-201-1/+8
| | | | | | | | And update r300g. This is different from util_draw_max_index in how it obtains vertex elements and that it doesn't have to call util_format_description due to additional precomputed data in vertex elements.
* r300g: use u_vbuf_mgr to set/get the index bufferMarek Olšák2011-11-201-11/+11
|
* r300g: always set VF_MIN_VTX_INDX to 0Marek Olšák2011-11-201-11/+10
| | | | It's not really useful to have non-zero there.
* r300g: don't call u_trim_pipe_prim in r300_swtcl_draw_vboMarek Olšák2011-10-231-5/+0
| | | | This was dead code anyway.
* Revert "r300g: fix rendering with a non-zero index bias in ↵Marek Olšák2011-10-161-3/+1
| | | | | | | | draw_elements_immediate" This reverts commit 5506f6ef966b8883e575a3f60ce96ad42ee6ffd2. It breaks more things than it fixes.
* r300g: fix rendering with a non-zero index bias in draw_elements_immediateMarek Olšák2011-10-041-1/+3
| | | | NOTE: This is a candidate for the stable branches.
* r300g: simplify the immd_is_good_idea functionMarek Olšák2011-09-291-26/+2
|
* u_vbuf_mgr: s/u_vbuf_mgr_/u_vbuf_Marek Olšák2011-09-261-2/+2
|
* u_vbuf_mgr: cleanup original vs real vertex buffer arraysMarek Olšák2011-09-261-5/+5
| | | | | | It can now override both buffer offsets and strides in additions to resources. Overriding buffer offsets was kinda hackish and could cause issues with non-native vertex formats.
* gallium: move clear paths from rgba to a pointer to a color union (v2)Dave Airlie2011-09-181-10/+10
| | | | | | | | | | | | | | | This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values. Notes: 1. the value is opaque. 2. only when the value is used should it be interpretered according to the surface format it is going to be used with. 3. float clears on integer buffers and vice-versa are undefined. v2: fixed up vega and graw, dropped hunks that shouldn't have been in patch. Signed-off-by: Dave Airlie <[email protected]>
* r300g: adapt to the resource_resolve interface changeMarek Olšák2011-08-051-21/+22
|