summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl_to_tgsi: add TXF support. (v2)Dave Airlie2011-08-251-3/+7
| | | | | | | | | | | | This adds texelFetch support to translate from GLSL to TGSI TXF opcode. I've tested this works with an r600g and softpipe backend. v2: drop comments, fix title, Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Bryan Cain <[email protected]>
* softpipe: implement TXF support via get_texel callbackDave Airlie2011-08-251-0/+69
| | | | | | | | | | | This just calls the texel fetch functions directly bypassing the sampling, notes: 1: loops inside switch should be more optimal. 2: borders can be sampled though only up to border depth, outside that its undefined. Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add TXF support.Dave Airlie2011-08-252-1/+59
| | | | | | | | | | | This is a straight texel fetch with no filtering or clamping. It uses integers to specify the i/j/k (from EXT_gpu_shader4). To enable this I had to add another hook into the tgsi sampler so that we could easily bypass all the filtering sample does. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: implement TXS/TXQ. (v2)Dave Airlie2011-08-251-9/+18
| | | | | | | | | GLSL uses TXS, call the gallium TXQ opcode. v2: fix indent from 4->3. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Bryan Cain <[email protected]>
* softpipe: add get_dims callback for TXQ support. (v2)Dave Airlie2011-08-251-0/+40
| | | | | | | | | | | This adds the get_dims callback that is called from the tgsi exec_txq. It returns values as per EXT_gpu_program4. v2: fix one indent + use a switch (slighty modified from Brian) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: add TXQ support. (v2)Dave Airlie2011-08-252-1/+31
| | | | | | | | | | this adds another callback in the sampler struct containing get_dims entry point. This is used to query the driver for the texture resource dimensions for the resource bound to the current sampler. v2: remove unusued variable, fix indent Signed-off-by: Dave Airlie <[email protected]>
* glsl: Implement the GL_ARB_conservative_depth extension.Kenneth Graunke2011-08-257-5/+9
| | | | | | | It's the same as GL_AMD_conservative_depth. The specs have slight differences in wording, but don't differ in content or behavior. Signed-off-by: Kenneth Graunke <[email protected]>
* Document the return type coding style.Kai Wasserbäch2011-08-251-0/+10
| | | | | | | | | | As per discussion at [0] methods shouldn't use OpenGL return types, if they're not part of the GL API. [0] <http://marc.info/?l=mesa3d-dev&m=130754488901774&w=2> Signed-off-by: Kai Wasserbäch <[email protected]> Signed-off-by: Ian Romanick <[email protected]>
* Change return type of try_emit_* methods to bool.Kai Wasserbäch2011-08-252-9/+9
| | | | | | | | | | | Ian Romanick explained (Message-Id: <[email protected]>), that the return type of non-API methods shouldn't use GLboolean but a standard C++ bool. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Bryan Cain <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Kai Wasserbäch <[email protected]>
* d3d1x: save to correct slot in xs_set_constant_buffersChristoph Bumiller2011-08-251-2/+2
|
* d3d1x: fix xs_set_samplersChristoph Bumiller2011-08-251-1/+2
|
* android: add support for r600gChia-I Wu2011-08-256-2/+143
| | | | | | | | Tested with a Radeon HD 6250. SurfaceFlinger (the display server and compositor) works. 2D apps with RGB or RGBA visuals work. As for 3D apps, some work but some don't (with serious rendering defects). Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: share the source listChia-I Wu2011-08-253-9/+7
| | | | | | | Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile and SConscript share it. Reviewed-by: Marek Olšák <[email protected]>
* winsys/r600: share the source listChia-I Wu2011-08-253-13/+10
| | | | | | | Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile and SConscript share it. Reviewed-by: Marek Olšák <[email protected]>
* r600g: share the source listChia-I Wu2011-08-253-31/+19
| | | | | | | Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile and SConscript share it. Reviewed-by: Marek Olšák <[email protected]>
* glsl: Make sure that Extensions.dummy_true is set to trueIan Romanick2011-08-241-0/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* vbo: remove unused var, remove unneeded local varBrian Paul2011-08-241-4/+1
|
* llvmpipe: add more restrict keywordsBrian Paul2011-08-241-4/+4
| | | | | | | | Put restrict in the function definitions to silence MSVC warnings about incompatible assignments in "func = lp_tile_foobar;" when func was declared with restrict keywords but the rhs function wasn't. Reviewed-by: Jose Fonseca <[email protected]>
* docs: Document coding style conventionsPaul Berry2011-08-241-0/+23
| | | | | | This patch documents some Mesa coding style conventions that came up during the discussion of commit 67b5a32 (Perform implicit type conversions on function call out parameters).
* swrast: Remove swrast eject/validate texture image code.Brian Paul2011-08-241-79/+0
| | | | | | | No driver used the eject function, or set the validate hook that made that function do anything. Reviewed-by: Ian Romanick <[email protected]>
* radeon: Fix flushing before writing a teximage's BO when !t->bo.Eric Anholt2011-08-241-12/+12
| | | | | | | | | | | | Before, if we ended up here without a BO for our image, but did choose a miptree that had active rendering in the command buffer, our teximage data would jump ahead of the rendering using the old texture contents. This showed up as breakage in gen-teximage and friends in the following commit. Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: remove st_texture_image::face,level fieldsBrian Paul2011-08-244-23/+17
| | | | Reviewed-by: Ian Romanick <[email protected]>
* intel: use new gl_texture_image:Face, Level fieldsBrian Paul2011-08-249-51/+34
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: add gl_texture_image::Face, Level fieldsBrian Paul2011-08-242-0/+5
| | | | | | | Several drivers have these fields in their subclasses of gl_texture_image. They'll be useful for core Mesa too... Reviewed-by: Ian Romanick <[email protected]>
* x11: add missing comma to fix compilationBrian Paul2011-08-241-1/+1
|
* r600g: fill out missing entries in opcode tables.Dave Airlie2011-08-241-0/+36
| | | | | | this just adds the missing opcodes as unsupported. Signed-off-by: Dave Airlie <[email protected]>
* winsys/svga: use os_mmap() for memory mappingChia-I Wu2011-08-241-5/+6
| | | | os_mmap() guarantees large file support across OSes.
* winsys/radeon: use os_mmap() for memory mappingChia-I Wu2011-08-241-3/+3
| | | | | | os_mmap() guarantees large file support across OSes. Reviewed-by: Marek Olšák <[email protected]>
* auxiliary/os: add wrappers for mmap/munmapChia-I Wu2011-08-241-0/+87
| | | | | | The use of mmap() in winsys requires large file support. Not all OSes have LFS so a wrapper should be used. In particular, os_mmap() should call __mmap2() on Android.
* i965: Only map the necessary buffer range in brw_prepare_indicesIan Romanick2011-08-231-3/+2
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tnl: Only map the necessary buffer range in bind_indicesIan Romanick2011-08-231-5/+21
| | | | | | | 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: Only map the necessary buffer range in vbo_get_minmax_indexIan Romanick2011-08-231-4/+19
| | | | | | | 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: Eliminate dd_function_table::MapBufferIan Romanick2011-08-2324-267/+123
| | | | | | | | | | Replace all calls to dd_function_table::MapBuffer with appropriate calls to dd_function_table::MapBufferRange, then remove all the cruft. 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]>
* radeon: Hack up an implementation of MapBufferRangeIan Romanick2011-08-231-0/+33
| | | | | | | | | | | | This doesn't implement any of the "cool" features of MapBufferRange. Adding this function is necessary for the next commit in the series. 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]> Reviewed-by: Alex Deucher <[email protected]> Cc: Maciej Cencora <[email protected]>
* mesa: Fix incorrect access parameter passed to MapBufferIan Romanick2011-08-232-6/+2
| | | | | | | | | | | | | | | | | The code previously passed GL_DYNAMIC_DRAW for the access parameter. By inspection, I believe that all drivers would treat this as GL_READ_WRITE because it's not GL_READ_ONLY and it's not GL_WRITE_ONLY. It appears the i965 code wants GL_WRITE_ONLY (it's about to write a bunch of data in, never read data), while the arrayelt code is GL_READ_ONLY (just dereffed as arguments to CALL_Whatever*v). 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]> Reviewed-by: Keith Whitwell <[email protected]>
* mesa: Remove target parameter from dd_function_table::FlushMappedBufferRangeIan Romanick2011-08-235-8/+6
| | | | | | | | | | 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]>
* intel: Correctly check for read-only mappings in intel_bufferobj_map_rangeIan Romanick2011-08-231-1/+3
| | | | | | | | | | The old code was an obvious cut-and-paste fail from intel_bufferobj_map. 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]> Reviewed-by: Ben Widawsky <[email protected]>
* mesa: Remove target parameter from dd_function_table::MapBufferRangeIan Romanick2011-08-236-11/+7
| | | | | | | | | | 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::GetBufferSubDataIan Romanick2011-08-237-10/+6
| | | | | | | | | | 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::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]>