summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: whitespace fixes in varray.hBrian Paul2018-01-251-26/+29
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* mesa: include mtypes.h in varray.hBrian Paul2018-01-251-3/+1
| | | | | | | We actually use some of the types from mtypes.h so include it directly instead of relying on indirectly including it via bufferobj.h Reviewed-by: Charmaine Lee <[email protected]>
* mesa: s/gl_vertex_attrib_array/gl_array_attributes/ in commentsBrian Paul2018-01-253-3/+3
| | | | | | | The structure type was renamed some time ago, but some comments were not updated. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: simplify _mesa_delete_list() a bit, add some assertionsBrian Paul2018-01-251-28/+11
| | | | | | | | | All but two cases of the switch did the same n += InstSize[n[0].opcode] instruction. Just move it after the switch. Add some sanity check assertions. Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: expand glDrawPixels cache to handle multiple imagesBrian Paul2018-01-253-68/+153
| | | | | | | | | The newest version of WSI Fusion makes several glDrawPixels calls per frame. By caching more than one image, we get better performance when panning/zooming the map. v2: move pixel unpack param checking out of cache search loop, per Roland v3: also move unpack->BufferObj check out of loop, per Roland.
* st/mesa: add some debug code in st_choose_format()Brian Paul2018-01-251-5/+18
| | | | | | To aid in debugging gallium surface format selection issues. Reviewed-by: Roland Scheidegger <[email protected]>
* swrast: remove non-applicable GLX_SWAP_COPY_OML commentEmil Velikov2018-01-251-3/+0
| | | | | | | | Noticed while skimming for GLX_ instances in the dri codebase. Comment is completely off and was in such a state since day 1. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* automake: st/mesa/tests: add st_tests_common.h to the tarballEmil Velikov2018-01-251-1/+2
| | | | | Fixes: 6569b33b6ee ("mesa/st/tests: unify MockCodeLine* classes") Signed-off-by: Emil Velikov <[email protected]>
* automake: mesa: include vbo_private.h in the tarballEmil Velikov2018-01-251-0/+1
| | | | | | Fixes: a7cfec3be0e ("vbo: move VBO-private types, prototypes, etc. into new vbo_private.h header") Signed-off-by: Emil Velikov <[email protected]>
* automake: small cleanup after the meson.build inclusionEmil Velikov2018-01-251-2/+2
| | | | | | | | | Namely extend the EXTRA_DIST list, instead of re-assigning it and bring back a file dropped by mistake. Fixes: 436ed65d38d ("autotools: include meson build files in tarball") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* mesa: add missing RGB9_E5 format in _mesa_base_fbo_formatJuan A. Suarez Romero2018-01-251-0/+3
| | | | | | This fixes KHR-GL45.internalformat.renderbuffer.rgb9_e5. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Stop disabling aux during texture preparationJason Ekstrand2018-01-243-12/+8
| | | | | | | | | | | | | | | | | Previously, we were handling self-dependencies by marking the render buffer and then passing disable_aux=true to prepare_texture so that it would do a resolve. This works but ends us up doing to much resolving in some cases. Specifically, if we're doing something such as mipmap generation, this would cause us to resolve all levels of the texture if even one of them is overlapping. Instead, this commit makes us wait until we process the framebuffer to do these resolves and we only resolve the slices needed for rendering. Doing this resolve puts them into the pass-through state so, even if we do texture using CCS_E, the CCS data will effectively be ignored and the real surface contents read. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/draw: Set NEW_AUX_STATE when draw aux changesJason Ekstrand2018-01-241-1/+4
| | | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104411 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104383 Fixes: ea0d2e98ecb369ab84e78c84709c0930ea8c293a Cc: [email protected] Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Replace draw_aux_buffer_disabled with draw_aux_usageJason Ekstrand2018-01-244-35/+27
| | | | | | | | | | | Instead of keeping an array of booleans, we now hang onto an array of isl_aux_usage enums. This means that the thing we are passing from brw_draw.c to surface state setup is the thing that surface state setup actually needs instead of an input to compute what it needs. Cc: [email protected] Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/surface_state: Drop brw_aux_surface_disabledJason Ekstrand2018-01-241-20/+0
| | | | | | | | | | | | | The only purpose of this function is to disable aux on texture surfaces when the corresponding renderbuffer has aux disabled. However, the act of disabling aux on the renderbuffer will cause it to be resolved and intel_miptree_texture_aux_usage will already check the resolved status of a texture and return ISL_AUX_USAGE_NONE for it. Even if we used CCS for it, that wouldn't really be a problem because the CCS will be in the pass-through state and so it would effectively be ignored. Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]>
* i965/miptree: Add an aux_disabled parameter to render_aux_usageJason Ekstrand2018-01-245-8/+17
| | | | | | | | | | | | | | | | | | | | Only one of the callers of intel_miptree_render_aux_usage actually took brw->draw_aux_buffer_disabled into account. This was causing us to ignore draw_aux_buffer_disabled for the intel_miptree_prepare_render. This isn't a problem because the draw_aux_buffer_disabled entry was set during texture preparation and we already did the resolve at that time. However, this also meant that the aux_usage we were passing to brw_cache_flush_for_render and brw_render_cache_add_bo was wrong so our automatic cache flushing around aux_usage changes wasn't happening. This was causing GPU hangs in Oxenfree. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104711 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104411 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104383 Fixes: ea0d2e98ecb369ab84e78c84709c0930ea8c293a Cc: [email protected] Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/miptree: Take an aux_usage in prepare/finish_renderJason Ekstrand2018-01-244-16/+8
| | | | | | | | | | Both callers of intel_miptree_prepare/finish_render have to call intel_miptree_render_aux_usage anyway for other reasons. They may as well pass the result in instead of us calling it again. Cc: [email protected] Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/glsl_to_nir: remove reallocation of sampler/image locationTimothy Arceri2018-01-251-8/+0
| | | | | | | | | | As far as I can tell this always just reassigns the same value. Also as we don't curretly store UniformHash in the shader cache removing this will help with adding a shader cache to gallium nir drivers. Reviewed-by: Rob Clark <[email protected]>
* meson: fix missing dependenciesGreg V2018-01-241-1/+1
| | | | | | Fixes: 66f97f6640f5 ("meson: build radeonsi") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* 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]>