summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: don't ignore texture buffer state changesMarek Olšák2015-07-251-0/+1
| | | | | | | | Fixes piglit: spec@arb_texture_buffer_range@ranges-2 Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul <brianp@vmware.com>
* st/mesa: set default tessellation levelsMarek Olšák2015-07-231-0/+1
|
* st/mesa: add tessellation shader statesIlia Mirkin2015-07-231-0/+2
| | | | additional fixes by Marek
* mesa/st: use EmitNoIndirectSampler if !ARB_gpu_shader5Tapani Pälli2015-06-301-0/+5
| | | | | | | Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
* cso: add context cleanup code from st/mesaMarek Olšák2015-05-201-6/+0
| | | | | | | | | | This fixes a crash in nouveau which can't handle set_constant_buffer(PIPE_SHADER_TESS_*). Cc: 10.6 <mesa-stable@lists.freedesktop.org> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* st/mesa: implement GetGraphicsResetStatusMarek Olšák2015-05-121-3/+4
| | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* st/mesa: implement GL_AMD_performance_monitorChristoph Bumiller2015-05-061-0/+9
| | | | | | | | | | | | | | | | | | | | This is based on the original patch of Christoph Bumiller. v2 (Samuel Pitoiset): - improve Gallium interface for this extension - rewrite some parts of the original code - fix compilation errors and piglit tests v3: - only enable this extension when the underlying driver expose GPU counters - get rid of the ring buffer of queries v4: - add a debug message when the maximum number of counters has been reached Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr>
* st/mesa: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-3/+3
| | | | Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* st/mesa: pass etc2 textures to driver if supportedIlia Mirkin2015-02-191-0/+3
| | | | | | | If the driver actually supports ETC2, don't decode it in software. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* cso: put cso_release_all into cso_destroy_contextMarek Olšák2014-12-101-6/+2
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* st/mesa: For vertex shaders, don't emit saturate when SM 3.0 is unsupportedAbdiel Janulgue2014-12-081-0/+2
| | | | | | | | | | | There is a bug in the current lowering pass implementation where we lower saturate to clamp only for vertex shaders on drivers supporting SM 3.0. The correct behavior is to actually lower to clamp only when we don't support saturate which happens on drivers that don't support SM 3.0 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
* st/mesa: drop dependence on API profile in st_init_extensionsMarek Olšák2014-09-241-1/+1
| | | | | | | The extensions and limits being set in the conditional block are core-only anyway and don't have any effect on other profiles. Reviewed-by: Brian Paul <brianp@vmware.com>
* st/mesa: handle failed context creation for core profileBrian Paul2014-09-111-33/+49
| | | | | | | | | | | | If the glx/wgl state tracker requested a core profile but the gallium driver did not support some feature of GL 3.1 or later, we were setting ctx->Version=0 and then failing the assertion in _mesa_initialize_exec_table(). With this change we check for ctx->Version=0 and tear down the context and return NULL from st_create_context(). Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* st/mesa: make st_init_limits context-independentMarek Olšák2014-08-111-1/+7
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: move ShaderCompilerOptions into gl_constantsMarek Olšák2014-08-111-1/+1
| | | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* st/mesa: make st_init_extensions context-independentMarek Olšák2014-08-111-1/+25
| | | | | | | | | Setting Const.MaxSamples needed a rework, so that it doesn't call st_choose_format, which depends on st_context. Other than that, there is no change in functionality. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* st/mesa: convert the ETC1 format to an uncompressed one if unsupportedMarek Olšák2014-08-111-0/+3
| | | | | | | | I don't know of any hardware which supports it. With this, GL_OES_compressed_ETC1_RGB8_texture is supported if RGBA8 is supported. Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
* st/mesa: fix geometry shader memory leakBrian Paul2014-07-091-0/+1
| | | | | | | | Spotted by Charmaine Lee. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* gallium/u_gen_mipmap: rewrite using pipe->blit (v2)Marek Olšák2014-04-101-2/+0
| | | | | | | | | | | | | | | This replaces u_gen_mipmap with an extremely simple implementation based on pipe->blit. st/mesa is also cleaned up. Pros: - less code - correct mipmap generation for NPOT 3D textures (u_blitter uses a better formula) - queries are not affected by mipmap generation if drivers disable them v2: add "first_layer", "last_layer" parameters, drop "face" v2.1: add format v2.2: document the format parameter
* st/mesa: fix sampler view handling with shared textures v4Christian König2014-03-261-0/+17
| | | | | | | | | | | | | Release the references to the sampler views before destroying the pipe context. v2: remove TODO and unrelated change v3: move to st_texture.[ch], rename callback, add comment v4: fix rebase mess up and add further cleanups Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
* mesa: rename PreferDP4 to OptimizeForAOS.Matt Turner2014-01-211-1/+1
| | | | | | | | | This flag was really just a proxy for determining whether the backend was vector (AOS) or scalar (SOA). It will be used to apply a future optimization only for vector backends. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
* implement NV_vdpau_interop v7Christian König2013-10-261-0/+3
| | | | | | | | | | | | | | | | | | | v2: Actually implement interop between the gallium state tracker and the VDPAU backend. v3: Make it also available in non legacy contexts, fix video buffer sharing. v4: deny interop if we don't have the same screen object v5: rebased on upstream changes v6: implemented VDPAUGetSurfaceivNV, improved error handling, unregister all surfaces in VDPAUFiniNV v7: squash merge with Mareks changes Signed-off-by: Christian König <christian.koenig@amd.com>
* st/mesa: add a few comments in st_create_context_priv()Brian Paul2013-10-171-1/+5
|
* mesa: renumber shader indices according to their placement in pipelineMarek Olšák2013-07-021-5/+0
| | | | | | | | | See my explanation in mtypes.h. v2: don't do this in gallium v3: also updated the comment at the gl_shader_type definition Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Move the mvp_with_dp4 flag to ShaderCompilerOptions.Kenneth Graunke2013-05-121-1/+1
| | | | | | | | | | | | | | | This flag essentially tells the compiler whether it prefers dot products or multiply/adds for matrix operations. As such, ShaderCompilerOptions seems like the right place for it. This also lets us specify it on a per-stage basis. This patch makes all existing users set the flag for the Vertex Shader stage only, as it's currently only used for fixed-function vertex programs. That will change soon, and I wanted to preserve the existing behavior. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: add & use a new driver flag for UBO updates instead of _NEW_BUFFER_OBJECTMarek Olšák2013-05-111-0/+1
| | | | | | | v2: move the flagging from intel_bufferobj_data to intel_bufferobj_alloc_buffer Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: convert _NEW_RASTERIZER_DISCARD to a driver flagMarek Olšák2013-04-241-0/+1
| | | | | Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* st/mesa: optionally apply texture swizzle to border color v2Christoph Bumiller2013-04-181-0/+4
| | | | | | | | | | | | This is the only sane solution for nv50 and nvc0 (really, trust me), but since on other hardware the border colour is tightly coupled with texture state they'd have to undo the swizzle, so I've added a cap. The dependency of update_sampler on the texture updates was introduced to avoid doing the apply_depthmode to the swizzle twice. v2: Moved swizzling helper to u_format.c, extended the CAP to provide more accurate information.
* st/mesa: add support for get sample positionDave Airlie2013-04-111-0/+2
| | | | | | | This just calls into the gallium interface. Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium,st/mesa: don't use blit-based transfers with software rasterizersMarek Olšák2013-03-231-0/+2
| | | | | | | | | The blit-based paths for TexImage, GetTexImage, and ReadPixels aren't very fast with software rasterizer. Now Gallium drivers have the ability to turn them off. Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
* gallium: add TGSI_SEMANTIC_TEXCOORD,PCOORD v3Christoph Bumiller2013-03-201-0/+3
| | | | | | | | | | | | | | | This makes it possible to identify gl_TexCoord and gl_PointCoord for drivers where sprite coordinate replacement is restricted. The new PIPE_CAP_TGSI_TEXCOORD decides whether these varyings should be hidden behind the GENERIC semantic or not. With this patch only nvc0 and nv30 will request that they be used. v2: introduce a CAP so other drivers don't have to bother with the new semantic v3: adapt to introduction gl_varying_slot enum
* st/mesa: remove what is left from u_blitMarek Olšák2013-02-181-2/+0
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* st/mesa: emit saturates in the vertex shader if Shader Model 3.0 is supportedMarek Olšák2013-02-061-0/+1
| | | | v2: change the requirement from GLSL 1.30 to SM 3.0 (R500 can do this)
* mesa: Make the drivers call a non-code-generated dispatch table setup.Eric Anholt2013-01-211-1/+1
| | | | | | | I want to drive the Save dispatch table setup from this same function. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* drivers: compute version and then initialize exec tableJordan Justen2012-12-161-0/+8
| | | | | | | | This change forces the context version to be computed before initilizing the exec dispatch tables. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* st/mesa: remove a weird msaa hackMarek Olšák2012-12-121-17/+0
| | | | | | It doesn't work and it's not clear how it's supposed to work. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-311-1/+2
| | | | | | | | | | | | | | | | | | | | | This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove the driverCtx parameter to _mesa_create/initialize_context()Brian Paul2012-10-051-1/+1
| | | | No longer used.
* st/mesa: accept and handle configuration options from st/driVadim Girlin2012-08-231-3/+7
| | | | | | Currently there is a single option - force_glsl_extensions_warn. Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
* st/mesa: use Elements() instead of hard-coded numberBrian Paul2012-08-181-1/+4
| | | | And add a comment about the velems_util_draw[] array.
* st/mesa: combine vertex/fragment sampler state in arraysBrian Paul2012-08-161-9/+6
| | | | | | As with other recent changes, put the vertex and fragment sampler state into arrays indexed by the shader type. This will let us easily add support for other types of shaders in the future.
* st/mesa: rename some vertex/fragment state fields for better consistencyBrian Paul2012-08-061-2/+8
| | | | Reviewed-by: José Fonseca <jfonseca@vmware.com>
* st/mesa: use STATIC_ASSERT in a few placesBrian Paul2012-07-271-3/+3
|
* st/mesa: implement accelerated stencil blitting using shader stencil exportMarek Olšák2012-07-121-0/+2
| | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* st/mesa: use pipe_sampler_view_release() in st_destroy_context_priv()Brian Paul2012-05-191-1/+1
| | | | | | | | Fixes another case of sampler views being created by one context, shared by another, then deleted by the first, leaving a dangling pipe context pointer. Reviewed-by: José Fonseca <jfonseca@vmware.com>
* Merge branch 'gallium-userbuf'Marek Olšák2012-05-111-32/+21
|\ | | | | | | | | | | | | | | Conflicts: src/gallium/docs/source/screen.rst src/gallium/drivers/nv50/nv50_state.c src/gallium/include/pipe/p_defines.h src/mesa/state_tracker/st_draw.c
| * cso: cso_context should install u_vbuf by itself and not st/mesaMarek Olšák2012-04-301-27/+0
| | | | | | | | so that it's installed in the other state trackers too
| * gallium: add void *user_buffer in pipe_vertex_bufferMarek Olšák2012-04-301-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reduces CPU overhead in st_draw_vbo and removes a lot of unnecessary code in that function which was required only to comply with the gallium interface, but wasn't any useful really. Adapted drivers: i915, llvmpipe, r300, softpipe. No changes required in: r600, radeonsi. User vertex buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
| * st/mesa: make user constant buffers optionalMarek Olšák2012-04-301-0/+11
| |