summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: unify _mesa_uniform() for image uniformsSamuel Pitoiset2017-05-161-6/+8
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Elie Tournier <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix indentation in _mesa_uniform()Samuel Pitoiset2017-05-161-18/+19
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Elie Tournier <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix indentation in _mesa_associate_uniform_storage()Samuel Pitoiset2017-05-161-52/+49
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Elie Tournier <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: replace _mesa_problem() with unreachable() in pack.cTimothy Arceri2017-05-161-6/+4
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: replace _mesa_problem() with unreachable() in mipmap.cTimothy Arceri2017-05-161-4/+3
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: replace _mesa_problem() with unreachable() in _mesa_convert_colors()Timothy Arceri2017-05-161-1/+1
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: replace _mesa_problem() with unreachable() in _mesa_light()Timothy Arceri2017-05-161-2/+1
| | | | | | All drivers but the old nouveau dri driver return after this anyway. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: replace _mesa_problem() with assert() in hash tableTimothy Arceri2017-05-161-6/+4
| | | | | | | There should be no way the OpenGL test suites don't hit the assert() should we do something to cause this code path to be taken. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: don't crash in KHR_no_error uniform variants when location == -1Timothy Arceri2017-05-161-0/+9
| | | | | | | | | | From Seciton 7.6 (UNIFORM VARIABLES) of the OpenGL 4.5 spec: "If the value of location is -1, the Uniform* commands will silently ignore the data passed in, and the current uniform values will not be changed. Reviewed-by: Samuel Pitoiset <[email protected]>
* i965: Mark shader programs for capture in the error state.Matt Turner2017-05-156-1/+26
| | | | | | | | | | | | | When the GPU hangs, the kernel saves some state for us. Until now it has not included the shader programs, which are very often the reason the GPU hang occurred. With the programs saved in the error state, we should be more capable of debugging hangs. Thanks to Chris Wilson and Ben Widawsky who provided the kernel support for this feature ("drm/i915: Copy user requested buffers into the error state"), which will be in kernel v4.13. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: perf: fix pointer to integer castLionel Landwerlin2017-05-151-1/+1
| | | | | | | | v2: Just use cast to uintptr_t (Chris) Reported-by: Mauro Rossi <[email protected]> Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* gallium: add flag PIPE_CONTEXT_PREFER_THREADEDMarek Olšák2017-05-151-1/+1
| | | | | | | | State trackers can set this to tell the driver when u_threaded_context is desirable. Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: fix KHR_no_error SSO supportTimothy Arceri2017-05-131-1/+1
| | | | | Fixes: 00c5119a5e821 ("mesa: add KHR_no_error support for glUseProgramStages()") Reviewed-by: Samuel Pitoiset <[email protected]>
* i965: Port 3DSTATE_VF_TOPOLOGY on gen8+ to genxml.Rafael Antognolli2017-05-114-56/+21
| | | | | | | With this last state ported, we can get rid of gen8_draw_upload.c. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Port 3DSTATE_INDEX_BUFFER to genxml.Rafael Antognolli2017-05-115-74/+40
| | | | | | | | Also make the brw_get_index_type() function not shift its return, since that is genxml's job now. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Port brw_cs_state tracked state to genxml.Rafael Antognolli2017-05-113-164/+145
| | | | | | | Emit the respective commands using genxml code. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965/genxml: Mostly style fixes for emit_vertices code.Rafael Antognolli2017-05-111-25/+17
| | | | | | | | | | | | | | Several issues were caught on review after the original patch landed. This commit fixes them. v2: - Fix padding (Topi) - Remove .DestinationElementOffset change from this patch (Topi) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Drop brw_context::viewport_transform_enable.Kenneth Graunke2017-05-113-3/+1
| | | | | | | | | | This was used by the meta fast clear code. Now that we've switched back to BLORP, it's always true. We might want it back when we add a RECTLIST extension to GL, but that's someday in the future... Reviewed-by: Kristian H. Kristensen <[email protected]>
* i965: Port Gen4-5 VS_STATE to genxml.Kenneth Graunke2017-05-115-235/+68
| | | | | | It's actually not that much code. Reviewed-by: Rafael Antognolli <[email protected]>
* i965: Change GEN_GEN < 7 to GEN_GEN == 6 in 3DSTATE_VS code.Kenneth Graunke2017-05-111-5/+4
| | | | | | | | This whole code is surrounded in #if GEN_GEN >= 6, and this code only applies on Sandybridge. So, use GEN_GEN == 6 to reduce the delta in the next patch, when we add Gen4-5 support. Reviewed-by: Rafael Antognolli <[email protected]>
* mesa: remove useless get_uniform_parameter() declarationSamuel Pitoiset2017-05-111-3/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove unused gl_program_parameter::InitializedSamuel Pitoiset2017-05-112-2/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* Android: remove needless conditional including of child makefilesRob Herring2017-05-113-18/+1
| | | | | | | | | | It is not necessary to filter driver and winsys directories based on the list of enabled drivers. Selecting the included driver libraries or not is sufficient to control what is built. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: remove _CurrentFragmentProgram from gl_pipeline_objectTimothy Arceri2017-05-116-36/+2
| | | | | | | | | | | | | This was added in b527dd65c830a as a work around because fixed function fragment shaders were tracked in ctx->FragmentProgram._Current as a gl_program rather than gl_shader_program. However after my refactoring of the program and shader structs at the end of 2016 which culminated in c505d6d85222, we no longer need gl_shader_program to track the current program making _CurrentFragmentProgram obsolete. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add KHR_no_error support for FramebufferTexture*D functionsTimothy Arceri2017-05-112-0/+42
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add no error version of framebuffer_texture_with_dims()Timothy Arceri2017-05-111-0/+22
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add error version of get_texture_for_framebuffer()Timothy Arceri2017-05-111-8/+18
| | | | | | This is a step towards KHR_no_error support. Reviewed-by: Eric Anholt <[email protected]>
* mesa: pass rb attachment to _mesa_framebuffer_texture()Timothy Arceri2017-05-113-21/+45
| | | | | | This change will help us add KHR_no_error support to the caller. Reviewed-by: Eric Anholt <[email protected]>
* mesa: add _mesa_get_and_validate_attachment() helperTimothy Arceri2017-05-112-12/+30
| | | | | | | Will be used to add KHR_no_error support. We make this available external so it can be called from meta. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _mesa_problem() from a few locationsTimothy Arceri2017-05-113-10/+6
| | | | | | | | | | | _mesa_problem() is still useful in some places such as is if a backend compile fails, but for the majority of cases we should be able to remove it. OpenGL test suites are becoming very mature, we should place more trust in debug builds picking up missed cases. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_get_framebuffer_attachment_parameter() staticTimothy Arceri2017-05-112-16/+9
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix indentationTimothy Arceri2017-05-111-1/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _mesa from static framebuffer object functionTimothy Arceri2017-05-111-3/+3
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: small _mesa_UseProgram() tidy upTimothy Arceri2017-05-111-4/+1
| | | | | | Makes the code easier to follow. Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for glBindProgramPipeline()Timothy Arceri2017-05-112-0/+28
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for glActiveShaderProgram()Timothy Arceri2017-05-112-0/+20
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for glUseProgramStages()Timothy Arceri2017-05-112-0/+24
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: create use_program_stages() helperTimothy Arceri2017-05-111-32/+39
| | | | | | | This will be used to create a KHR_no_error version of glUseProgramStages(). Reviewed-by: Eric Anholt <[email protected]>
* i965: Make INTEL_DEBUG=bat decode VS/CLIP/GS/SF/WM/CC_STATE on Gen4-5.Kenneth Graunke2017-05-101-1/+21
| | | | | | | | | | | | | | This is something the original decoder did, but I didn't bother with until now. I recently had to debug an Ironlake issue, and wanted to inspect VS_STATE. So, now it's back. The other packets in the switch statement are all Gen6/7+, where we use offsets from dynamic state base address, so we don't need the gtt_offset subtraction introduced here. We might want to make a helper for this hack at some point - perhaps when we introduce the next occurance. Acked-by: Jason Ekstrand <[email protected]>
* i965: Switch BRW_NEW_CURBE_OFFSETS to BRW_NEW_PUSH_CONSTANT_ALLOCATION.Kenneth Graunke2017-05-108-18/+14
| | | | | | | | | | | | The BRW_NEW_CURBE_OFFSETS dirty bit is signalled when changing the partitioning of the Constant Buffer URB section between the various shader stages, on Gen4-5. BRW_NEW_PUSH_CONSTANT_ALLOCATION is basically the same thing on Gen7+. So, save a bit, and use the new name. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Drop BRW_NEW_PUSH_CONSTANT_ALLOCATION from Gen6 code.Kenneth Graunke2017-05-101-9/+3
| | | | | | | Gen6 doesn't have a configurable push constant region. This is only used on Gen7+. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Only #if...#endif a single function or related section at a time.Kenneth Graunke2017-05-101-3/+38
| | | | | | | | | | | Previously we guarded large swathes of code with #if GEN ... #endif blocks. This made it difficult to see which generations include what. This patch splits up the #if..#endif sections so they surround a small section of code - usually a single function/atom, or sometimes a group of related functions. It should make the code easier to work on. Reviewed-by: Rafael Antognolli <[email protected]>
* i965: Turn brw_get_line_width_float() into brw_get_line_width().Kenneth Graunke2017-05-102-12/+4
| | | | | | | | | | Drop the old brw_get_line_width() helper which return the unsigned fixed-point encoding of the line width - it's been dead since the conversion to GENXML (which does the encoding for us). Then rename brw_get_line_width_float() to the shorter name. Reviewed-by: Rafael Antognolli <[email protected]>
* i965: Drop INTEL_DEBUG=stats.Kenneth Graunke2017-05-106-15/+2
| | | | | | | | | | | | | | | | For whatever reason, we had an INTEL_DEBUG=stats option that enabled various statistics counters on Gen4-5 systems. It's been around forever, though I can't think of a single time that it's been useful. On Gen6+, we enable statistics all the time because they're necessary to support various query object targets. Turning them off would break those queries. Gen4-5 don't support those queries, so the statistics counters generally aren't useful; we disabled them by default. This patch disables them altogether. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* i965: Disable ARB_pipeline_statistics_query on Gen4-5.Kenneth Graunke2017-05-101-1/+1
| | | | | | | | | | | | | | | | | | | We apparently enabled this on all platforms in Mesa 10.6. However, it was only ever implemented for Gen6+. The Gen4-5 query code goes up in flames with an "Unrecognized query target" unreachable() error if you even attempt to use any of the new functionality. This wasn't caught because the Piglit tests require OpenGL 3.0, which Gen4-5 cannot support. The extension spec does say 3.0 is required, though I'm not sure why - it seems like 2.1 would work fine. We could implement it anyway, but it's a little bit of a pain due to the lack of hardware contexts (so we have to snapshot around batches). Given that it's been 100% broken for two years and I haven't seen a bug report about it, I'm not terribly inclined to care. So, let it go. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* st/mesa: move the logic of all_varyings_in_vbos into st_update_arrayMarek Olšák2017-05-103-25/+12
| | | | | | | | | | The function was pretty slow. This brings a substantial decrease in draw call overhead when min/max index bounds are not needed: Before: DrawElements (1 VBO) w/ no state change: 5.75 million After: DrawElements (1 VBO) w/ no state change: 7.03 million Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: unify common code in st_draw_vbo functionsMarek Olšák2017-05-101-27/+21
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: make st_draw_vbo staticMarek Olšák2017-05-103-14/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: upload zero-stride vertex attributes hereMarek Olšák2017-05-103-16/+48
| | | | | | | | | | | This is the best place to do it. Now drivers without u_vbuf don't have to do it. v2: use correct upload size and optimal alignment Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: simplify the signature of get_client_arrayMarek Olšák2017-05-101-10/+8
| | | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>