summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: add ARB_blend_func_extended support to state tracker.Dave Airlie2012-04-133-5/+12
| | | | | | | | This adds the blend mode mapping, it also uses the var->index in the glsl to tgsi convertor - this is the other half of my using 4 in the GLSL compiler. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: Fix uninitialized members in glsl_to_tgsi_visitor constructor.Vinson Lee2012-04-091-0/+4
| | | | | | | | | Fixes uninitialized member defects reported by Coverity. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix max_offset computation for base vertexBrian Paul2012-04-061-2/+18
| | | | | | | | | | | | | | Add the maximum base vertex offset to max_index for computing the buffer size. Fixes a failed assertion in the u_upload_mgr.c code with the VMware svga driver. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48141 v2: incorporate Marek's suggestions. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Marek Olšák <[email protected]>
* glsl: Remove ir_call::get_callee() and set_callee().Kenneth Graunke2012-04-021-1/+1
| | | | | | | | | | | | | Previously, set_callee() performed some assertions about the type of the ir_call; protecting the bare pointer ensured these checks would be run. However, ir_call no longer has a type, so the getter and setter methods don't actually do anything useful. Remove them in favor of accessing callee directly, as is done with most other fields in our IR. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium: adapt to get_query_result interface changeMarek Olšák2012-03-301-2/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix mipmap image size computation w.r.t. texture arraysBrian Paul2012-03-231-3/+15
| | | | | | | | | The image height or depth is the array_size for array textures. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47742 NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jakob Bornecrantz <[email protected]>
* st/mesa: set MaxUnrollIterations = 255Brian Paul2012-03-211-0/+2
| | | | | | | | | | The default was 32 for the EmitNoLoops=0 case. This allows the oZone3D soft shadows test to work properly with the vmware driver. Jose reported that SM3 supports up to 255 loop iterations. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: rework texture completeness testingBrian Paul2012-03-201-1/+1
| | | | | | | | | | | | | | | | | | | Instead of gl_texture_object::_Complete there are now two fields: _BaseComplete and _MipmapComplete. The former indicates whether the base texture level is valid. The later indicates whether the whole mipmap is valid. With sampler objects, a single texture can appear to be both complete and incomplete at the same time. See the GL_ARB_sampler_objects spec for more details. To implement this we now check if the texture is complete with respect to a sampler state. Another benefit of this is we no longer need to invalidate a texture's completeness state when we change the minification/magnification filters with glTexParameter(). Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: add null pointer check in st_texture_image_map()Brian Paul2012-03-171-0/+3
| | | | | | | | | | | | If we failed to allocate a memory resource for the texture we'd crash when we tried to map it. Now we propogate the NULL back up to the texstore code and generate GL_OUT_OF_MEMORY. Fixes a crash with the upcoming piglit max-texture-size test. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* Revert "st/mesa: don't unreference user attribs up front."Brian Paul2012-03-011-6/+3
| | | | | | | This reverts commit 72931ca4b9fb1002f5b62b74f7f7f32e94e80fde. This commit caused a few piglit regressions (quad-invariance, draw-batch, etc) with the vmware svga driver.
* st/mesa: remove old assertionBrian Paul2012-02-291-3/+0
|
* st/mesa: don't unreference user attribs up front.Dave Airlie2012-02-281-3/+6
| | | | | | | | postpone unreferences until end of function, as the ones in use will get naturally dereferenced. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: remove PIPE_SHADER_CAP_OUTPUT_READMarek Olšák2012-02-271-11/+2
| | | | | | | | | | | | r600g is the only driver which has made use of it. The reason the CAP was added was to fix some piglit tests when the GLSL pass lower_output_reads didn't exist. However, not removing output reads breaks the fallback for glClampColorARB, which assumes outputs are not readable. The fix would be non-trivial and my personal preference is to remove the CAP, considering that reading outputs is uncommon and that we can now use lower_output_reads to fix the issue that the CAP was supposed to workaround in the first place.
* st/mesa: initialize the MaxViewport, MaxRenderbufferSize constantsBrian Paul2012-02-241-0/+8
| | | | | Use the max 2D/rect texture size as the limit. If that's not true for some devices we'll need new PIPE_CAP_ queries.
* st/mesa: stop using MAX_WIDTH in st_cb_texture.cBrian Paul2012-02-241-10/+27
| | | | Reviewed-by: José Fonseca <[email protected]>
* st/mesa: stop using MAX_WIDTH in st_cb_drawpixels.cBrian Paul2012-02-241-26/+29
| | | | Reviewed-by: José Fonseca <[email protected]>
* st/mesa: use pipe_sampler_view_release()Brian Paul2012-02-231-13/+5
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: add floating point formats in st_new_renderbuffer_fb()Brian Paul2012-02-231-1/+8
| | | | | | To allow creating floating point buffers / pbuffers. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: fix typo: s/patent/parent/Brian Paul2012-02-151-1/+1
|
* st/mesa: remove unused st_equal_formats() functionBrian Paul2012-02-152-21/+0
| | | | | | It was incomplete and didn't take byte swapping into account either. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: use _mesa_format_matches_format_and_type() in decompress_with_blit()Brian Paul2012-02-151-1/+3
| | | | | | st_equal_formats() is no longer used now. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove INLINE qualifiersBrian Paul2012-02-151-2/+2
| | | | | | | from st_get/create_texture_sampler_view_from stobj() functions. No real value in these cases. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: simplify st_create_texture_sampler_view()Brian Paul2012-02-151-12/+9
| | | | | | Implement in terms of st_create_texture_sampler_view_format(). Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove unused st_get_texture_sampler_view()Brian Paul2012-02-151-16/+0
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: use private pipe_sampler_view in decompress_with_blit()Brian Paul2012-02-151-4/+18
| | | | | | | | | | Similar to the previous commit. Also fix incorrect setting of the sampler view's state after it's created. We need to specify the first/last_level fields in the template instead. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: use private pipe_sampler_view in st_render_mipmap()Brian Paul2012-02-151-3/+7
| | | | | | | Rather than the one in st_texture_object. This sampler view really has no connection to the one used for rendering. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: assorted clean-ups in st_cb_fbo.cBrian Paul2012-02-151-19/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove st_framebuffer_renderbuffer()Brian Paul2012-02-151-14/+1
| | | | | | Just use _mesa_framebuffer_renderbuffer(). Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove st_get_default_texture()Brian Paul2012-02-154-57/+4
| | | | | | Just use _mesa_get_fallback_texture() instead. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: improve assertion/check for stencil formatBrian Paul2012-02-151-8/+2
|
* st/mesa: use _mesa_pack_ubyte_stencil_row() in draw_stencil_pixels()Brian Paul2012-02-151-42/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created renderbuffersBrian Paul2012-02-151-0/+6
| | | | | | | | | | | The st_renderbuffer_alloc_storage() function is used to allocate both window-system buffers and user-created renderbuffers. The later kind are never directly displayed so don't set PIPE_BIND_DISPLAY_TARGET for those surfaces. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: use u_surface_default_template() helperBrian Paul2012-02-151-3/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove redundant memset(surface_template,0)Brian Paul2012-02-151-1/+0
| | | | | | The subsequent u_surface_default_template() call does that for us. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove st_renderbuffer::strideBrian Paul2012-02-152-8/+6
| | | | | | It was only used for software buffers and easily computed. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove st_renderbuffer::formatBrian Paul2012-02-153-17/+10
| | | | | | We only used it in a few places that can implemented differently. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: only resolve if number of samples is > 1Dave Airlie2012-02-121-1/+2
| | | | | | | | | | Marek: this fixes a firefox crash and maybe even: https://bugs.freedesktop.org/show_bug.cgi?id=45943 NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/mesa: stop using Map8[] tables in load_color_map_texture()Brian Paul2012-02-101-5/+6
| | | | | | | | Use the float tables instead. Pixel maps are seldom used so this shouldn't be a big deal. Next, we can get rid of the gl_pixelmap::Map8 array. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: exit the update fragment samplers/textures loops early.Dave Airlie2012-02-092-12/+23
| | | | | | | | | | If we have no more enabled samplers and we've reset all the previously used ones, no need to keep going around this loop. (just moved some stuff around to clean it up a bit). Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fixup NDEBUG vs DEBUG causing debug path to get taken.Dave Airlie2012-02-091-3/+3
| | | | | | | From what I can see we were taking the debug path all the time, when we probably only want it for enable debug path. Signed-off-by: Dave Airlie <[email protected]>
* gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONChristoph Bumiller2012-02-091-2/+2
| | | | | | | Just let the hardware do it if it can and avoid drivers having to check for the special case on each draw call. v2: update the draw module
* st/mesa: avoid vertex texture and sampler updates for 0 caseDave Airlie2012-02-082-0/+5
| | | | | | | | | | | If we had no vertex textures or samplers previously and we have none now, don't bother doing the enables dance. I was profiling nexuiz on noop and noticed these two functions in the profile, this drops their usage from 0.86% to 0.03% and 0.23% to 0.03% for texture and samplers. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: kill off point size clamping in vertex shadersMarek Olšák2012-01-312-98/+0
| | | | | | | | This fixes the gl_PointSize transform feedback test. Point size clamping should happen at the rasterizer stage, i.e. after the vertex and geometry shaders and transform feedback. Drivers are expected to do this by themselves.
* st/mesa: simplify initialization of light_twosideMarek Olšák2012-01-311-21/+3
| | | | | | Core Mesa does this for us, see update_two_size in state.c. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use table-driven approach to exposing extensions for formats (v3)Marek Olšák2012-01-291-207/+167
| | | | | | | | | | | | | | | | | | The check for ctx->API was unnecessary, because OES extensions are not exposed in desktop GL. Also require renderbuffer support for ARB_texture_rgb10_a2ui, as per the spec. Tested by comparing old and new glxinfo with softpipe and r600g. v2: fix bugs v3: rename need_only_one -> need_at_least_one rename num_elements -> num_mappings add comments use const when appropriate Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use table-driven approach to exposing extensions based on CAPsMarek Olšák2012-01-291-108/+58
| | | | | | | | | | | | This change is not exactly equivalent (sometimes we checked for non-zero, sometimes if >0 or >1), but the behavior shouldn't change, because all drivers report 0 for unsupported CAPs. Exposing CAP_STREAM_OUTPUT_PAUSE_RESUME without CAP_MAX_STREAM_OUTPUT_BUFFERS is a driver bug and st/mesa does no checking if the latter is supported as well. Drivers must report CAPs consistently. v2: make the array const
* st/mesa: add PIPE_CAP_GLSL_FEATURE_LEVEL, cleanup st_extensions.cMarek Olšák2012-01-291-21/+28
| | | | | | | | v2: handle the cap in r300 and r600 as well Additional info for r600g: The env var R600_GLSL130=1 enables GLSL 1.3. Along with R600_STREAMOUT=1, it enables full GL 3.
* state_stracker: Fix access to uninitialized memory.Mathias Fröhlich2012-01-291-1/+1
| | | | | | | | Fix an access to uninitialized memory pointed out by valgrind in glsl_to_tgsi_visitor::simplify_cmp(void). Note: This is a candidate for the 8.0 branch. Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa/st: Assign inputsRead at right (previous) location.José Fonseca2012-01-251-2/+4
| | | | | | | | Fixes the src/mesa/state_tracker/st_glsl_to_tgsi.cpp:4032:src_register: Assertion `t->inputMapping[index] < (sizeof(t->inputs)/sizeof(*(t->inputs)))' failed. assertion failure introduced in 697b9945fb0f55428b06821f98fd8621372f81ad
* mesa: remove ctx->Const.sRGBCapableMarek Olšák2012-01-252-2/+1
| | | | | | | It always had the same value as ctx->Extensions.EXT_framebuffer_sRGB. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]>