aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: don't set the border color if it's unusedMarek Olšák2017-06-221-4/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't set 16 scissors and 16 viewports if they're unusedMarek Olšák2017-06-224-6/+34
| | | | | | | Only do so if there is a shader writing gl_ViewportIndex. This removes a lot of CPU overhead for the most common case. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: fix pipe_rasterizer_state::scissor with multiple viewportsMarek Olšák2017-06-221-1/+1
| | | | | Cc: 17.1 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: simplify st_update_viewportMarek Olšák2017-06-221-25/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: remove redundant sample_mask checkingMarek Olšák2017-06-222-7/+1
| | | | | | cso does that too Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: use precomputed st_fb_orientationMarek Olšák2017-06-224-8/+8
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: set st_context::...num_samplers to 0 when there are no samplersMarek Olšák2017-06-221-1/+3
| | | | | | This was missed during my st/mesa series. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: unify fail paths for update_single_textureMarek Olšák2017-06-222-7/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't call u_sampler_view_default_template for sampler viewsMarek Olšák2017-06-221-1/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: always set sampler swizzle according to the texture base formatMarek Olšák2017-06-221-32/+9
| | | | | | | | | Mainly don't (indirectly) call util_format_description here. If the driver supports texture swizzling, this will always do the right thing. If the driver doesn't support it, it doesn't matter. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: samplers only need to track whether GLSL >= 130Marek Olšák2017-06-225-22/+25
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: simplify get_texture_format_swizzleMarek Olšák2017-06-221-23/+20
| | | | | | | - Don't check GL_NONE (that was only for buffers). - Don't use util_format_is_depth_or_stencil. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: add an entirely separate codepath for setting up buffer viewsMarek Olšák2017-06-226-100/+134
| | | | | | | | | | | | Remove handling of buffers from all texture paths. This simplifies things for both buffers and textures. get_sampler_view_format is also cleaned up not to call util_format_is_depth_and_stencil. v2: also update st_NewTextureHandle Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* st/mesa: don't return an error from update_single_textureMarek Olšák2017-06-223-11/+7
| | | | | | | It can just return a NULL sampler view, which is better than not doing anything at all. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: clean up trivial dereferences in update_texturesMarek Olšák2017-06-221-6/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't check MaxTextureImageUnits in update_texturesMarek Olšák2017-06-221-12/+2
| | | | | | The linker takes care of it. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't call st_shader_stage_to_ptarget in update_texturesMarek Olšák2017-06-221-8/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: sink and simplify texBaseFormat getting for sampler statesMarek Olšák2017-06-221-9/+9
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't set sampler states for TBOsMarek Olšák2017-06-222-4/+12
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: optimize sampler state translation codeMarek Olšák2017-06-221-48/+20
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: sink code needed for apply_texture_swizzle_to_border_colorMarek Olšák2017-06-221-28/+33
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: simplify update_shader_samplersMarek Olšák2017-06-221-16/+8
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: when binding sampler states, don't check the max sampler limitMarek Olšák2017-06-221-8/+1
| | | | | | | The GLSL linker takes care of it. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't unbind sampler states if none are usedMarek Olšák2017-06-221-1/+1
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: unify update_gp/tcp/tep codeMarek Olšák2017-06-221-63/+28
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't search through shader variants if there is only oneMarek Olšák2017-06-221-51/+90
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't track shader variants in st_contextMarek Olšák2017-06-222-23/+14
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: move blend color into its own state atomMarek Olšák2017-06-223-6/+10
| | | | | | | This is now sensible thanks to the NewBlendColor flag. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: check correctly if multisampling is enabledMarek Olšák2017-06-222-3/+4
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't invoke st_finalize_texture & st_convert_sampler for TBOsMarek Olšák2017-06-221-4/+6
| | | | | | This is a v2 of the previous patch (v1 didn't skip st_finalize_texture). Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: don't flag _NEW_PROGRAM_CONSTANTS for GLSL programs for st/mesaMarek Olšák2017-06-221-3/+0
| | | | | | | | | v2: also update _mesa_uniform_handle for bindless textures Reviewed-by: Nicolai Hähnle <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Timothy Arceri <[email protected]> (v1) Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: don't flag _NEW_PROGRAM_CONSTANTS for non-GLSL programs for st/mesaMarek Olšák2017-06-221-0/+10
| | | | | | | | | This has the benefit that we get to set up constants for exactly the shader stage that needs it. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_POLYGON_STIPPLE for st/mesaMarek Olšák2017-06-221-3/+1
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_LINE for st/mesaMarek Olšák2017-06-221-1/+1
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_POLYGON for st/mesaMarek Olšák2017-06-221-2/+2
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_TRANSFORM for st/mesa if possibleMarek Olšák2017-06-221-4/+5
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_VIEWPORT for st/mesa if possibleMarek Olšák2017-06-221-3/+3
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_MULTISAMPLE for st/mesaMarek Olšák2017-06-221-17/+19
| | | | | | | | There are several new driver flags here so that it maps nicely to gallium. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_COLOR for st/mesa if possibleMarek Olšák2017-06-221-3/+4
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: use DriverFlags.NewAlphaTest to communicate alphatest changes to st/mesaMarek Olšák2017-06-221-2/+2
| | | | | | | | | | | | Now AlphaFunc avoids the blend state update in st/mesa and avoids _mesa_update_state_locked. The GL_ALPHA_TEST enable won't trigger blend state updates in st/mesa after st/mesa stops relying on _NEW_COLOR. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't flag _NEW_DEPTH for st/mesaMarek Olšák2017-06-221-3/+1
| | | | | | | | skipping _mesa_update_state_locked Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: replace VP/FP/ATIfs _Enabled flags with helper functionsMarek Olšák2017-06-221-1/+2
| | | | | | | | These are only used in the GL compatibility profile. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't update draw buffer bounds in _mesa_update_stateMarek Olšák2017-06-222-0/+8
| | | | | | | | | | | | | | | | st/mesa doesn't need the draw bounds for draw calls. I've added the call where it's necessary in core Mesa and drivers, but I suspect that most drivers can just move the call to the right places. The core Mesa places aren't hot paths, so the call overhead doesn't matter there. For now, only st/mesa is made such that this function is invoked very rarely. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: replace ctx->VertexProgram._TwoSideEnabled with a helper functionMarek Olšák2017-06-221-1/+2
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: stop using _NEW_STENCIL with st/mesa, use DriverFlags.NewStencil insteadMarek Olšák2017-06-221-2/+2
| | | | | | | | | | | | | | | | | | | This bypasses _mesa_update_state_locked. Before: DrawElements ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 3.99 million DrawArrays ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 4.56 million After: DrawElements ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 4.93 million DrawArrays ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 5.84 million It's quite a difference in the draw call rate when ctx->NewState stays equal to 0 the whole time. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: replace _mesa_update_stencil() with helper functionsMarek Olšák2017-06-221-1/+1
| | | | | | | | | | | | | The idea is to remove the dependency on _mesa_update_state_locked, so that st/mesa can skip it for stencil state updates, and then stop setting _NEW_STENCIL in mesa/main if the driver is st/mesa. The main motivation is to stop invoking _mesa_update_state_locked for certain state groups. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: fix assert to be simplerDave Airlie2017-06-211-4/+1
| | | | | | | | | | I just noticed a warning with a non-debug build, but really this could all be one line, and I'm not even 100% the assert makes sense here. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: simplify returning GL_VENDORMarek Olšák2017-06-192-5/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: remove the "Gallium 0.4 on" prefix from GL_RENDERERMarek Olšák2017-06-192-8/+1
| | | | | | | | | | | | | If you want to keep it for your driver, please raise your hand. The prefix will probably have to be added into the driver instead of here. I cringe when I look at my long renderer string: Gallium 0.4 on AMD Radeon R9 Fury Series (DRM 3.17.0 / 4.11.0-staging-01277-gab25a9e, LLVM 5.0.0) I'm sincerely sorry for all apps that detect Mesa by expecting "Gallium" in the string. Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't update MSAA states for GL_FRAMEBUFFER_SRGBMarek Olšák2017-06-191-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>