summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: remove gl_renderbuffer::GetPointer stuffBrian Paul2012-01-241-19/+0
|
* st/mesa: remove gl_renderbuffer:DataType assignmentsBrian Paul2012-01-244-107/+0
| | | | | | | | That field is only used by swrast code so there's no reason to mess with it in the gallium state tracker. This also lets us remove the unused st_format_data() type function and related code.
* st/mesa: copy num_immediates field when copying the immediates arrayBrian Paul2012-01-191-1/+5
| | | | | | | | | | | | | | | Two assignments to num_immediates were missing in get_pixel_transfer_visitor() and get_bitmap_visitor(). The uninitialized value led to valgrind errors and crashes in some cases. Added new assertions to catch future problems in this area. Also changed num_immediates to unsigned to avoid signed/unsigned comparison warnings. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: Set default access flags based on the run-time APIIan Romanick2012-01-191-1/+1
| | | | | | | | | | | | | | | | | | | The default access flags for OpenGL ES (via GL_OES_map_buffer) and desktop OpenGL are different. The code previously tried to handle this, but the decision was made at compile time. Since the same driver binary can be used for both OpenGL ES and desktop OpenGL, the decision must be made at run-time. This should fix bug #44433. It appears that the test case does various map and unmap operations and inspects the state of the buffer object around each. When it sees that GL_BUFFER_ACCESS does not match its expectations, it fails. NOTE: This is a candidate for release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44433
* st/mesa: add fallback pipe formats for (compressed) R, RG formatsBrian Paul2012-01-191-12/+22
| | | | | | | | | | | If we don't find an exact PIPE_FORMAT_x for a GL_(COMPRESSED)_RED/RG format, try uncompressed formats. We were already doing this for the RGB(A) formats. Fixes piglit arb_texture_compression-internal-format-query test. NOTE: This is a candidate for the stable branches. Reviewed-by: José Fonseca <[email protected]>
* st/mesa: pass GL_MAP_INVALIDATE_RANGE_BIT to gallium driversBrian Paul2012-01-182-0/+4
| | | | | | when mapping renderbuffers or texture images. NOTE: This is a candidate for the 8.0 branch.
* gallium: improve the pipe_stream_output_info struct (v2)Marek Olšák2012-01-151-11/+7
| | | | | | | | | | | | | | | | | | | | | There are 3 changes: 1) stride is specified for each buffer, not just one, so that drivers don't have to derive it from the outputs 2) new per-output property dst_offset, which specifies the offset into the buffer in dwords where the output should be stored, so that drivers don't have to compute the offsets manually; this will also be useful for gl_SkipComponents from ARB_transform_feedback3 3) register_mask is removed, instead, there is start_component and num_components; register_mask with non-consecutive 1s doesn't make much sense (some hardware cannot do packing of components) Christoph Bumiller: fixed nvc0. v2: resolve merge conflicts in Draw and clean it up
* st/mesa: whitespace fixes, 80-column wrappingBrian Paul2012-01-121-14/+21
|
* st/mesa: re-order #includes in st_manager.cBrian Paul2012-01-121-10/+10
| | | | | | | | include mesa headers before gallium headers to avoid problem with ffs() being defined in u_math.h and then again in imports.h The next commit will add some #ifdefs to prevent multiple definitions of ffs().
* st/mesa: fix struct vs. class compilation warningBrian Paul2012-01-121-1/+1
| | | | | | | glsl_to_tgsi_visitor is earlier defined as a class, not a struct. Fixes MSVC warning. NOTE: This is a candidate for the 8.0 branch.
* vbo: introduce vbo_get_minmax_indices functionYuanhan Liu2012-01-122-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Introduce vbo_get_minmax_indices() function to handle the min/max index computation for nr_prims(>= 1). The old code just compute the first prim's min/max index; this would results an error rendering if user called functions like glMultiDrawElements(). This patch servers as fixing this issue. As when nr_prims = 1, we can pass 1 to paramter nr_prims, thus I made vbo_get_minmax_index() static. v2: per Roland's suggestion, put the indices address compuation into vbo_get_minmax_index() instead. Also do comination if possible to reduce map/unmap count v3: per Brian's suggestion, use a pointer for start_prim to avoid structure copy per loop. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* linker: Calculate the sampler to texture target mapping during linkingIan Romanick2012-01-111-3/+3
| | | | | | | | | Track the calculated data in gl_shader_program instead of the individual assembly shaders. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: rename translate_texture_target, and make translate_opcode static.Dave Airlie2012-01-113-8/+5
| | | | | | As suggested by Brian. Signed-off-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: add support for shadow cube map sampling.Dave Airlie2012-01-112-2/+4
| | | | | | | This along with the TGSI support lets the piglit sampler-cube-shadow test pass on softpipe. Signed-off-by: Dave Airlie <[email protected]>
* st_extensions: fixup GLSL 1.30 related enables (v3)Dave Airlie2012-01-112-9/+33
| | | | | | | | | | | | | | | | This just fixes up the enables for native integers and EXT_texture_integer support in st/mesa. It also set the MaxClipPlanes to 8. We should consider exposing caps for MCP vs MCD, but since core mesa doesn't care yet maybe we can wait for now. v2: use 32-bit formats as per Marek's mail. v3: add calim's fix for INT_DIV_TO_MUL_RCP disabling. Signed-off-by: Dave Airlie <[email protected]>
* st_glsl_to_tgsi: use ISSG and fixup IABSDave Airlie2012-01-111-4/+4
| | | | | | | It doesn't look like the GLSL compiler will produce sign op for an unsigned anyways (seems insane anyways). Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: remove unnecessary memset()/zero callBrian Paul2012-01-101-1/+0
| | | | | | The u_surface_default_template() function does the memset()/zero now. Jakob Bornecrantz <[email protected]>
* gallium: introduce GLSL based interpolation rules. (v2)Dave Airlie2012-01-101-1/+1
| | | | | | | | | | | | This introduces an unspecified interpolation paramter that is only allowed for color semantics, so a specified GLSL interpolation will override the ShadeModel specified interpolation, but not vice-versa. This fixes a lot of the interpolation tests in piglit. v2: rename from unspecified to color Signed-off-by: Dave Airlie <[email protected]>
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-107-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <[email protected]> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <[email protected]> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <[email protected]> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* glsl_to_tgsi: emit IABS for absolute value of integersBryan Cain2012-01-071-2/+4
|
* mesa: rework ctx->Driver.CopyTexSubImage() parametersBrian Paul2012-01-071-19/+21
| | | | | | | | | | | Replace target, level parameters with gl_texture_image. Add gl_renderbuffer parameter to indicate source buffer for the copy. This removes some redundant code in the drivers to find the source renderbuffer and the destination texture image (which we already had in _mesa_CopyTexSubImage). Signed-off-by: Brian Paul <[email protected]>
* glsl_to_tgsi: fix emission of boolean constantsBryan Cain2012-01-071-1/+1
| | | | We use 0xffffffff for true, but visit(ir_constant *) was emitting 1.
* glsl_to_tgsi: remove bad assertionBryan Cain2012-01-071-2/+1
|
* st/mesa: add support for clip vertex.Dave Airlie2012-01-072-6/+18
| | | | | | | | We need to pass the pre-projection matrix clip planes into the driver, instead of the post for the case we have a vertex shader that writes clip vertex. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: fix default interpolation for colors.Dave Airlie2012-01-071-4/+10
| | | | | | | | | | Brian mentioned that mesa-demos/reflect was broken on softpipe, by my previous commit. The problem was were blindly translating none to perspective, when color/pntc at least need it linear. this is the final version that fixes the reflect regression. Signed-off-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: Remove the obsolete remove_output_reads pass.Kenneth Graunke2012-01-061-84/+0
| | | | | | This is now handled by the GLSL compiler, so this code is dead. Signed-off-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: Use the GLSL compiler's new remove-output-reads pass.Vincent Lejeune2012-01-061-8/+7
| | | | | | | | | | | | The existing glsl_to_tgsi::remove_output_read pass did not work properly when indirect addressing was involved; this commit replaces it with a lowering pass that occurs before TGSI code generation. Fixes varying-array related piglit tests. Signed-off-by: Vincent Lejeune <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: Make use of gl_transform_feedback_info::ComponentOffset.Paul Berry2012-01-051-1/+2
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: add support for gl_ClipDistanceBryan Cain2012-01-052-5/+61
|
* gallium: fix behavior of pipe_buffer_map_rangeMarek Olšák2012-01-052-9/+6
| | | | | | | To match what transfer_map returns. Really, subtracting the offset leads to bugs if someone expects it to work exactly like transfer_map. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: 80-column wrappingBrian Paul2012-01-051-1/+2
|
* st/mesa: remove st_CompressedTexSubImage1D/2D/3D()Brian Paul2012-01-041-81/+3
| | | | | | Just use the core Mesa functions instead. Signed-off-by: Brian Paul <[email protected]>
* st/mesa: fix indentation in st_copy_texsubimage()Brian Paul2012-01-041-5/+5
|
* st/mesa: remove st_TexImage(), use core Mesa code insteadBrian Paul2012-01-042-242/+41
| | | | | | | | | | | | | The core Mesa code does the equivalent memory allocation, image mapping, storing and unmapping. We just need to call prep_teximage() first to handle the 'surface_based' stuff. The other change is to always use the level=0 mipmap image when accessing individual mipmap level images that are stored in resources/buffers. Apparently, we were always using malloc'd memory for individual mipmap images, not resource buffers, before. Signed-off-by: Brian Paul <[email protected]>
* st/mesa: refactor gl_TexImage() code into prep_teximage()Brian Paul2012-01-041-17/+38
| | | | | | Preparation for st_TexImage() removal/refactoring. Signed-off-by: Brian Paul <[email protected]>
* mesa: remove unused _mesa_init_teximage_fields() target parameterBrian Paul2012-01-044-5/+5
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* st/mesa: use SINT/UINT formats for VertexAttribIPointerChristoph Bumiller2012-01-033-6/+63
| | | | | | Reviewed-by: Dave Airlie <[email protected]> v2: added assertion that packed formats are not pure integer
* glsl_to_tgsi: v2 Invalidate and revalidate uniform backing storageVadim Girlin2012-01-031-0/+25
| | | | | | | | | | | | | | | | | | | | | | If glUniform1i and friends are going to dump data directly in driver-allocated, the pointers have to be updated when the storage moves. This should fix the regressions seen with commit 7199096. I'm not sure if this is the only place that needs this treatment. I'm a little uncertain about the various functions in st_glsl_to_tgsi that modify the TGSI IR and try to propagate changes about that up to the gl_program. That seems sketchy to me. Signed-off-by: Ian Romanick <[email protected]> v2: Revalidate when shader_program is not NULL. Update the pointers for all _LinkedShaders. Init glsl_to_tgsi_visitor::shader_program to NULL in the get_pixel_transfer_visitor & get_bitmap_visitor. Signed-off-by: Vadim Girlin <[email protected]>
* st/mesa: Reject forward-looking contextsIan Romanick2012-01-021-2/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* glsl-to-tgsi: handle ir_unop_round_evenChristoph Bumiller2012-01-021-1/+4
|
* glsl_to_tgsi: fix handling of CONT and BRK in eliminate_dead_code_advanced()Bryan Cain2012-01-021-2/+7
|
* mesa: remove the dstX/Y/Zoffset params to _mesa_texstore() functionsBrian Paul2012-01-022-3/+0
| | | | | | | | The were always zero. When doing a sub-texture replacement we account for the dstX/Y/Zoffsets when we map the texture image. So no need to pass them into the texstore code anymore. Reviewed-by: Kenneth Graunke <[email protected]>
* st_glsl_to_tgsi: translate interp mode for front/back colorDave Airlie2011-12-311-2/+2
| | | | | | this fixes a bunch of interpolation tests on softpipe at least. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: remove stImage->base.Face/Level assignments in st_TexImage()Brian Paul2011-12-301-3/+0
| | | | | | | | | This fixes a regresssion (broken cube maps) caused by the ctx->Driver.TexImage parameter simplification commit. The target var is always GL_TEXTURE_CUBE_MAP at this point so the Face field was always getting set to zero. These field assignments aren't needed anyway since core Mesa sets them.
* mesa: simplify Driver.CompressedTex[Sub]Image function parametersBrian Paul2011-12-301-16/+12
| | | | | | | | As with previous commits, the target, level and texObj info can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexImage() parametersBrian Paul2011-12-301-28/+22
| | | | | | | | As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: remove TexSubImage code, use core mesa routines instead.Brian Paul2011-12-301-140/+3
| | | | | | | | Since the move to Map/UnmapTextureImage, the core mesa routines are equivalent to what the state tracker was doing. The TexImage functions can be replaced too, but there's a few differences that will need to be handled.
* vbo: introduce vbo_sizeof_ib_type() functionYuanhan Liu2011-12-302-28/+4
| | | | | | | | | | introduce vbo_sizeof_ib_type() function to return the index data type size. I see some place use switch(ib->type) to get the index data type, which is sort of duplicate. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: remove PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_ATTRIBSMarek Olšák2011-12-251-1/+1
| | | | | | It's the same as PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use a cast wrapper function to get st_transform_feedback_objectMarek Olšák2011-12-251-6/+11
|