summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv30
AgeCommit message (Collapse)AuthorFilesLines
2013-05-25gallium: Add support for multiple viewportsZack Rusin2-7/+11
Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-14draw: try to prevent overflows on index buffersZack Rusin1-2/+2
Pass in the size of the index buffer, when available, and use it to handle out of bounds conditions. The behavior in the case of an overflow needs to be the same as with other overflows in the vertex processing pipeline meaning that a vertex should still be generated but all attributes in it set to zero. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-14draw: don't crash on vertex buffer overflowZack Rusin1-1/+1
We would crash when stride was bigger than the size of the buffer. The correct behavior is to just fetch zero's in this case. Unfortunatly with user_buffer's there's no way to validate the size because currently we're just not getting it. Adjust the draw interface to pass the size along the mapped buffer, which works perfectly for buffer backed vertex_buffers and, in future, it will allow us to plumb user_buffer sizes through the same interface. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-11gallium: add PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE for GLMarek Olšák1-0/+1
v2: fix typo 65535 -> 65536 Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-04gallium: fix type of flags in pipe_context::flush()Chia-I Wu1-1/+1
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> [olv: document the parameter now that the type is unsigned]
2013-05-03scons: remove nouveau buildAndreas Boll1-11/+0
One build system for linux/unix only drivers should be enough. Additionally the nouveau target was disabled anyway. Acked-by: Jose Fonseca <jfonseca@vmware.com>
2013-04-23mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke18-72/+72
The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-23mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke18-18/+18
This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-18st/mesa: optionally apply texture swizzle to border color v2Christoph Bumiller1-0/+1
This is the only sane solution for nv50 and nvc0 (really, trust me), but since on other hardware the border colour is tightly coupled with texture state they'd have to undo the swizzle, so I've added a cap. The dependency of update_sampler on the texture updates was introduced to avoid doing the apply_depthmode to the swizzle twice. v2: Moved swizzling helper to u_format.c, extended the CAP to provide more accurate information.
2013-04-03nouveau: accelerate buffer copies in resource_copy_regionChristoph Bumiller1-2/+3
2013-04-03gallium: add PIPE_CAP_QUERY_PIPELINE_STATISTICSChristoph Bumiller1-0/+1
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-03-23gallium,st/mesa: don't use blit-based transfers with software rasterizersMarek Olšák1-0/+1
The blit-based paths for TexImage, GetTexImage, and ReadPixels aren't very fast with software rasterizer. Now Gallium drivers have the ability to turn them off. Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
2013-03-20gallium: add TGSI_SEMANTIC_TEXCOORD,PCOORD v3Christoph Bumiller3-20/+30
This makes it possible to identify gl_TexCoord and gl_PointCoord for drivers where sprite coordinate replacement is restricted. The new PIPE_CAP_TGSI_TEXCOORD decides whether these varyings should be hidden behind the GENERIC semantic or not. With this patch only nvc0 and nv30 will request that they be used. v2: introduce a CAP so other drivers don't have to bother with the new semantic v3: adapt to introduction gl_varying_slot enum
2013-03-19tgsi: use separate structure for indirect address v2Christian König1-1/+1
To further improve the optimization of source and destination indirect addressing we need the ability to store a reference to the declaration of the addressed operands. Since most of the fields in tgsi_src_register doesn't apply for an indirect addressing operand replace it with a separate tgsi_ind_register structure and so make room for extra information. v2: rename Declaration to ArrayID, put the ArrayID into () instead of [] Signed-off-by: Christian König <christian.koenig@amd.com>
2013-02-07nv30: Fix memory leak.Vinson Lee1-0/+1
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-04gallium/drivers: handle PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED queryBrian Paul1-0/+2
Initially, only softpipe/llvmpipe support SQRT.
2013-02-04gallium: handle unhandled PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENTAndreas Boll1-0/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60098 Signed-off-by: Brian Paul <brianp@vmware.com>
2013-02-01nv30: Fix memory leak.Vinson Lee1-0/+1
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-22nouveau/build: Fix build failures when drm is not in /usr/include.José Fonseca1-1/+2
Fixes failures to include libdrm/nouveau.h when drm is not installed in /usr/include. Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-01-19nouveau: fix undefined behaviour when testing sample_countChristoph Bumiller1-0/+2
NOTE: This is a candidate for the 9.0 branch.
2013-01-15gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATEMarek Olšák1-1/+0
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-13Remove hacks for static MakefilesMatt Turner1-3/+0
v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
2013-01-10Clean up .gitignore filesMatt Turner1-1/+0
2013-01-10nv30: Convert to automakeMatt Turner3-12/+37
2013-01-08nouveau: improve buffer transfersChristoph Bumiller1-1/+77
Save double memcpy on uploads to VRAM in most cases. Properly handle FLUSH_EXPLICIT. Reallocate on DISCARD_WHOLE_RESOURCE to avoid sync.
2013-01-04gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák1-1/+2
Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2012-12-22nouveau: deal with tbo cap for now.Dave Airlie1-0/+1
This fixes the printk running apps against master. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-20gallium: s/PIPE_CAP_TIMER_QUERY/PIPE_CAP_QUERY_TIME_ELAPSED/José Fonseca1-1/+1
To better reflect what it is being advertised. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-12-12gallium: remove pipe_surface::usageMarek Olšák1-1/+0
Not really used by anybody now. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-31gallium: expose ARB_map_buffer_alignment on RadeonMarek Olšák1-0/+1
Reviewed-by: Brian Paul <brianp@vmware.com> v2: update relnotes-9.1 v3: use align_malloc and align_free for malloced buffers in r300g v4: document the new CAP in the docs
2012-10-31gallium: add start_slot parameter to set_vertex_buffersMarek Olšák4-16/+20
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 <brianp@vmware.com>
2012-10-11gallium: unify transfer functionsMarek Olšák2-36/+25
"get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <brianp@vmware.com>
2012-10-09nouveau: use pre-calculated stride for resource_get_handleMarcin Slusarz1-2/+1
Fixes FDO#55294. NOTE: This is a candidate for the 9.0 branch.
2012-10-09nv30: fix type conversion warningMarek Olšák1-1/+1
2012-09-30gallium: remove resource_resolveMarek Olšák2-1/+2
The functionality is provided by the new blit function. Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-30nv30: implement blitMarek Olšák6-0/+80
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-30nv30: use util_format_is_supportedMarek Olšák1-10/+3
Hardware drivers *must* use it. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-30gallium: add PIPE_CAP_TEXTURE_MULTISAMPLEMarek Olšák1-0/+1
Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-05Remove useless checks for NULL before freeingMatt Turner1-6/+4
Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FREE (E); + E = NULL; - if (unlikely (E != NULL)) { - FREE(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + FREE ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - FREE((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + FREE (E); - if (unlikely (E != NULL)) { - FREE (E); - } @@ expression E; type T; @@ + FREE ((T) E); - if (unlikely (E != NULL)) { - FREE ((T) E); - } Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-01Revert "gallium: specify resource_resolve destination via a pipe_surface"Christoph Bumiller1-4/+1
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).
2012-07-28gallium: specify resource_resolve destination via a pipe_surfaceChristoph Bumiller1-1/+4
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 <brianp@vmware.com>
2012-07-20nv30: Support negative offsets in indirect constant access.Roy Spliet4-8/+15
Fixes piglit vp-address-01 amongst several others. Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl> Reviewed-by: Lucas Stach <dev@lynxeye.de> Tested-by: Lucas Stach <dev@lynxeye.de>
2012-07-13nouveau: implement missing timer query functionalityChristoph Bumiller2-3/+9
2012-07-10gallium: add QUERY_TIMESTAMP cap and get_timestamp screen functionMarek Olšák1-0/+1
2012-06-19gallium: Add PIPE_CAP_START_INSTANCEFredrik Höglund1-0/+1
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-11automake: Globally add stub automake targets to the old Makefiles.Eric Anholt1-3/+0
I tried to update all the old Makefiles that included the default config to be sure they had a default target if they didn't previously have one, since this new all target will always point at it. Almost everything had one. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-05nouveau: fix scratch buffer leakMarcin Slusarz1-1/+1
...and create common function for destroying nouveau_context
2012-05-31draw: simplify index buffer specificationBrian Paul1-3/+4
Replace draw_set_index_buffer() and draw_set_mapped_index_buffer() with draw_set_indexes() which simply takes a pointer and an index size.
2012-05-25nv30: Fix generic passing to fragment program in NV34.Roy Spliet3-5/+9
2012-05-25nv30: handle user index buffersChristoph Bumiller4-17/+27