summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx
AgeCommit message (Collapse)Author
2010-08-21nvfx: new 2D: rewrite miptree code, adapt transfersLuca Barbieri
Changes: - Disable swizzling on non-RGBA 2D textures, since the current 2D code is mostly broken in those cases. A later patch will fix this. Thanks to Andrew Randrianasulu who reported this. - Fix compressed texture transfers and hack around the current 2D code inability to copy compressed textures by using direct access. Thanks to Andrew Randrianasulu who reported this. This patch rewrites all the miptree layout and transfer code in the nvfx driver. The current code is broken in several ways: 1. 3D textures are laid out first by face, then by level, which is incorrect 2. Cube maps should have 128-byte aligned faces 3. Swizzled textures have a strange alignment test that seems unnecessary 4. We store the image_offsets for each face/slice but they can be easily computed instead 5. "Swizzling" is not supported for compressed formats. They can be "swizzled" but swizzling only means that there are no gaps (pitch is level-dependant) and the layout is still linear 6. Swizzling is not supported for non-RGBA formats. All formats (except possibly depth) can be swizzled according to my testing. The miptree layout is rewritten based on my empirical testing, which I posted in the "miptree findings" mail. The image_offset array is removed, since it can be calculated with a simple multiplication; the only array in the miptree structure is now the one for mipmap level starts, which it seems cannot be easily computed in constant time. Also, we now directly store a nouveau_bo instead of a pipe_buffer in the miptree structure, like nv50 does. Support for render temporaries is removed, and will be readded in a later patch. Note that the current temporary code is broken, because it does not copy the temporary back on render cache flushes.
2010-08-21nvfx: add nouveau_resource_on_gpuLuca Barbieri
Add a function to get whether a resource is likely on the GPU or not. Currently always returns TRUE.
2010-08-21nvfx: add linear flag for buffersLuca Barbieri
2010-08-21nvfx: properly unreference bound objects on context destructionLuca Barbieri
2010-08-21nvfx: reference count bound objectsLuca Barbieri
2010-08-21nvfx: fix format support code for compressed textureLuca Barbieri
A source line was put in the wrong place.
2010-08-20gallium: make all checks for PIPE_TEXTURE_2D check for PIPE_TEXTURE_RECT tooLuca Barbieri
Searched for them with: git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D' Behavior hasn't been changed.
2010-08-06nvfx: fix nv30 vertex program scalar opcodesLuca Barbieri
Apparently they have always been broken, even before unification. Fixes a lot of stuff, starting from morph3d and lighting in teapot with textures disabled.
2010-08-06nvfx: shut up unknown cap 64 warningLuca Barbieri
2010-07-29gallium: Keep only pipe_context::draw_vbo.Chia-I Wu
That is, remove pipe_context::draw_arrays, pipe_context::draw_elements, pipe_context::draw_arrays_instanced, pipe_context::draw_elements_instanced, pipe_context::draw_range_elements.
2010-07-29gallium: Implement draw_vbo and set_index_buffer for all drivers.Chia-I Wu
Some drivers define a generic function that is called by all drawing functions. To implement draw_vbo for such drivers, either draw_vbo calls the generic function or the prototype of the generic function is changed to match draw_vbo. Other drivers have no such generic function. draw_vbo is implemented by calling either draw_arrays and draw_elements. For most drivers, set_index_buffer does not mark the state dirty for tracking. Instead, the index buffer state is emitted whenever draw_vbo is called, just like the case with draw_elements. It surely can be improved.
2010-07-24nvfx: Move declaration before code.Vinson Lee
2010-07-21nouveau/nvfx: Add new PIPE_CAP valuesPatrice Mandin
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-06-09nvfx: fix typo from gallium-msaa mergeBen Skeggs
2010-06-08gallium: adjust the query interface to support custom typesZack Rusin
we need to change it to support composite types
2010-06-03gallium: rename clearRT / clearDS to clear_render_target / clear_depth_stencilRoland Scheidegger
more consistent with rest of gallium naming conventions. Also rename driver-internal names for these the same.
2010-05-29nvfx: adapt to clear interface changesRoland Scheidegger
2010-05-21Merge branch 'gallium-msaa'Roland Scheidegger
Conflicts: src/mesa/state_tracker/st_gen_mipmap.c src/mesa/state_tracker/st_texture.c
2010-05-21nouveau/nvfx: Fill more PIPE_CAP_MAX_ valuesPatrice Mandin
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-05-21Merge branch 'gallium-front-ccw'Keith Whitwell
2010-05-18gallium: implement set_sample_mask() in all driversRoland Scheidegger
prevents segfault when state trackers try to set default mask. Other option would be to make this required only for drivers supporting multisampling, but this seems more clean. Only dummy implementations (for normal drivers) provided (no driver supports multisampling yet neither).
2010-05-17nouveau: adapt to interface changesRoland Scheidegger
this probably needs further cleanup (just getting a surface for the resource seems quite nonoptimal and potentially cause unnecessary copies I think)
2010-05-14gallium: more work on ccw flag removalKeith Whitwell
The linux-debug target builds...
2010-05-14gallium: convert rasterizer state to use gl-style front/back conceptsKeith Whitwell
Use front/back instead of cw/ccw throughout. Also, use offset_point/line/fill instead of offset_cw/ccw. Brings gallium representation of this state into line with its main user, and also what turns out to be the most common hardware representation. This fixes a long-standing bias in the interface towards the architecture of the software rasterizer.
2010-05-12gallium: Make PIPE_CAP_xxx enums.José Fonseca
2010-05-05nouveau: only advertise PIPE_FORMAT_DXT* if s3tc availableXavier Chantry
2010-05-17gallium: EXT_timer_query support.Mathias Fröhlich
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-05-14nouveau/nvfx: Define some capabilities for shadersPatrice Mandin
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-04-27nvfx: Move src/gallium/drivers to beginning of SCons include path.Vinson Lee
libdrm-2.4.20 and earlier include the nouveau/nouveau_class.h header. A later version of libdrm will not ship this header. Mesa also has this header at src/gallium/drivers. The symbol NV34TCL_VTXFMT_TYPE_HALF is needed by nvfx_vbo.c. This symbol is not in the libdrm copy of the header but is in the Mesa copy of the header. This patch moves src/gallium/drivers to the beginning of the include paths such that when building on hosts with libdrm-2.4.20 or ealier the build uses the copy in Mesa.
2010-04-25nvfx: Add include path to SCons build.Vinson Lee
2010-04-25nvfx: Add missing header.Vinson Lee
2010-04-24nvfx: Add to SCons build.Vinson Lee
2010-04-20gallium: replace pipe_resource::_usage with pipe_resource::usageBrian Paul
2010-04-20nvfx: Fix typo.José Fonseca
2010-04-20Merge branch 'gallium-index-bias'José Fonseca
2010-04-19nvfx: Adapt for index bias interface change.José Fonseca
2010-04-19Merge branch '7.8'Brian Paul
Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pipe_aaline.c src/gallium/drivers/llvmpipe/lp_context.c
2010-04-18nvfx: Fix include recursion.Vinson Lee
Don't include nvfx_context.h and use a forward reference instead. nvfx_context.h includes nvfx_screen.h (itself).
2010-04-18nvfx: Add missing header and forward declaration.Vinson Lee
2010-04-18nvfx: move declarations before codeBrian Paul
2010-04-18nvfx: fix void * arithmetic warningBrian Paul
2010-04-18nvfx: move declarations before codeBrian Paul
2010-04-18nvfx: move declarations before code to silence warningsBrian Paul
2010-04-18nvfx: fix fragment program constant updatesLuca Barbieri
2010-04-17nvfx: Initialize variables.Vinson Lee
2010-04-17nvfx: Remove unused variables.Vinson Lee
2010-04-17nvfx: Remove unnecessary headers.Vinson Lee
2010-04-15nvfx: dont swizzle stuff into GARTXavier Chantry
swzsurf doesn't support GART Thanks to Marcin Kościelnicki <koriakin@0x04.net> for spotting that ! This fixes corruption in etracer and the following related errors : [14381.551927] [drm] nouveau 0000:01:00.0: PGRAPH_ERROR - nSource: PROTECTION_ERROR, nStatus: INVALID_STATE [14381.551945] [drm] nouveau 0000:01:00.0: PGRAPH_ERROR - Ch 2/2 Class 0x039e Mthd 0x0184 Data 0x00001cd9:0x00001cd9 Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Adapted by Luca Barbieri for mesa master.
2010-04-15nouveau: replace vtxbuf/idxbuf caps with BO_ flags in nouveau_screen and fix ↵Luca Barbieri
uncached reads on nv3x Faster, simpler and more flexible. Also, we set those flags properly on nv3x so that we don't allocate buffers in GART. Since on AGP GART is uncached, OpenGL doesn't distinguish between vertex and index buffers, and we don't support hardware index buffers for now, this caused uncached reads. Also check bind and not usage for PIPE_BIND_* flags, got broken in the gallium-resources transition.
2010-04-13nvfx: use dynamically sized rotating BO pool for fragment programsLuca Barbieri
Currently we used a single buffer for each fragment programs, leading to rendering synchronization. This patch uses a doubly linked list of BOs, which is dynamically resized if all the BOs are busy. Note that inline image transfers could be an alternative option: this will be explored later. This removes one of the big performance limitations of the current driver. We also stop using pipe_resource internally in favor of using nouveau_bo directly.