summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa/st/glsl_to_tgsi: remove now unneeded assert.Gert Wollny2018-01-241-1/+0
| | | | | | | | | With the implementation of the tracking of the registers used in reladdr asserting that a driver calling merge_register() uses the address register is no longer needed. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/tests: Add tests for lifetime tracking with indirect addressingGert Wollny2018-01-243-4/+189
| | | | | | | | | Add a code line type that accepts one layer of indirect addressing and add tests to check that temporary register access used for indirect addressing is accounted for in the lifetime estimation. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/glsl_to_tgsi: Add tracking of indirect addressing registersGert Wollny2018-01-241-34/+74
| | | | | | | | | | | | | | | | | | | | | | | So far indirect addressing was not tracked to estimate the temporary life time, and it was not needed, because code to load the address registers was always emitted eliminating the reladdr* handles in the past glsl-to.tgsi stages. Now, with Mareks patch allowing any 1D register to be used for addressing on some hardware this changed, and the tracking becomes necessary. Because the registers have no direct indication on whether the reladdr* was already loaded into an address register, the temporaries in reladdr* are always tracked as reads. This may result in a slight over-estimation of the lifetime in the cases when the load to the address register was emitted. v2: no changes v3: Use debug_log variable instead of directly writing to std::err in debugging output. v6: fix indention and typos Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (v1) Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/tests: Add tests for improved tracking of temporariesGert Wollny2018-01-241-7/+486
| | | | | | | | Additional tests are added that check the tracking of access to temporaries in if-else branches. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/glsl_to_tgsi: Add tracking of ifelse writes in register mergingGert Wollny2018-01-241-20/+292
| | | | | | | | | | Improve the life-time evaluation of temporary registers by also tracking writes in both if and else branches and in up to 32 nested scopes. As a result the estimated required register life-times can be further reduced enabling more registers to be merged. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/tests: cleanup whitespace usage and correct some commentsGert Wollny2018-01-241-64/+63
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/tests: unify MockCodeLine* classesGert Wollny2018-01-244-547/+735
| | | | | | | | | | | | | | | | | | | | * Merge the classes MockCodeLine and MockCodelineWithSwizzle into one, and refactor tests accordingly. * Change memory allocations to use ralloc* interface. v2: * move the test classes into a conveniance library * rename the Mock* classes to Fake* since they are not really Mocks * Base assertion of correct number of src and dst registers in tests on what the operatand actually expects * Fix number of destinations in one test v6: * fix local includes using "..." insteadof <...> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/tests: Fix zero-byte allocation leaksGert Wollny2018-01-241-7/+15
| | | | | | | | | | Don't allocate a zero-sized array, when no texture offsets are given. v5: correct spaces and empty lines Reviewed-by: Brian Paul <[email protected]>(v4) Reviewed-by: Nicolai Hähnle <[email protected]> (v1) Signed-off-by: Gert Wollny <[email protected]>
* mesa/st/glsl_to_tgsi: Add some operators for glsl_to_tgsi related classesGert Wollny2018-01-243-88/+202
| | | | | | | | | | | Add the equal operator and the "<<" stream write operator for the st_*_reg classes and the "<<" operator to the instruction class, and make use of these operators in the debugging output. v5: Fix empty lines Reviewed-by: Brian Paul <[email protected]> (v4) Signed-off-by: Gert Wollny <[email protected]>
* mesa/program: Add missing file types to printoutGert Wollny2018-01-241-2/+14
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* vbo: fix incorrect min/max_index values in display list draw callBrian Paul2018-01-243-3/+8
| | | | | | | | | | | | | | This fixes another regression from commit 8e4efdc895ea ("vbo: optimize some display list drawing"). The problem was the min_index, max_index values passed to the vbo drawing function were not computed to compensate for the biased prim::start values. https://bugs.freedesktop.org/show_bug.cgi?id=104746 https://bugs.freedesktop.org/show_bug.cgi?id=104742 https://bugs.freedesktop.org/show_bug.cgi?id=104690 Tested-by: Clayton Craft <[email protected]> Fixes: 8e4efdc895ea ("vbo: optimize some display list drawing") Reviewed-by: Emil Velikov <[email protected]>
* vbo: whitespace/formatting fixes in vbo_split_inplace.cBrian Paul2018-01-241-104/+111
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: whitespace/formatting fixes in vbo.hBrian Paul2018-01-241-44/+68
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo/i965: move vbo_all_varyings_in_vbos() to brw_draw.cBrian Paul2018-01-243-14/+17
| | | | | | | | It's only used in brw_draw_prims(). s/GLboolean/bool/, etc. Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: remove unused vbo_any_varyings_in_vbos() functionBrian Paul2018-01-242-13/+0
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: remove unneeded #includesBrian Paul2018-01-244-5/+0
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: remove vbo_context.h and change includes to use vbo.h insteadBrian Paul2018-01-2418-79/+6
| | | | | | Now vbo.h is the public interface to the VBO module. Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: move remaining items from vbo_context.h to vbo.hBrian Paul2018-01-246-43/+34
| | | | | | | Non-VBO sources files sometimes included vbo.h while others included vbo_context.h. We're moving all public types, functions to the former. Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: move VBO-private types, prototypes, etc. into new vbo_private.h headerBrian Paul2018-01-2412-165/+227
| | | | | | | Things which should not be used outside the VBO module. More public/private clean-ups coming. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: use new _vbo_install_exec_vtxfmt() functionBrian Paul2018-01-243-2/+15
| | | | | | Instead of reaching into the vbo_context object in vtxfmt.c Reviewed-by: Roland Scheidegger <[email protected]>
* nouveau: remove vbo_context() callBrian Paul2018-01-241-2/+1
| | | | | | | _vbo_DestroyContext() can be safely called even if there's no VBO module. Removes a dependency on the vbo_context() function. Reviewed-by: Roland Scheidegger <[email protected]>
* i965: use vbo_set_[indirect]_draw_func()Brian Paul2018-01-241-3/+2
| | | | | | Instead of poking into the vbo_context object. Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: move vbo_sizeof_ib_type() into vbo_exec_array.cBrian Paul2018-01-242-23/+24
| | | | | | It's only used in this one file. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: move vbo_count_tessellated_primitives() to api_validate.cBrian Paul2018-01-243-72/+65
| | | | | | It's only used in this file and has nothing VBO-specific about it. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: update comment on gl_display_listBrian Paul2018-01-241-3/+1
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: whitespace clean-ups in mtypes.hBrian Paul2018-01-241-68/+82
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: remove unused MAT_INDEX_AMBIENT/DIFFUSE/SPECULAR contantsBrian Paul2018-01-241-4/+0
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: move DLIST_DANGLING_REFS from mtypes.h to vbo_save_api.cBrian Paul2018-01-242-9/+5
| | | | | | It's only used in this file. Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: replace assert(0) with unreachable()Brian Paul2018-01-245-11/+10
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: fix, add comment in vbo_save.hBrian Paul2018-01-241-2/+2
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: whitespace, formatting fixes in vbo_split.[ch]Brian Paul2018-01-242-60/+65
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* i965: Don't try to disable render aux buffers for computeTopi Pohjolainen2018-01-241-2/+4
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104546 Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* anv/cmd_buffer: Move gen7 index buffer state to graphics stateJason Ekstrand2018-01-232-13/+13
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move num_workgroups to compute stateJason Ekstrand2018-01-232-9/+12
| | | | | | | | While we're here, make it an anv_address. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move dynamic state to graphics stateJason Ekstrand2018-01-234-30/+33
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Use a temporary variable for dynamic stateJason Ekstrand2018-01-232-27/+24
| | | | | | | | | We were already doing this for some packets to keep the lines shorter. We may as well just do it for all of them. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move vb_dirty bits into anv_cmd_graphics_stateJason Ekstrand2018-01-234-7/+7
| | | | | | | | Vertex buffers are entirely a graphics pipeline thing. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Move dirty bits into anv_cmd_*_stateJason Ekstrand2018-01-237-60/+62
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv: Separate compute and graphics descriptor setsJason Ekstrand2018-01-234-32/+70
| | | | | | | | | | | | | | | | | | The Vulkan spec says: "pipelineBindPoint is a VkPipelineBindPoint indicating whether the descriptors will be used by graphics pipelines or compute pipelines. There is a separate set of bind points for each of graphics and compute, so binding one does not disturb the other." Up until now, we've been ignoring the pipeline bind point and had just one bind point for everything. This commit separates things out into separate bind points. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102897 Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Use anv_descriptor_for_binding for samplersJason Ekstrand2018-01-231-4/+2
| | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Add a helper for binding descriptor setsJason Ekstrand2018-01-231-28/+42
| | | | | | | | | This lets us unify some code between push descriptors and regular descriptors. It doesn't do much for us yet but it will. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Refactor ensure_push_descriptor_setJason Ekstrand2018-01-231-11/+13
| | | | | | | | | | | It's now a function which returns the push descriptor set. Since we set the error on the command buffer, returning the error is a little redundant. Returning the descriptor set (or NULL on error) is more convenient. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv: Remove semicolons from vk_error[f] definitionsJason Ekstrand2018-01-231-2/+2
| | | | | | | | | With the semicolons, they can't be used in a function argument without throwing syntax errors. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Add substructs to anv_cmd_state for graphics and computeJason Ekstrand2018-01-235-32/+74
| | | | | | | | Initially, these just contain the pipeline in a base struct. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Use some pre-existing pipeline temporariesJason Ekstrand2018-01-232-7/+5
| | | | | | | | | | There are several places where we'd already saved the pipeline off to a temporary variable but, due to an artifact of history, weren't actually using that temporary everywhere. No functional change. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Rework anv_cmd_state_resetJason Ekstrand2018-01-231-38/+22
| | | | | | | | | | | This splits anv_cmd_state_reset into separate init and finish functions. This lets us share init code with cmd_buffer_create. This potentially fixes subtle bugs where we may have missed some bit of state that needs to get initialized on command buffer creation. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_buffer: Get rid of the meta query workaroundJason Ekstrand2018-01-233-16/+0
| | | | | | | | Meta has been gone for a long time. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/cmd_state: Drop the scratch_size fieldJason Ekstrand2018-01-231-1/+0
| | | | | | | | | This is a legacy left-over from the mechanism we used to use to handle scratch. The new (and better) mechanism doesn't use this. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* anv/pipeline: Don't assert on more than 32 samplersJason Ekstrand2018-01-231-1/+7
| | | | | | | | This prevents an assert when running one unreleased Vulkan game. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]>
* radv: fix sample_mask_in loading. (v3.1)Dave Airlie2018-01-244-6/+56
| | | | | | | | | | | | | | This is ported from radeonsi and fixes: dEQP-VK.pipeline.multisample_shader_builtin.sample_mask.bit_* v2: don't call this path for radeonsi, it does it in the epilog. use the radeonsi code path. v3: handle NULL pCreateInfo->pMultisampleState properly (Samuel) v3.1: set ps_iter_samples default to 1 (Bas) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Fixes: bdcbe7c76 (radv: add sample mask input support) Signed-off-by: Dave Airlie <[email protected]>