summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* softpipe: do texture swizzle during texture samplingBrian Paul2010-12-144-15/+114
| | | | | | Instead of when we read texture tiles. Now swizzling happens after the shadow depth compare step. This fixes the piglit glsl-fs-shadow2d* tests (except for proj+bias because of a GLSL bug).
* tgsi: document texture opcodesBrian Paul2010-12-141-6/+58
|
* gallivm: do texture swizzle after shadow compareBrian Paul2010-12-142-4/+2
| | | | | | | | | We need to swizzle after the shadow comparison so that the GL_DEPTH_MODE functionality is handled properly. This fixes all the piglit glsl-fs-shadow2d*.shader_test cases, except for glsl-fs-shadow2dproj-bias.shader_test which fails because of a bug in the GLSL compiler (fd.o 32395).
* r600g: fix segfault when translating vertex bufferJerome Glisse2010-12-144-21/+10
| | | | | | | | | Note the support for non float vertex draw likely regressed need to find what we want to do there. candidates for 7.10 branches Signed-off-by: Jerome Glisse <[email protected]>
* gallivm: store callbacks in a linked list rather than fixed size arrayBrian Paul2010-12-131-26/+28
| | | | Should fix http://bugs.freedesktop.org/show_bug.cgi?id=32308
* r600g: fix rendering with a vertex attrib having a zero strideAlex Deucher2010-12-121-4/+6
| | | | | | | | | The hardware supports zero stride just fine. This is a port of 2af8a1983180fc0168c1e0e53bcc69ee3d684ea4 from r300g. NOTE: This is a candidate for both the 7.9 and 7.10 branches. Signed-off-by: Alex Deucher <[email protected]>
* r300g: fixup rs690 tiling stride alignment calculations.Dave Airlie2010-12-133-31/+19
| | | | | | | | | | | | | The RS690 memory controller prefers things to be on a different boundary than the discrete GPUs, we had an attempt to fix this, but it still failed, this consolidates the stride calculation into one place and removes the really special case check. This fixes gnome-shell and 16 piglit tests on my rs690 system. NOTE: This is a candidate for both the 7.9 and 7.10 branches. Signed-off-by: Dave Airlie <[email protected]>
* r300g: fix rendering with a vertex attrib having a zero strideMarek Olšák2010-12-111-7/+7
| | | | | | | | | The hardware apparently does support a zero stride, so let's use it. This fixes missing objects in ETQW, but might also fix a ton of other similar-looking bugs. NOTE: This is a candidate for both the 7.9 and 7.10 branches.
* tgsi: fix rbug compile errorMarek Olšák2010-12-111-1/+2
| | | | | | | ../mesa/src/gallium/auxiliary/tgsi/tgsi_parse.h:139: error: dereferencing pointer ‘tokens.25’ does break strict-aliasing rules Signed-off-by: Marek Olšák <[email protected]>
* r600g: fix bo size when creating bo from handleJerome Glisse2010-12-101-1/+1
| | | | | | Spoted by Alex Diomin Signed-off-by: Jerome Glisse <[email protected]>
* targets/egl: Improve st_GL.so loading.Chia-I Wu2010-12-101-0/+15
| | | | | | | | | | | | When the application is not linked to any libGL*.so, loading st_GL.so would give /usr/local/lib/egl/st_GL.so: undefined symbol: _glapi_tls_Context In that case, load libGL.so and try again. This works because util_dl_open loads with RTLD_GLOBAL. Fix "clear" OpenGL ES 1.1 demo.
* target/egl: Fix misleading debug message.Chia-I Wu2010-12-101-2/+7
| | | | | | | When the name of the module is NULL, the process itself is dlopen()ed. Do not print libEGL debug: searching for st module (null)
* draw/llvm: don't flush in vs_llvm_delete()Brian Paul2010-12-091-12/+0
| | | | | | | | | | | | | | | | | | Fixes piglit glx-shader-sharing crash. When shaders are shared by multiple contexts, the shader's draw context pointer may point to a previously destroyed context. Dereferencing the context pointer will lead to a crash. In this case, simply removing the flushing code avoids the crash (the exec and sse shader paths don't flush here either). There's a deeper issue here, however, that needs examination. Shaders should not keep pointers to contexts since contexts might get destroyed at any time. NOTE: This is a candidate for the 7.10 branch (after this has been tested for a while).
* draw/llvm: remove redundant commentBrian Paul2010-12-091-1/+0
|
* draw/llvm: remove extraneous conditionalBrian Paul2010-12-091-6/+4
|
* r600g: Fix SCons build.Vinson Lee2010-12-094-4/+5
|
* r600g: indentation cleanupJerome Glisse2010-12-092-23/+21
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: specialized upload managerJerome Glisse2010-12-098-109/+176
| | | | | | | | | Allow important performance increase by doing hw specific implementation of the upload manager helper. Drop the range flushing that is not hit with this code (and wasn't with previous neither). Performance improvement are mostly visible on slow CPU. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: avoid using pb* helper we are loosing previous cpu cycle with itJerome Glisse2010-12-099-388/+364
| | | | | | | | | | | | r600g is up to a point where all small CPU cycle matter and pb* turn high on profile. It's mostly because pb try to be generic and thus trigger unecessary check for r600g driver. To avoid having too much abstraction & too much depth in the call embedded everythings into r600_bo. Make code simpler & faster. The performance win highly depend on the CPU & application considered being more important on slower CPU and marginal/unoticeable on faster one. Signed-off-by: Jerome Glisse <[email protected]>
* llvmpipe: Plug fence leaks.José Fonseca2010-12-092-0/+3
|
* r600g: fix userspace fence against lastest kernelJerome Glisse2010-12-072-0/+3
| | | | | | | | | | | | | R6XX GPU doesn't like to have two partial flush writting back to memory in row without a prior flush of the pipeline. Add PS_PARTIAL_FLUSH to flush all work between the CP and the ES, GS, VS, PS shaders. Thanks a lot to Alban Browaeys (prahal on irc) for investigating this issue. Signed-off-by: Alban Browaeys <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: remove dead codeJerome Glisse2010-12-076-268/+8
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r300g: also revalidate the SWTCL vertex buffer after its reallocationMarek Olšák2010-12-071-0/+1
|
* r300g: validate buffers only if any of bound buffers is changedMarek Olšák2010-12-077-13/+39
| | | | This prevents needless buffer validation (CS space checking).
* r300g: cache packet dwords of 3D_LOAD_VBPNTR in a command buffer if possibleMarek Olšák2010-12-073-15/+65
| | | | | | | | | It's not always possible to preprocess the content of 3D_LOAD_VBPNTR in a command buffer, because the offset to all vertex buffers (which the packet depends on) is derived from the "start" parameter of draw_arrays and the "indexBias" parameter of draw_elements, but we can at least lazily make a command buffer for the case when offset == 0, which should occur most of the time.
* u_blitter: use util_is_format_compatible in the assertMarek Olšák2010-12-071-1/+2
|
* r600g: remove useless flush mapJerome Glisse2010-12-062-30/+1
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: avoid useless shader rebuild at draw callJerome Glisse2010-12-067-47/+108
| | | | | | | | | Avoid rebuilding constant shader state at each draw call, factor out spi update that might change at each draw call. Best would be to update spi only when revealent states change (likely only flat shading & sprite point). Signed-off-by: Jerome Glisse <[email protected]>
* r600g: build fetch shader from vertex elementsJerome Glisse2010-12-0611-44/+619
| | | | | | | | | | | | Vertex elements change are less frequent than draw call, those to avoid rebuilding fetch shader to often build the fetch shader along vertex elements. This also allow to move vertex buffer setup out of draw path and make update to it less frequent. Shader update can still be improved to only update SPI regs (based on some rasterizer state like flat shading or point sprite ...). Signed-off-by: Jerome Glisse <[email protected]>
* gallium/util: minor formatting fixesBrian Paul2010-12-061-3/+3
|
* mapi: Rewrite mapi_abi.py to get rid of preprocessor magic.Chia-I Wu2010-12-065-21/+20
| | | | | | | | The preprocessor magic in mapi was nothing but obfuscation. Rewrite mapi_abi.py to generate real C code. This commit removes the hack added in 43121f20866bb89e8dac92bd92ec85a943704b7e.
* egl: _eglFilterArray should not allocate.Chia-I Wu2010-12-061-2/+13
| | | | | Otherwise, when it is called from within a driver, the caller cannot free the returned data (on Windows).
* r600g: Cleanup fetch shader resources in r600_pipe_shader_destroy().Henri Verbeet2010-12-051-0/+5
|
* r600g: Cleanup block bo references in r600_context_fini().Henri Verbeet2010-12-051-0/+3
|
* gallium/trace: check bind_vertex_sampler_states and set_vertex_sampler_viewsXavier Chantry2010-12-051-0/+6
| | | | | | Signed-off-by: Xavier Chantry <[email protected]> Reviewed-by: Jakob Bornecrantz <wallbraker at gmail.com> Signed-off-by: Patrice Mandin <[email protected]>
* init ps->context with util_surfaces_get and do_getXavier Chantry2010-12-054-14/+16
| | | | | | Signed-off-by: Xavier Chantry <[email protected]> Reviewed-by: Jakob Bornecrantz <wallbraker at gmail.com> Signed-off-by: Patrice Mandin <[email protected]>
* nvfx: fixes after array textures mergeXavier Chantry2010-12-054-19/+35
| | | | | Signed-off-by: Xavier Chantry <[email protected]> Signed-off-by: Patrice Mandin <[email protected]>
* r300g: optimize looping over atomsMarek Olšák2010-12-0513-119/+121
| | | | This also removes DBG_STATS (the stats can be obtained with valgrind instead).
* r300g: cleanup winsysMarek Olšák2010-12-0517-640/+456
|
* r300g: try and use all of vertex constant spaceDave Airlie2010-12-054-47/+62
| | | | | | | | | | Finished up by Marek Olšák. We can set the constant space to use a different area per-call to the shader, we can avoid flushing the PVS as often as we do by spreading out the constants across the whole constant space. Signed-off-by: Marek Olšák <[email protected]>
* r300g: do not use the index parameter in set_constant_bufferMarek Olšák2010-12-051-2/+1
| | | | | | It appears to be a constant buffer index (in case there are more constant buffers explicitly used by a shader), i.e. something that Gallium currently does not use. We treated it incorrectly as the offset to a constant buffer.
* gallium/noop: Add prototype for noop_init_state_functions.Vinson Lee2010-12-041-0/+2
| | | | | | Silences this GCC warning. noop_state.c:247: warning: no previous prototype for 'noop_init_state_functions'
* st/vega: Fix pipe blend state for various blend modes.Chia-I Wu2010-12-043-60/+76
| | | | | | | | | rgb_src_factor and rgb_dst_factor should be PIPE_BLENDFACTOR_ONE for VG_BLEND_SRC_IN and VG_BLEND_DST_IN respectively. VG_BLEND_SRC_OVER can be supported only when the fb has no alpha channel. VG_BLEND_DST_OVER and VG_BLEND_ADDITIVE have to be supported with a shader. Note that Porter-Duff blending rules assume premultiplied alpha.
* st/vega: Add blend shaders for all blend modes.Chia-I Wu2010-12-044-72/+145
|
* st/vega: Fix VG_BLEND_MULTIPLY.Chia-I Wu2010-12-041-1/+1
| | | | | TEMP[1].w will be needed for OUT.w just below. Use TEMP[0] to store the intermediate value.
* st/vega: Silence uninitialized variable warning.Vinson Lee2010-12-041-0/+1
| | | | | | Fixes this GCC warning. api_filters.c: In function 'execute_filter': api_filters.c:184: warning: 'tex_wrap' may be used uninitialized in this function
* st/vega: Blending should use premultiplied alpha.Chia-I Wu2010-12-041-8/+72
| | | | | | Convert color values to and back from premultiplied form for blending. Finally the rendering result of the blend demo looks much closer to that of the reference implementation.
* st/vega: Add support for per-channel alpha.Chia-I Wu2010-12-044-41/+140
| | | | | | | | | | Drawing an image in VG_DRAW_IMAGE_STENCIL mode produces per-channel alpha for use in blending. Add a new shader stage to produce and save it in TEMP[1]. For other modes that do not need per-channel alpha, the stage does MOV TEMP[1], TEMP[0].wwww
* st/vega: Move masking after blending.Chia-I Wu2010-12-044-58/+58
| | | | | Masking should happen after blending. The shader is not entirely correct, but leave it as is for now.
* st/vega: Refactor blend shaders.Chia-I Wu2010-12-041-62/+112
| | | | | | | | | Add a helper function, blend_generic, that supports all blend modes and per-channel alpha. Make other blend generators a wrapper to it. Both the old and new code expects premultiplied colors, yet the input is non-premultiplied. Per-channel alpha is also not used for stencil image. They still need to be fixed.