summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gallium/radeon: add helpers for whether HTILE is enabledMarek Olšák2017-08-227-18/+27
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: don't flush L2 metadata for DB if not neededMarek Olšák2017-08-223-11/+26
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: don't flush L2 metadata for CB if not neededMarek Olšák2017-08-224-17/+38
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: don't flush TC L2 between rendering and texturing if not neededMarek Olšák2017-08-223-34/+47
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: use correct TC flush flags when invalidating CB & DBMarek Olšák2017-08-221-7/+21
| | | | | | Now we can finally stop flushing L2 data. Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface/gfx9: don't allow DCC for the smallest mipmap levelsMarek Olšák2017-08-221-1/+18
| | | | | | This fixes garbage there if we don't flush TC L2 after rendering. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: don't use GS scenario A for VS writing ViewportIndexMarek Olšák2017-08-221-7/+3
| | | | | | Vulkan doesn't do it anymore. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: clean up EOP_DATA_SEL magic numbersMarek Olšák2017-08-224-12/+16
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: set 'not a query' for r600_gfx_write_event_eop correctlyMarek Olšák2017-08-223-3/+5
| | | | | | 0 is PIPE_QUERY_OCCLUSION_COUNTER, which is not what we want. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: prevent shader-db crashesMarek Olšák2017-08-221-1/+11
| | | | | | | - don't precompile LS and ES (they don't exist on GFX9), compile as VS instead - don't precompile HS and GS (we don't have LS and ES parts) Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: properly handle imported textures with unexpected swizzle modeMarek Olšák2017-08-222-6/+8
| | | | | Cc: 17.2 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove Constant Engine supportMarek Olšák2017-08-2216-618/+38
| | | | | | | | We have come to the conclusion that it doesn't improve performance. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: add a temporary workaround for a tessellation driver bugMarek Olšák2017-08-221-1/+5
| | | | | | | | | The workaround will do for now. The root cause is still unknown. This fixes new piglit: 16in-1out Cc: 17.1 17.2 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl_to_tgsi: clean up opcode translationMarek Olšák2017-08-221-62/+30
| | | | | | An island of beauty in the middle of chaos. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: pass ctx to add_uniform_to_shader constructorTimothy Arceri2017-08-224-7/+10
| | | | | | Fixes: 4c2422067b5c ("glsl: pass UseSTD430AsDefaultPacking to where it will be used") Reviewed-by: Samuel Pitoiset <[email protected]>
* egl: deduplicate allocations of local buffer over each platform backend (v2)Gwan-gyeong Mun2017-08-225-115/+71
| | | | | | | | | | | | | | | | | | | | | | | | | platform_drm, platform_wayland and platform_android have similiar local buffer allocation routines. For deduplicating, it unifies dri2_egl_surface's local buffer allocation routines. And it polishes inconsistent indentations. Note that as dri2_wl_get_buffers_with_format() have not make a __DRI_BUFFER_BACK_LEFT attachment buffer for local_buffers, new helper function, dri2_egl_surface_free_local_buffers(), will drop the __DRI_BUFFER_BACK_LEFT check. So if other platforms use new helper functions, we have to ensure not to make __DRI_BUFFER_BACK_LEFT attachment buffer for local_buffers. v2: Fixes from Emil's review: a) Make local_buffers variable, dri2_egl_surface_alloc_local_buffer() and dri2_egl_surface_free_local_buffers() unconditionally. b) Preserve the original codeflow for error_path and normal_path. c) Add note on commit messages for dropping of __DRI_BUFFER_BACK_LEFT check. c) Rollback the unrelated whitespace changes. d) Add a missing blank line. Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* mesa: only expose EXT_memory_object functions if the ext is supportedSamuel Pitoiset2017-08-223-7/+75
| | | | | | | | | They should not be exposed when the extension is unsupported. Note that ARB_direct_state_access is always exposed and EXT_semaphore is not supported at all. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: only expose glImportMemoryFdEXT if the ext is supportedSamuel Pitoiset2017-08-221-0/+6
| | | | | | | | | | | | | | | From the EXT_external_objects_fd spec: "If the GL_EXT_memory_object_fd string is reported, the following commands are added: void ImportMemoryFdEXT(uint memory, uint64 size, enum handleType, int fd);" Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: try to re-use previously deleted bindless descriptor slotsSamuel Pitoiset2017-08-222-7/+31
| | | | | | | | Currently, when the array is full it is resized but it can grow over and over because we don't try to re-use descriptor slots. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use slot indexes for bindless handlesSamuel Pitoiset2017-08-224-229/+187
| | | | | | | | | | | | | | | Using VRAM address as bindless handles is not a good idea because we have to use LLVMIntToPTr and the LLVM CSE pass can't optimize because it has no information about the pointer. Instead, use slots indexes like the existing descriptors. Note that we use fixed 16-dword slots for both samplers and images. This doesn't really matter because no real apps use image handles. This improves performance with DOW3 by +7%. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add si_emit_global_shader_pointers() helperSamuel Pitoiset2017-08-221-26/+31
| | | | | | | To share common code between rw buffers and bindless descriptors. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: only initialize dirty_mask when CE is usedSamuel Pitoiset2017-08-221-3/+4
| | | | | | | | | Looks like it's useless to initialize that field when CE is unused. This will also allow to declare more than 64 elements for the array of bindless descriptors. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: make some si_descriptors fields 32-bitSamuel Pitoiset2017-08-221-5/+5
| | | | | | | | The number of bindless descriptors is dynamic and we definitely have to support more than 256 slots. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: declare new user SGPR indices for bindless samplers/imagesSamuel Pitoiset2017-08-223-1/+23
| | | | | | | | | A new pair of user SGPR is needed for loading the bindless descriptors from shaders. Because the descriptors are global for all stages, there is no need to add separate indices for GFX9. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: add new module that allocate "numbers"Samuel Pitoiset2017-08-223-0/+160
| | | | | | | | Will be used for allocating bindless descriptor slots for RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/gfx9: add performance countersNicolai Hähnle2017-08-221-1/+28
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract common code of si_upload_{graphics,compute}_shader_descriptorsNicolai Hähnle2017-08-221-19/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: remove unused PIPE_DUMP_* definesNicolai Hähnle2017-08-223-25/+7
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: remove dd_draw_record::driver_state_logNicolai Hähnle2017-08-222-58/+0
| | | | | | It is no longer used. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: emit string markers to log contextNicolai Hähnle2017-08-221-0/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: log decompress blitsNicolai Hähnle2017-08-221-0/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: log draw and compute state into log contextNicolai Hähnle2017-08-224-32/+51
| | | | | | Also add missing trace emits and CS logging for compute launches. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: print saved CS to the log contextNicolai Hähnle2017-08-225-88/+263
| | | | | | | | | | | | Use the auto logger facility, so that CS chunks will be interleaved with other log info. v2: - fix some crashes when not using CE - fix skipping "previous" chunks of current (unflushed) IB - fix error handling in si_begin_cs_debug Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: start using u_log_context for debuggingNicolai Hähnle2017-08-223-83/+199
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: re-order debug state dumpingNicolai Hähnle2017-08-221-7/+8
| | | | | | Keep together the parts that won't use the deferred logging mechanism. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: make si_shader_selector_reference globally visibleNicolai Hähnle2017-08-222-15/+16
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add reference count to si_computeNicolai Hähnle2017-08-222-10/+28
| | | | | | To allow keep-alive for deferred logging. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: implement pipe_context::set_log_contextNicolai Hähnle2017-08-222-0/+12
| | | | | | | | We'll add radeonsi-specific code to set_log_context in later patches, but we may want to log from common code. Hence keep the log pointer in r600_common_context. Reviewed-by: Marek Olšák <[email protected]>
* amd/common: split out ac_parse_ib_chunk from ac_parse_ibNicolai Hähnle2017-08-222-8/+32
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: add driver log to record dumpsNicolai Hähnle2017-08-223-0/+30
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add pipe_context::set_log_contextNicolai Hähnle2017-08-221-0/+14
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util/log: add auto logger facilityNicolai Hähnle2017-08-222-2/+75
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util: add chunk logging moduleNicolai Hähnle2017-08-223-0/+263
| | | | Reviewed-by: Marek Olšák <[email protected]>
* glsl/linker: Make several functions not staticIan Romanick2017-08-222-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | copy_constant_to_storage, set_uniform_initializer, populate_consumer_input_sets, and get_matching_input are all used by tests in src/compiler/glsl/tests: glsl/tests/varyings_test.o: In function `link_varyings_single_simple_input_Test::TestBody()': src/compiler/glsl/tests/varyings_test.cpp:131: undefined reference to `linker::populate_consumer_input_sets(void*, exec_list*, hash_table*, hash_table*, ir_variable**)' glsl/tests/varyings_test.o: In function `link_varyings_gl_ClipDistance_Test::TestBody()': src/compiler/glsl/tests/varyings_test.cpp:159: undefined reference to `linker::populate_consumer_input_sets(void*, exec_list*, hash_table*, hash_table*, ir_variable**)' glsl/tests/varyings_test.o: In function `link_varyings_gl_CullDistance_Test::TestBody()': src/compiler/glsl/tests/varyings_test.cpp:186: undefined reference to `linker::populate_consumer_input_sets(void*, exec_list*, hash_table*, hash_table*, ir_variable**)' glsl/tests/varyings_test.o: In function `link_varyings_single_interface_input_Test::TestBody()': src/compiler/glsl/tests/varyings_test.cpp:208: undefined reference to `linker::populate_consumer_input_sets(void*, exec_list*, hash_table*, hash_table*, ir_variable**)' glsl/tests/varyings_test.o: In function `link_varyings_one_interface_and_one_simple_input_Test::TestBody()': src/compiler/glsl/tests/varyings_test.cpp:241: undefined reference to `linker::populate_consumer_input_sets(void*, exec_list*, hash_table*, hash_table*, ir_variable**)' glsl/tests/varyings_test.o:src/compiler/glsl/tests/varyings_test.cpp:272: more undefined references to `linker::populate_consumer_input_sets(void*, exec_list*, hash_table*, hash_table*, ir_variable**)' follow glsl/tests/varyings_test.o: In function `link_varyings_interface_field_doesnt_match_noninterface_Test::TestBody()': src/compiler/glsl/tests/varyings_test.cpp:289: undefined reference to `linker::get_matching_input(void*, ir_variable const*, hash_table*, hash_table*, ir_variable**)' glsl/tests/varyings_test.o: In function `link_varyings_interface_field_doesnt_match_noninterface_vice_versa_Test::TestBody()': src/compiler/glsl/tests/varyings_test.cpp:314: undefined reference to `linker::populate_consumer_input_sets(void*, exec_list*, hash_table*, hash_table*, ir_variable**)' src/compiler/glsl/tests/varyings_test.cpp:328: undefined reference to `linker::get_matching_input(void*, ir_variable const*, hash_table*, hash_table*, ir_variable**)' Fixes: ca73c3358c91 ("glsl: Mark functions static") Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/clear: Quantize the depth clear value based on the formatJason Ekstrand2017-08-211-2/+12
| | | | | | | | | | | | | | | | | | In f9fd976e8adba733b08d we changed the clear value to be stored as an isl_color_value. This had the side-effect same clear value check is now happening directly between the f32[0] field of the isl_color_value and ctx->Depth.Clear. This isn't what we want for two reasons. One is that the comparison happens in floating point even for Z16 and Z24 formats. Worse than that, ctx->Depth.Clear is a double so, even for 32-bit float formats, we were comparing as doubles and not floats. This means that the test basically always fails for anything other than 0.0f and 1.0f. This caused a slight performance regression in Lightsmark 2008 because it was using a depth clear value of 0.999 which can't be stored in a 32-bit float so we were doing unneeded resolves. Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/101678 Cc: "17.2" <[email protected]>
* mesa/st: simplify some UBO index logicTimothy Arceri2017-08-221-3/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* i965: enable STD430 packing by default on IVB+Timothy Arceri2017-08-221-0/+16
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: pass UseSTD430AsDefaultPacking to where it will be usedTimothy Arceri2017-08-229-44/+94
| | | | | | | Here we also make use of the UseSTD430AsDefaultPacking constant and call the new get_internal_ifc_packing() helper. Reviewed-by: Marek Olšák <[email protected]>
* glsl: add get_internal_ifc_packing() type helperTimothy Arceri2017-08-221-0/+21
| | | | | | | This is used to avoid code duplication when selecting the packing type for shared and packed layouts. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add UseSTD430AsDefaultPacking constantTimothy Arceri2017-08-221-0/+9
| | | | | | | This will be used to enable the STD430 layout as the default for UBOs and SSBOs with layouts of shared/packed rather than STD140. Reviewed-by: Marek Olšák <[email protected]>