aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* vbo: lift common code out of switch casesBrian Paul2018-01-172-18/+12
| | | | | | | | Both switch cases began with the same code. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: optimize some display list drawing (v2)Brian Paul2018-01-173-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vbo_save_vertex_list structure records one or more glBegin/End primitives which all have the same vertex format. To draw these primitives, we setup the vertex array state, then issue the drawing command. Before, the 'start' vertex was typically zero and we used the vertex array pointer to indicate where the vertex data starts. This patch checks if the vertex buffer offset is an exact multiple of the vertex size. If so, that means we can use zero-based vertex array pointers and use the draw's start value to indicate where the vertex data starts. This means a series of display list drawing commands may have identical vertex array state. This will get filtered out by the Gallium CSO module so we can issue a tight series of drawing commands without state changes to the device. Note that this also works for a series of glCallList commands (not just one list that contains multiple glBegin/End pairs). No Piglit or conform changes. v2: minor fixes suggested by Ian. Reviewed-by: Ian Romanick <[email protected]>
* vbo: rewrite some code in playback_copy_to_current()Brian Paul2018-01-171-8/+6
| | | | | | I think this is a little easier to understand. Reviewed-by: Ian Romanick <[email protected]>
* vbo: add some comments in vbo_save_api.cBrian Paul2018-01-171-0/+17
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: rename some functions in vbo_save_api.cBrian Paul2018-01-171-37/+37
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: rename some functions in vbo_save_draw.cBrian Paul2018-01-171-9/+9
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: add comment that vbo_save_vertex_list::buffer_offset is in bytesBrian Paul2018-01-171-1/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: minor code simplification in _save_compile_vertex_list()Brian Paul2018-01-171-4/+5
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: rename prim to primsBrian Paul2018-01-173-47/+47
| | | | | | | Using a plural name makes it easier to see that this is an array and not a pointer to a single object. Reviewed-by: Ian Romanick <[email protected]>
* vbo: removed unused ctx parameter for alloc_prim_store()Brian Paul2018-01-171-4/+3
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: rename vbo_save_context::buffer to buffer_mapBrian Paul2018-01-172-9/+9
| | | | | | And move the field and improve comments. Reviewed-by: Ian Romanick <[email protected]>
* vbo: remove unused vbo_save_context::count fieldBrian Paul2018-01-171-1/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: s/GLuint/GLbitfield/ for vbo_save_context::replay_flagsBrian Paul2018-01-171-1/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: rename vbo_save_vertex_list::count to vertex_countBrian Paul2018-01-173-12/+13
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: rename vbo_save_vertex_store::buffer to buffer_mapBrian Paul2018-01-173-14/+15
| | | | | | To match other parts of the VBO code and make things easier to understand. Reviewed-by: Ian Romanick <[email protected]>
* vbo: rename vbo_save_primitive_store::buffer to primsBrian Paul2018-01-172-2/+2
| | | | | | A little easier to understand. Reviewed-by: Ian Romanick <[email protected]>
* vbo: whitespace fixes in vbo_save.hBrian Paul2018-01-171-15/+17
| | | | Reviewed-by: Ian Romanick <[email protected]>
* vbo: whitespace fixes in vbo_save_draw.cBrian Paul2018-01-171-30/+31
| | | | Reviewed-by: Ian Romanick <[email protected]>
* svga: add num-commands-per-draw HUD queryBrian Paul2018-01-176-0/+24
| | | | | | | | | This query shows the ratio of total commands vs. drawing commands sent to the vgpu device. This gives some idea of how many state changes are sent per draw call. The closer the ratio is to 1.0, the better. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* gallium/hud: Fix support for PIPE_DRIVER_QUERY_TYPE_FLOATBrian Paul2018-01-172-3/+29
| | | | | | | | | | | | | | | Evidently, nobody has used PIPE_DRIVER_QUERY_TYPE_FLOAT up to this point. Adding a driver query of this type which returns the query value in pipe_query_result::f resulted in garbage output in the HUD. The problem is the pipe_query_result::f field was being accessed as through the u64 field and being added to the query_info::results_cumulative field. This patch checks for PIPE_DRIVER_QUERY_TYPE_FLOAT in a few places and scales the float by 1000 before converting to uint64_t. Also, add some comments to explain the query_info::result_index field. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: remove uint64_t casts in sensor query_sti_load() functionBrian Paul2018-01-171-5/+5
| | | | | | | The hud_graph_add_value() function takes a double value, so just pass the current/critical values as-is since they're doubles. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: compute cpu load, percent with doublesBrian Paul2018-01-171-4/+5
| | | | | | | The hud_graph_add_value() function takes a double precision value, so compute it that way. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: s/unsigned/enum pipe_query_type/Brian Paul2018-01-172-3/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* meson: add llvm dependency for swr buildGeorge Kyriazis2018-01-171-0/+1
| | | | Reviewed-by: Dylan Baker <[email protected]>
* st/va: add break for MPEG4 data buffer handling caseLeo Liu2018-01-171-0/+1
| | | | Signed-off-by: Leo Liu <[email protected]>
* st/va: remove TODO line for JPEG data buffer handlingLeo Liu2018-01-171-1/+0
| | | | | | | Nothing to do Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* i915: No longer rely on compatability define in intel_bufmgr.hRhys Kidd2018-01-171-1/+1
| | | | | | | | | | | Symbol rename from dri_* to drm_intel_* introduced a number of compatability defines within intel_bufmgr.h. Replace the old function with the new function, consistent with the balance of this file. Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radeonsi: bump glsl version to 450 for nir backendTimothy Arceri2018-01-181-6/+1
| | | | | | | | | | We still have more work to do but piglit results are looking pretty good. At GLSL 1.50 we have 30647/31118 piglit tests passing. At GLSL 4.50 we have 37927/38551 piglit tests passing. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/nir: add some missing tcs bits to the nir scan passTimothy Arceri2018-01-181-0/+14
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ac: rework load_tcs_{inputs,outputs}Timothy Arceri2018-01-181-73/+53
| | | | | | | This shares more code and calls the new shared load_tess_varyings() abi so that the radeonsi nir path now supports tcs output loads. Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/radeonsi: add tcs load outputs supportTimothy Arceri2018-01-184-35/+51
| | | | | | | | | The code to load outputs is essentially the same as load inputs so we make the interface more generic to maximise code sharing. We will make use of the new support in the following patch. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: add ARB_get_program_binary support using TGSITimothy Arceri2018-01-172-0/+10
| | | | | | | | | | | | | This resolves a game bug in Dead Island. The game doesn't properly handle ARB_get_program_binary with 0 supported formats, and ends up crashing. This will enable ARB_get_program_binary binary support for any driver that currently enables the on-disk shader cache. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85564
* st/glsl_to_tgsi: add st_get_program_binary_driver_sha1() helperTimothy Arceri2018-01-172-0/+9
| | | | | | | This will be used by ARB_get_program_binary. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: add (de)serialise program helpersTimothy Arceri2018-01-172-127/+146
| | | | | | | | These will be shared between the on-disk shader cache and ARB_get_program_binary. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: stop passing pipe_shader_state to st_store_tgsi_in_disk_cache()Timothy Arceri2018-01-173-16/+17
| | | | | | | | | | We can instead just get this from st_*_program. V2: store tokens to to st_compute_program before attempting to write to cache (fixes crash). Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: store num_tgsi_tokens in st_*_programTimothy Arceri2018-01-174-17/+34
| | | | | | | We will need this for ARB_get_program_binary binary support. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* loader/dri3: Try to make sure we only process our own NotifyMSC eventsMichel Dänzer2018-01-172-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using a sequence counter value to wait for a specific NotifyMSC event. However, we can receive events from other clients as well, which may already be using higher sequence numbers than us. In that case, we could stop processing after an event from another client, which could have been received significantly earlier. This would have multiple undesirable effects: * The computed MSC and UST values would be lower than they should be * We could leave a growing number of NotifyMSC events from ourselves and other clients in XCB's special event queue I ran into this with Firefox and Thunderbird, whose VSync threads both seem to use the same window. The result was sluggish screen updates and growing memory consumption in one of them. Fix this by checking the XCB sequence number and MSC value of NotifyMSC events, instead of using our own sequence number. v2: * Use the Present event ID for the sequence parameter of the PresentNotifyMSC request, as another safeguard against processing events from other clients * Rebase on drawable mutex changes Reviewed-by: Nicolai Hähnle <[email protected]> # v1
* radv: Implement VK_EXT_debug_report.Bas Nieuwenhuizen2018-01-173-0/+50
| | | | | | | | This is not hooked up to any messages yet, but useful for e.g. renderdoc if you add some messages during development. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* vulkan: move anv VK_EXT_debug_report implementation to common code.Bas Nieuwenhuizen2018-01-179-95/+182
| | | | | | | | | | For also using it in radv. I moved the remaining stubs back to anv_device.c as they were just trivial. This does not move the vk_errorf/anv_perf_warn or the object type macros, as those depend on anv types and logging. Reviewed-by: Tapani Pälli <[email protected]>
* st/glsl_to_nir: disable io lowering to temps for tessTimothy Arceri2018-01-171-4/+8
| | | | | | | | | | | | | | Lowering these to temps makes a big mess, and results in some piglit test failures. Also the radeonsi backend (the only backend to support tess) has support for indirects so there is no need to lower them anyway. Fixes the following piglit tests on radeonsi: tests/spec/arb_tessellation_shader/execution/variable-indexing/tes-input-array-vec3-index-rd.shader_test tests/spec/arb_tessellation_shader/execution/variable-indexing/tes-input-array-vec4-index-rd.shader_test Reviewed-by: Marek Olšák <[email protected]>
* i965: Enable CCS_E sampling of sRGB textures as UNORMJason Ekstrand2018-01-161-3/+2
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/draw: Do resolves properly for textures used by TXFJason Ekstrand2018-01-161-0/+41
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/miptree: Refactor CCS_E and CCS_D cases in render_aux_usageJason Ekstrand2018-01-161-13/+15
| | | | | | | | | | | | | | | | | | | | | This commit unifies the CCS_E and CCS_D cases. This should fix a couple of subtle issues. One is that when you use INTEL_DEBUG=norbc to disable CCS_E, we don't get the sRGB blending workaround. By unifying the code, we give CCS_D that workaround as well. The second issue fixed by this refactor is that the blending workaround was appears to be enabled on all gens but really only applies on gen9. Due to a happy accident in the way code was laid out, it was only getting enabled on gen9: gen8 and earlier don't support non-zero-one clear colors, and gen10 supports sRGB for CCS_E so it got caught in the format_ccs_e_compat_with_miptree case. This refactor moves it above the format_ccs_e_compat_with_miptree case so it's an explicit early exit and makes it explicitly only on gen9. Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.3" <[email protected]>
* Re-enable regular fast-clears (CCS_D) on gen9+Jason Ekstrand2018-01-162-42/+25
| | | | | | | | | | | | | This reverts commit ee57b15ec764736e2d5360beaef9fb2045ed0f68, "i965: Disable regular fast-clears (CCS_D) on gen9+". How taht we've fixed the issue with too many different aux usages in the render cache, it should be safe to re-enable CCS_D for sRGB. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104163 Tested-by: Eero Tamminen <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.3" <[email protected]>
* i965: Track format and aux usage in the render cacheJason Ekstrand2018-01-165-27/+92
| | | | | | | | | | | | | | | | This lets us perform render cache flushes whenever a surface goes from being used with one aux+format to a different aux+format. This is the "proper" fix for https://bugs.freedesktop.org/102435. ee57b15ec764736e2d5360beaef9fb2045ed0f68 which was really just a partial revert of 3e57e9494c2279580ad6a83ab8c065d01e7e634e was just a hack to get rid of a hang in a bunch of Valve games. This solves the actual problem responsible for the hang and lets us enable CCS_E once again. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102435 Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.3" <[email protected]>
* i965: Call brw_cache_flush_for_render in predraw_resolve_framebufferJason Ekstrand2018-01-161-0/+2
| | | | | | | | | | | | | This makes sure we flush things out of other caches prior to using a surface through the render cache. Currently, this is a no-op because GL won't let you bind anything other than a color surface as color so it should never end up in the depth cache. However, this does complete the flush/add_bo pair for regular drawing which will be required for the next commit. Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.3" <[email protected]>
* i965/gen6-7/sol: Bump primitive counter BO size.Francisco Jerez2018-01-161-2/+3
| | | | | | | | | | Improves performance of SynMark2 OglGSCloth by a further 9.65%±0.59% due to the reduction in overwraps of the primitive count buffer that lead to a CPU stall on previous rendering. Cummulative performance improvement from the series 81.50% ±0.96% (data gathered on VLV). Tested-By: Eero Tamminen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen6-7/sol: Keep independent counters for the current and previous ↵Francisco Jerez2018-01-163-27/+36
| | | | | | | | | | | | | | | | | | begin/end block. This allows us to aggregate the primitive counts of a completed transform feedback begin/end block lazily, which in the most typical case (where glDrawTransformFeedback is not used) will allow us to avoid aggregating the primitive counters on the CPU altogether, preventing a stall on previous rendering during glBeginTransformFeedback(), which dramatically improves performance of applications that rely heavily on transform feedback. Improves performance of SynMark2 OglGSCloth by 65.52% ±0.25% (data gathered on VLV). Tested-By: Eero Tamminen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen6-7/sol: Restructure primitive counter into a separate type.Francisco Jerez2018-01-163-39/+58
| | | | | | | | | | | A primitive counter encapsulates a scalar aggregating counter for each vertex stream along with a section within the primitive tally buffer which hasn't been read out yet. Defining this as a separate type will allow us to keep multiple counter objects around for the same transform feedback object without any code duplication. Tested-By: Eero Tamminen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: enable ARB_enhanced_layouts on nir driversTimothy Arceri2018-01-171-3/+1
| | | | | | | | | I'm guessing this may have been disable because of missing component packing support. However recent nir linking changes required nir based gallium drivers to support component packing so this should now be ok to enable. Reviewed-by: Marek Olšák <[email protected]>