aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: use a generic varying to pass the clear color to the FSMarek Olšák2013-01-151-2/+2
| | | | | | The color varying may have reduced precision or be even clamped. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: fix glClear with MRT by making the FS write to all cbufsMarek Olšák2013-01-152-2/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix InternalFormat for Z24X8 window-system buffersMarek Olšák2013-01-151-1/+3
| | | | | | This probably doesn't fix anything, but it's good to be consistent. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove dead conditional in ClearMarek Olšák2013-01-151-12/+0
| | | | | | | | | I think the conditional always evaluates to false. If I understand the code in core Mesa correctly, depthBits or stencilBits is 0 if the depth or stencil renderbuffer is NULL, respectively. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: simplify conditionals in ClearMarek Olšák2013-01-151-30/+12
| | | | | | just check depth and stencil separately, the outcome is the same Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix glClear with different colormask for each colorbufferMarek Olšák2013-01-151-18/+25
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: always assume separate depth and stencil clear is supportedMarek Olšák2013-01-152-97/+22
| | | | | | All drivers implement it now. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add some simple buffer/draw debug codeBrian Paul2013-01-144-0/+18
| | | | Reviewed-by: José Fonseca <[email protected]>
* st/mesa: set ctx->Const.UniformBufferOffsetAlignmentFredrik Höglund2013-01-121-1/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/es3: Add support for GL_PRIMITIVE_RESTART_FIXED_INDEXIan Romanick2013-01-111-2/+2
| | | | | | | | | | | | | This requires some derived state. The cut vertex used is either the value specified by glPrimitiveRestartIndex or it's hard-coded to ~0. The derived state gl_array_attrib::_RestartIndex captures this value. In addition, the derived state gl_array_attrib::_PrimitiveRestart is set whenever either gl_array_attrib::PrimitiveRestart or gl_array_attrib::PrimitiveRestartFixedIndex is set. v2: Use _mesa_is_gles3. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es3: Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVE query targetIan Romanick2013-01-111-0/+1
| | | | Signed-off-by: Ian Romanick <[email protected]>
* Remove state_tracker/MakefileMatt Turner2013-01-101-2/+0
| | | | Unneeded and unnecessary.
* st/mesa: fix possible MSVC build error v2Marek Olšák2013-01-081-2/+2
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=59143 Using GLubyte as per Brian's suggestion.
* st/mesa: fix assertion failures with 2101010 vertex formatsMarek Olšák2013-01-041-3/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: accelerate CopyTexSubImage for 1D array texturesMarek Olšák2013-01-041-26/+66
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix CopyTexSubImage fallback for 1D array texturesMarek Olšák2013-01-043-17/+42
| | | | | | | | - We should use a 3D transfer of size Width x 1 x NumLayers. - We should use layer_stride instead of stride. (even though they are likely to be equal with 1D array textures) Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix GetTexImage for compressed 2D array texturesMarek Olšák2013-01-041-23/+32
| | | | | | | This uses a 3D blit to decompress the texture and then a 3D transfer to read it. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: try to find the format matching format+type in decompressed_with_blitMarek Olšák2013-01-041-19/+50
| | | | | | | | | | | | | | | There was the fast path based on _mesa_format_matches_format_and_type for GetTexImage, but it never worked, because the Mesa format we were testing there was always compressed. Further testing showed that the fast path had been completely broken. In this commit, the somewhat limited helper util_create_rgba_texture is no longer used and instead, custom code for the texture creation is added, which tries to find the best matching RGBA8 format, so that we can hit the fast path *always* if the read format is a variant of RGBA8 and supported by the driver. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix GetTexImage for compressed cubemapsMarek Olšák2013-01-041-1/+1
| | | | | | I'll deal with 2D arrays later. NOTE: This is a candidate for the stable branches.
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-044-8/+16
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* mesa/st: Implement GL_TIME_ELAPSED w/ PIPE_QUERY_TIMESTAMP.José Fonseca2012-12-204-22/+79
| | | | | | | | | | | | | | | | | | ARB/EXT_timer_query's definition of GL_TIME_ELAPSED match precisely the subtraction of two GL_TIMESTAMP queries. And for a lot of drivers, that's precisely how they have to implement internally -- by emitting two hardware timestamp queries. So, to simplify driver implementation, simply allow doing so in the state tracker. Eventually if no driver implements PIPE_QUERY_TIME_ELAPSED then we could retire it. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: s/PIPE_CAP_TIMER_QUERY/PIPE_CAP_QUERY_TIME_ELAPSED/José Fonseca2012-12-201-2/+2
| | | | | | | | To better reflect what it is being advertised. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* drivers: compute version and then initialize exec tableJordan Justen2012-12-162-2/+8
| | | | | | | | This change forces the context version to be computed before initilizing the exec dispatch tables. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: add texture buffer object rgb32 support.Dave Airlie2012-12-161-1/+13
| | | | | | | This checks if the pipe driver can support RGB32 formats. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: Disable varying packing on hardware with <=8 texture indirections.Paul Berry2012-12-141-0/+14
| | | | | | | In practice this will disable varying packing on R300, R400, i915g, and nv30. Reviewed-by: Marek Olšák <[email protected]>
* mesa: disallow creation of GL 3.1 compatibility contextsMarek Olšák2012-12-121-4/+1
| | | | | | Death to driver-specific hacks! Reviewed-by: Ian Romanick <[email protected]>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-126-17/+7
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: move util_try_blit_via_copy_region to u_surface.cMarek Olšák2012-12-121-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: manage render condition in cso_context and fix postprocessing w/ itMarek Olšák2012-12-124-33/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove a weird msaa hackMarek Olšák2012-12-124-29/+2
| | | | | | It doesn't work and it's not clear how it's supposed to work. Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: emit multi-level structs and arrays properly.Dave Airlie2012-12-121-9/+42
| | | | | | | | | | | | | This follow the code from the i965 driver, and emits the structs and arrays recursively. This fixes an assert in the two UBO tests fs-struct-copy-complicated and vs-struct-copy-complicated These tests now pass on softpipe, with no regressions. Signed-off-by: Dave Airlie <[email protected]>
* st_glsl_to_tgsi: fix ubo bools.Dave Airlie2012-12-101-2/+19
| | | | | | | This should fix the ubo boolean tests, along with the previous ubo loading fix. Signed-off-by: Dave Airlie <[email protected]>
* st_glsl_to_tgsi: call ubo load pass earlierDave Airlie2012-12-101-1/+2
| | | | | | This calls it in around the same place as the 965 driver. Signed-off-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: fix texture offset translationDave Airlie2012-12-101-4/+7
| | | | | | | | | | | I noticed the texelFetch offset test failed on 2D rect samplers with GLSL 1.40. This is because I wrote the immediate->offset translation wrong. Fixed the translation to actually use the ureg info to set the offsets up. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: set PIPE_BIND_SAMPLER_VIEW for TBOs in st_bufferobj_dataChristoph Bumiller2012-12-081-0/+3
|
* mesa/st: add ARB_uniform_buffer_object support (v2)Dave Airlie2012-12-086-7/+147
| | | | | | | | | | | | | | | | this adds UBO support to the state tracker, it works with softpipe as-is. It uses UARL + CONST[x][ADDR[0].x] type constructs. v2: don't disable UBOs if geom shaders don't exist (me) rename upload to bind (calim) fix 12 -> 13 comparison as comment (calim + brianp) fix signed->unsigned (Brian) remove assert (Brian) Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add option to enable GLSL 1.40Dave Airlie2012-12-081-1/+6
| | | | | | Allow GLSL 1.40 to be enabled if the driver advertises it. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add texture buffer object support to state tracker (v1.1)Dave Airlie2012-12-085-7/+31
| | | | | | | | | | This adds the necessary changes to the st to allow texture buffer object support if the driver advertises it. v1.1: remove extra blank line and whitespace Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/dri: implement MSAA for GLX/DRI2 framebuffersMarek Olšák2012-12-071-2/+2
| | | | | | | | | | | | | All MSAA buffers are allocated privately and resolved into the DRI-provided back and front buffers. If an MSAA visual is chosen, the buffers st/mesa receives are all multi-sample. st/mesa doesn't have access to the single-sample buffers in that case. This makes MSAA work in games like Nexuiz. Reviewed-by: Brian Paul <[email protected]>
* gallium: pass the current context to the flush_front state tracker functionMarek Olšák2012-12-071-1/+1
| | | | | | I will later use the context to resolve an MSAA front buffer. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: implement CopyTexSubImage for MSAA framebuffersMarek Olšák2012-12-071-66/+113
| | | | | | | | | | Reviewed-by: Brian Paul <[email protected]> Just use pipe->blit, which can do resolve, flipping, and format conversions. The util_blit_pixels codepath is still there for the cases where we have to force alpha to 1. This also turns on acceleration for copying GL_DEPTH_STENCIL.
* st/mesa: add null pointer check in st_renderbuffer_delete()Brian Paul2012-12-031-4/+4
| | | | | | | In my testing I haven't found any cases where we get a null context pointer, but it might still be possible. Check for null just to be safe. Note: This is a candidate for the stable branches.
* st/mesa: make st_flush do what glFlush doesMarek Olšák2012-12-021-0/+1
|
* st/mesa: fix context use-after-free problem in st_renderbuffer_delete()Brian Paul2012-11-301-3/+5
| | | | | | | | | | The use-after-free happened when the renderbuffer was shared by multiple contexts and we tried to delete the renderbuffer using a context which was previously deleted. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: pass context parameter to gl_renderbuffer::Delete()Brian Paul2012-11-301-2/+2
| | | | | | | | | | We sometimes need a rendering context when deleting renderbuffers. Pass it explicitly instead of trying to grab a current context (which might be NULL). The next patch will make use of this. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-292-2/+2
| | | | | | | | | | This should help avoid confusion now that we're using the gl_api enum to distinguishing between core and compatibility API's. The corresponding enum value for core API's is API_OPENGL_CORE. Acked-by: Eric Anholt <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* gallium/postprocess: share pipe_context and cso_context with the state trackerMarek Olšák2012-11-291-0/+2
| | | | | | | Using one context instead of two is more efficient and we can skip another context flush. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: allow forward-compatible contexts and set Const.ContextFlagsMarek Olšák2012-11-291-5/+7
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: add support for GL core profilesMarek Olšák2012-11-291-0/+3
| | | | | | | | | | | The rest of the plumbing was in place already. I have tested this by turning on all GL 3.1 features. The drivers not supporting GL 3.1 will fail to create a core profile as they should. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: fix computation of last_level in GenerateMipmapMarek Olšák2012-11-121-21/+7
| | | | | | | | | Array textures were broken. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>