summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove target parameter from dd_function_table::BufferSubDataIan Romanick2011-08-236-8/+5
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::MapBufferIan Romanick2011-08-2324-69/+40
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::UnmapBufferIan Romanick2011-08-2326-75/+53
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* make: Add missing source file.José Fonseca2011-08-231-0/+1
|
* i965: Fix typo in 2b224d66a01f3ce867fb05558b25749705bbfe7aEric Anholt2011-08-231-1/+1
| | | | | | | | | Unfortunately, since a previous efficiency improvement, we no longer have any open-source testcases producing register spilling, so this code was untested in the fragment shader path. That should change when we get proper temporary array support in the fragment shader. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40194
* i965/gen6+: Use non-normalized coordinates for GL_TEXTURE_RECTANGLE.Eric Anholt2011-08-234-2/+19
| | | | | Improves performance of a GL_TEXTURE_RECTANGLE microbenchmark by 1.84% +/- .15% (n=3)
* i965: Implement textureSize (TXS) on Gen4.Kenneth Graunke2011-08-233-6/+23
| | | | | | | | | | | | | | Also, remove the BRW_SAMPLER_MESSAGE_SIMD8_RESINFO #define because there totally isn't a SIMD8 variant. Unfortunately, resinfo returns FLOAT32 on Broadwater/Crestline, unlike G45 which returns a proper UINT32. This turns out to be simple, however: when we emit MOVs to select the desired half of the SIMD16 result, we can simply override the register type to be float so it's converted to an integer. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Implement textureSize (TXS) on Gen5+.Kenneth Graunke2011-08-236-10/+35
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Rudimentary support for non-floating point texture results.Kenneth Graunke2011-08-231-1/+1
| | | | | | | | | | | | | | Not all texturing operations return floating point data. For example, the resinfo message (textureSize or TXS) returns integer data. In the future, we'll also add integer texture support. ir_texture's type field contains this information; use its base type to appropriately type the destination register. We want to keep it as a four component vector, however, since SIMD8 samplers always have a response length of 4. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl/builtins: Uncomment textureSize prototypes.Kenneth Graunke2011-08-232-4/+0
| | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* texture_builtins.py: Add support for textureSize (txs).Kenneth Graunke2011-08-231-14/+36
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add a new ir_txs (textureSize) opcode to ir_texture.Kenneth Graunke2011-08-2311-36/+65
| | | | | | | | One unique aspect of TXS is that it doesn't have a coordinate. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/xorg: Advertise support for XvMCMaarten Lankhorst2011-08-234-0/+129
| | | | | | | | Formats were based on a patch sent to xf86-video-nouveau by Bryan Cain Signed-off-by: Maarten Lankhorst <[email protected]> [Michel Dänzer: Add xorg_xvmc.c to SConscript.]
* mesa: call _mesa_set_vp_override in glDrawTex*Chia-I Wu2011-08-231-0/+4
| | | | | | | The driver may install its own vertex shader. _mesa_set_vp_override must be called so that core mesa can generate correct fragment program.. Reviewed-by: Brian Paul <[email protected]>
* auxiliary: share the source listsChia-I Wu2011-08-234-591/+207
| | | | | | | | | | Factor out source lists from Makefile to Makefile.sources, and let Makefile, SConscript, and Android.mk share it. Note that files in $(GENERATED_SOURCES) are removed from $(C_SOURCES). Acked-by: José Fonseca <[email protected]> Acked-by: Chad Versace <[email protected]>
* scons: add ParseSourceList methodChia-I Wu2011-08-232-0/+159
| | | | | | | | | | | | | | ParseSourceList() can be used to parse a source list file and returns the source files defined in it. It is supposed to be used like this # get the list of source files from C_SOURCES in Makefile.sources sources = env.ParseSourceList('Makefile.sources', 'C_SOURCES') The syntax of a source list file is compatible with GNU Make. This effectively allows SConscript and Makefile to share the source lists. Acked-by: José Fonseca <[email protected]> Acked-by: Chad Versace <[email protected]>
* glsl: Make ir_validate actually visit ir_if nodes.Kenneth Graunke2011-08-221-2/+3
| | | | | | | | | | | | There is no ir_hierarchical_visitor::visit(ir_if *) method, since ir_if is not a leaf node. Instead, there are visit_enter and visit_leave methods. Use visit_enter arbitrarily (either would work fine, though visit_enter will catch errors sooner). Found thanks to a warning emitted by Clang. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* intel: Abort when DRI2 separate stencil handshake failsChad Versace2011-08-221-0/+7
| | | | | | | | | | When intel_context requires separate stencil but the DRI2 separate stencil handshake fails, then abort and emit an error instructing the user to upgrade the DDX to 2.16.0. CC: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* glsl_to_tgsi: Fix a few more struct vs. class warnings.Kenneth Graunke2011-08-211-5/+5
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* glsl_to_tgsi: emit a MAD(b, -a, b) for !a && bBryan Cain2011-08-201-0/+52
| | | | This is a port of commit ff2cfb8989cd to glsl_to_tgsi.
* glsl_to_tgsi: fix typoBryan Cain2011-08-201-1/+1
|
* glsl_to_tgsi: implement ir_binop_all_equal using DP4 w/SGEBryan Cain2011-08-201-1/+19
| | | | | This is a port of commit ba01df11c4d0 to glsl_to_tgsi with integer support added.
* glsl_to_tgsi: implement ir_binop_any_nequal using DP4 w/saturate or DP4 w/SLTBryan Cain2011-08-201-2/+23
| | | | | | | | Implement the any() part of the operation the same way regular ir_unop_any is implemented. This is a port of commit e7bf096e8b04 to glsl_to_tgsi, with added integer support.
* glsl_to_tgsi: implement ir_unop_any using DP4 w/saturate or DP4 w/SLTBryan Cain2011-08-201-4/+28
| | | | | This is a port of commit 92ca560d68e8 to glsl_to_tgsi, with integer support added.
* glsl_to_tgsi: make glsl_to_tgsi_visitor::emit_dp return the instructionBryan Cain2011-08-201-7/+7
|
* glsl_to_tgsi: implement ir_binop_logic_or using an add w/saturate or add w/SLTBryan Cain2011-08-201-4/+27
| | | | | | | | | | | | | | | | | | | | | Logical-or is implemented using addition (followed by clamping to [0,1]) on values of 0.0 and 1.0. Replacing the logical-or operators with addition gives a + b which has a result on the range [0, 2]. Previously a SNE instruction was used to clamp the resulting logic value to [0,1]. In a fragment shader, using a saturate on the add has the same effect. Adding the saturate to the add is free, so (at least) one instruction is saved. In a vertex shader, using an SLT on the negation of the add result has the same effect. Many older shader architectures do not support the SNE instruction. It must be emulated using two SLT instructions and an ADD. On these architectures, the single SLT saves two instructions. Note that SNE is still used when integers are used for boolean values, since there is no such thing as an integer saturate, and older shader architectures without SNE don't support integers. This is a port of commit 41f8ffe5e07c to glsl_to_tgsi with integer support added.
* glsl_to_tgsi: implement ir_unop_logic_not using 1-xBryan Cain2011-08-201-1/+11
| | | | | | | Since our logic values are 0.0 (false) and 1.0 (true), 1.0 - x accurately implements logical not. This is a port of commit 6ad08989d7c1 to glsl_to_tgsi.
* st/egl: add a missing includeChia-I Wu2011-08-211-0/+1
| | | | Reported by cwhuang.
* st/egl: improve error loggingChia-I Wu2011-08-212-3/+12
| | | | This helps diagnose problems in EGL initialization.
* st/egl: add buffer preserving support to AndroidChia-I Wu2011-08-211-4/+67
| | | | Use a staging color buffer when buffer preserving is enabled.
* st/egl: improve buffer cache for AndroidChia-I Wu2011-08-211-31/+73
| | | | | There may be more than two back buffers. Clean up and prepare the buffer cache for that.
* st/egl: swapping without a buffer is not an errorChia-I Wu2011-08-211-1/+1
| | | | This fixes Kwaak3.
* st/egl: use HAL formats for Android backendChia-I Wu2011-08-211-26/+15
| | | | Native buffers use HAL formats, not UI formats.
* winsys/sw/android: use HAL formatsChia-I Wu2011-08-211-18/+9
| | | | Native buffers use HAL formats, not UI formats.
* winsys/sw/android: set bo usage correctlyChia-I Wu2011-08-211-10/+3
| | | | | | Since this is the software path, set GRALLOC_USAGE_SW_WRITE_OFTEN when PIPE_BIND_RENDER_TARGET, and set GRALLOC_USAGE_SW_READ_OFTEN when PIPE_BIND_SAMPLER_VIEW.
* android: make libGLES_mesa realChia-I Wu2011-08-211-0/+37
| | | | | | | | | | | | | | | | libGLES_mesa with swrast should link in these libraries libmesa_egl libmesa_egl_gallium libmesa_st_egl libmesa_st_mesa libmesa_glsl libmesa_glsl_utils libmesa_pipe_softpipe libmesa_winsys_sw_android libmesa_gallium Reviewed-by: Chad Versace <[email protected]>
* android: build shared glapiChia-I Wu2011-08-212-0/+61
| | | | | | This builds the shared library libglapi from shared glapi. Reviewed-by: Chad Versace <[email protected]>
* android: build glslChia-I Wu2011-08-214-0/+302
| | | | | | | This builds the static library libmesa_glsl and executable glsl_compiler from glsl. glsl_compiler is only installed for engineering build. Reviewed-by: Chad Versace <[email protected]>
* android: build core mesaChia-I Wu2011-08-213-0/+215
| | | | | | This builds the static library libmesa_st_mesa from core mesa. Acked-by: Chad Versace <[email protected]>
* android: build core EGLChia-I Wu2011-08-212-2/+67
| | | | | | This builds the static library libmesa_egl from core EGL. Reviewed-by: Chad Versace <[email protected]>
* android: build softpipeChia-I Wu2011-08-212-1/+68
| | | | This builds the static library libmesa_pipe_softpipe from softpipe.
* android: build android sw winsysChia-I Wu2011-08-212-0/+37
| | | | This builds the static library libmesa_winsys_sw_android from winsys/sw.
* android: build targets/egl-staticChia-I Wu2011-08-212-0/+53
| | | | | This builds the static library libmesa_egl_gallium from targets/egl-static.
* android: build st/egl with android backendChia-I Wu2011-08-212-0/+55
| | | | This builds the static library libmesa_st_egl from st/egl.
* android: build gallium auxiliariesChia-I Wu2011-08-214-0/+326
| | | | This builds the static library libmesa_gallium from gallium auxiliaries.
* android: build libGLES_mesaChia-I Wu2011-08-212-0/+139
| | | | | | | | | | | | This is the first step to integrate Mesa into Android(-x86) build system. You can git clone mesa under the external/ directory of Android source tree and build Android with $ make BOARD_GPU_DRIVERS=swrast It will build libGLES_mesa that will be loaded by Android runtime. libGLES_mesa is still a stub in this commit.
* targets/egl-static: do not rely on libudev on AndroidChia-I Wu2011-08-211-0/+64
| | | | | | There is no libudev on Android. Use DRM to get the PCI ID directly. Reviewed-by: Benjamin Franzke <[email protected]>
* st/egl: add android backendChia-I Wu2011-08-215-0/+781
| | | | | | | | | | Both HW and SW rendering are supported for Android. For SW rendering, we use the generic gralloc lock/unlock for mapping and unmapping color buffers (in winsys/android). For HW rendering, we need to know the real type of color buffers. This backend works with drm_gralloc, where a color buffer is backed by a GEM object.
* winsys/android: new SW winsys for AndroidChia-I Wu2011-08-212-0/+320
| | | | | | On Android, color buffers are passed between server and clients as opaque buffer_handle_t. This winsys makes use of gralloc, which provides a generic way to map and unmap buffer_handle_t for CPU access.
* egl: add Android-specific extensionsChia-I Wu2011-08-215-0/+53
| | | | | | | | Add EGL_ANDROID_image_native_buffer and EGL_ANDROID_swap_rectangle. There is no spec for them though. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chad Versace <[email protected]>