summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: implement DrawTransformFeedbackStreamMarek Olšák2015-08-063-31/+34
| | | | Reviewed-by: Dave Airlie <[email protected]>
* vbo: pass the stream from DrawTransformFeedbackStream to driversMarek Olšák2015-08-064-1/+5
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: don't draw instead of asserting in transform feedbackDave Airlie2015-07-313-4/+7
| | | | | | | | | | | | if we get a request to take the count from feedback, but there is no buffer to take it from, just draw as if we got 0 vertices so nothing. This fixes this assert killing the ogl conform, and a piglit test I've sent. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Use floats for viewport bounds.Matt Turner2015-07-291-1/+1
| | | | | | | | | | | | | | | | | | ARB_viewport_array specifies that DEPTH_RANGE consists of double- precision parameters (corresponding commit d4dc35987), and a preparatory commit (6340e609a) added _mesa_get_viewport_xform() which returned double-precision scale[3] and translate[3] vectors, even though X, Y, Width, and Height were still floats. All users of _mesa_get_viewport_xform() immediately convert the double scale and translation vectors into floats (which were floats originally, but were converted to doubles in _mesa_get_viewport_xform(), sigh). i965 at least cannot consume doubles (see SF_CLIP_VIEWPORT). If we want to pass doubles to hardware, we should have a different function that does that. Acked-by: Mathias Froehlich <[email protected]>
* st/mesa: remove st_context::missing textures and get_passthrough_fsMarek Olšák2015-07-292-28/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove st_finalize_textures atomMarek Olšák2015-07-293-47/+0
| | | | | | | | | It only checks fragment textures and ignores other shaders, which makes it incomplete, and textures are already finalized in update_single_texture. There are no piglit regressions. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add shader dumping for shader-dbMarek Olšák2015-07-291-0/+66
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix GLSL 1.30 texture shadow functions with the GL_ALPHA depth mode ↵Marek Olšák2015-07-293-47/+77
| | | | | | | | | | | | (v2) Fixes piglit: [email protected]@execution@fs-texture-sampler2dshadow-10 [email protected]@execution@fs-texture-sampler2dshadow-11 v2: use st_shader_stage_to_ptarget Reviewed-by: Brian Paul <[email protected]>
* st/mesa: don't ignore texture buffer state changesMarek Olšák2015-07-253-5/+7
| | | | | | | | Fixes piglit: spec@arb_texture_buffer_range@ranges-2 Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove unused 'samp' function parametersBrian Paul2015-07-231-5/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add comments on a few sampler view functionsBrian Paul2015-07-231-0/+10
| | | | Trivial.
* st/mesa: enable shader subroutineDave Airlie2015-07-231-0/+1
| | | | | | | since this touches drivers, only enable it on gallium for now for drivers reporting GLSL 1.30 or above. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add subroutine bits (v1.1)Dave Airlie2015-07-231-1/+1
| | | | | | | | | | Just add support for the subroutine type to the glsl->tgsi convertor. v1.1: add subroutine to int support. Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl/types: add new subroutine type (v3.2)Dave Airlie2015-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This type will be used to store the name of subroutine types as in subroutine void myfunc(void); will store myfunc into a subroutine type. This is required to the parser can identify a subroutine type in a uniform decleration as a valid type, and also for looking up the type later. Also add contains_subroutine method. v2: handle subroutine to int comparisons, needed for lowering pass. v3: do subroutine to int with it's own IR operation to avoid hacking on asserts (Kayden) v3.1: fix warnings in this patch, fix nir, fix tgsi v3.2: fixup tests Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]> tests: fix warnings
* st/mesa: enable tessellation if the driver supports itMarek Olšák2015-07-231-0/+5
|
* st/mesa: set default tessellation levelsMarek Olšák2015-07-235-1/+66
|
* st/mesa: add barrier supportIlia Mirkin2015-07-231-1/+4
|
* st/mesa: disable copy propagation for tessellation shadersIlia Mirkin2015-07-231-1/+5
| | | | This can't work due to shared inputs and outputs and barriers.
* st/mesa: set vertices_per_patch when drawingIlia Mirkin2015-07-231-0/+2
|
* st/mesa: add 2d indexing support to outputsIlia Mirkin2015-07-231-10/+37
|
* st/mesa: handle tessellation 2D varyings correctlyMarek Olšák2015-07-231-8/+20
|
* st/mesa: lower gl_TessLevel from float[] to vecnIlia Mirkin2015-07-231-0/+2
|
* st/mesa: query shader CAPs for tessellationIlia Mirkin2015-07-231-0/+15
| | | | The MaxTessPatchComponents query added by Marek.
* st/mesa: add texture updates for tessellation programsIlia Mirkin2015-07-234-0/+72
|
* st/mesa: handle constbufs/ubos for tessellation shadersIlia Mirkin2015-07-233-1/+95
|
* st/mesa: add conversion for tessellation shadersMarek Olšák2015-07-232-98/+274
| | | | Based on code from Ilia Mirkin <[email protected]>.
* st/mesa: add tessellation shader statesIlia Mirkin2015-07-239-1/+459
| | | | additional fixes by Marek
* glsl: pass shader stage to lower_output_reads and handle tess controlIlia Mirkin2015-07-231-1/+1
| | | | | | | | | | | | | Tessellation control outputs can be read in directly without first having been written. Accessing these will require some special logic anyways, so just let them through. V2: Never lower tess control output reads, whether patch or not -- both can be read back by other threads. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: don't lower variable indexing on non-patch tessellation inputs/outputsMarek Olšák2015-07-231-1/+1
| | | | | | | | | | | | There is no way to lower them, because the array sizes are unknown at compile time. Based on a patch from: Fabian Bieler <[email protected]> v2: add comments Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: use cso_set_samplersMarek Olšák2015-07-232-10/+8
|
* cso: remove clip state handlingMarek Olšák2015-07-231-2/+5
| | | | | | There is no need for this. v2: handle redundant clip state changes in st/mesa
* cso: only allow saving and restoring fragment sampler statesMarek Olšák2015-07-222-4/+4
|
* cso: only allow saving and restoring fragment sampler viewsMarek Olšák2015-07-222-4/+4
| | | | Not needed for other shader stages.
* st/mesa: don't call st_validate_state in BlitFramebufferMarek Olšák2015-07-221-2/+2
| | | | | | | | | None of the draw states are used here. This fixes a crash in piglit: ext_framebuffer_blit/blit-early Calling st_manager_validate_framebuffers is the minimum requirement here. Cc: [email protected]
* st/dri: expose sRGB visuals (v2)Marek Olšák2015-07-221-0/+1
| | | | | | | v2: The fix for the darkness in Ubuntu Unity is in the hunk with the 4-line comment. Reviewed-by: Emil Velikov <[email protected]>
* mesa: replace Driver.GetCompressedTexImage() w/ GetCompressedTexSubImage()Brian Paul2015-07-211-1/+1
| | | | | | | For now, pass offsets of zero and width/height/depth equal to the whole image. Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: replace Driver.GetTexImage with GetTexSubImage()Brian Paul2015-07-211-13/+20
| | | | | | | | | | | | | | | The new driver hook has x/y/zoffset and width/height/depth parameters for the new glGetTextureSubImage() function. The meta code and gallium state tracker are updated to handle the new parameters. Callers to Driver.GetTexSubImage() pass in offsets=0 and sizes equal to the whole texture size. v2: update i965 driver code, s/GLint/GLsizei/ in GetTexSubImage hook Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-1/+1
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* st/mesa: Silence GCC unused-variable warning.Vinson Lee2015-07-211-0/+1
| | | | | | | | | | | | Silence a release build warning. st_glsl_to_tgsi.cpp: In function 'pipe_error st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, const gl_program*, GLuint, const GLuint*, const GLuint*, const ubyte*, const ubyte*, const GLuint*, const GLuint*, GLuint, const GLuint*, const GLuint*, const ubyte*, const ubyte*, boolean, boolean)': st_glsl_to_tgsi.cpp:5461:36: warning: unused variable 'pscreen' [-Wunused-variable] struct pipe_screen *pscreen = st->pipe->screen; ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: if a fence isn't returned, assume it's signalledMarek Olšák2015-07-051-1/+13
| | | | | The reason might be that no commands have been submitted before the flush and the GPU is idle.
* gallium: use fence_finish instead of fence_signalled in state trackersMarek Olšák2015-07-051-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa/st: Add checks for signed/unsigned integer conversions in ReadPixelsIago Toral Quiroga2015-07-021-0/+28
| | | | | | | | | | | | | | | | | | These checks were in Mesa prior to commit fbba25bba, but they were not necessary for the purpose that Mesa intended (check if we could resolve ReadPixels via memcpy), so that commit took them away. Unfortunately, it seems that some Gallium drivers rely on these checks to make the decision of whether they should fallback to Mesa's implementation of ReadPixels correctly. Michel Dänzer reported that the following piglit test would fail on radeonsi after commit fbba25bba: spec@ext_texture_integer@fbo_integer_readpixels_sint_uint This patch puts the checks back in Gallium, where they are needed. Tested-by: Michel Dänzer <[email protected]>
* mesa/st: use EmitNoIndirectSampler if !ARB_gpu_shader5Tapani Pälli2015-06-301-0/+5
| | | | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: "10.5" and "10.6" <[email protected]>
* mesa/st: Use global function _mesa_regions_overlap()Anuj Phogat2015-06-291-27/+3
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove unneeded pipe_surface_release() in st_render_texture()Brian Paul2015-06-241-2/+0
| | | | | | | | | | | | | | This caused us to always free the pipe_surface for the renderbuffer. The subsequent call to st_update_renderbuffer_surface() would typically just recreate it. Remove the call to pipe_surface_release() and let st_update_renderbuffer_surface() take care of freeing the old surface if it needs to be replaced (because of change to mipmap level, etc). This can save quite a few calls to pipe_context::create_surface() and surface_destroy(). Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* glsl_to_tgsi: add SVIEW decl supportRob Clark2015-06-211-1/+35
| | | | | | | | | | | | | | | | | | | | | | | Freedreno needs sampler type information to deal with int/uint textures. To accomplish this, start creating sampler-view declarations, as suggested here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html create a sampler-view with index matching the sampler, to encode the texture type (ie. SINT/UINT/FLOAT). Ie: DCL SVIEW[n], 2D, UINT DCL SAMP[n] TEX OUT[1], IN[1], SAMP[n] For tgsi texture instructions which do not take an explicit SVIEW argument, the SVIEW index is implied by the SAMP index. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: improve assertions in vp/fp translationMarek Olšák2015-06-161-2/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* glsl: Add ir node for barrierChris Forbes2015-06-121-0/+7
| | | | | | | | | v2: * Changes suggested by mattst88 [[email protected]: Add nir support] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* mesa: use GL_GEOMETRY_PROGRAM_NV instead of MESA_GEOMETRY_PROGRAMMarek Olšák2015-06-053-6/+6
| | | | | | | | There's no reason to use our own definition. Tessellation will use the NV definitions too. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: use TGSI array declarations for VS,GS arrays of outputs (v2)Marek Olšák2015-06-054-41/+103
| | | | v2: don't use PIPE_MAX_SHADER_ARRAYS