summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* clover/device: Calculate CL_DEVICE_MEM_BASE_ADDR_ALIGN in deviceAaron Watry2017-08-213-1/+9
| | | | | | | | | | | | | | | | | | | | | | The CL CTS queries CL_DEVICE_MEM_BASE_ADDR_ALIGN for a device and then allocates user pointers aligned to that value for its tests. The minimum value is defined as: the size (in bits) of the largest OpenCL built-in data type supported by the device (long16 in FULL profile, long16 or int16 in EMBEDDED profile) for devices that are not of type CL_DEVICE_TYPE_CUSTOM. At the moment, all known devices that support user pointers require CPU page alignment for buffers created from user pointers, so just query that from sysconf. v3: Use std::max instead of MAX2 (Francisco) Add missing unistd include v2: Use system page size instead of a new pipe cap Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by (v2): Jan Vesely <[email protected]>
* mesa: optimize _mesa_attr_zero_aliases_vertex()Brian Paul2017-08-213-12/+22
| | | | | | | | | | | After the context is initialized, the API and context flags won't change. So, we can compute whether vertex attribute 0 aliases vertex position just once. This should make the glVertexAttrib*() functions a little quicker. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* vbo: use new _is_vertex_position() helper in vbo_attrib_tmp.hBrian Paul2017-08-211-36/+46
| | | | | | | Makes the code a bit more understandable. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* vbo: make vbo_bind_arrays() staticBrian Paul2017-08-212-3/+1
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* svga: replace gotos with conditionals in array drawing codeBrian Paul2017-08-212-32/+32
| | | | | | No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
* llvmpipe: add some whitespace between functions in lp_texture.cBrian Paul2017-08-211-0/+3
| | | | Trivial.
* mesa: formatting clean-up in syncobj.cBrian Paul2017-08-211-10/+13
| | | | Line wrap to 78 columns, etc. Trivial.
* svga: whitespace clean-up in svga_draw_private.hBrian Paul2017-08-211-29/+27
| | | | Trivial.
* gallium/docs: remove old llvmpipe TODOTimothy Arceri2017-08-221-14/+0
| | | | | | | Features are already covered by features.txt like all the other drivers. Reviewed-by: Eric Engestrom <[email protected]>
* mesa: fix ES only draw if we have vertex positionsTimothy Arceri2017-08-221-2/+2
| | | | | | | | | | | | This code was separated from the validation code so it could use used with KHR_no_error paths. The return values were inverted to reflect the name of the helper, but here the condtion was mistakenly inverted rather than the return value. Fixes: 4df2931a87fe (mesa/vbo: move some Draw checks out of validation) Reported-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: Add prototype for udivmod64()Matt Turner2017-08-211-0/+3
| | | | Reviewed-by: Jordan Justen <[email protected]>
* glsl: Mark functions staticMatt Turner2017-08-2111-36/+36
| | | | | | Cuts 3224 bytes of .text Reviewed-by: Jordan Justen <[email protected]>
* i965: Mark functions staticMatt Turner2017-08-213-20/+21
| | | | | | Cuts 300 bytes of .text Reviewed-by: Jordan Justen <[email protected]>
* i965/vec4: Use 'class' src_reg, rather than 'struct' src_regMatt Turner2017-08-211-1/+1
| | | | Reviewed-by: Jordan Justen <[email protected]>
* i965/vec4: Return float from spill_cost_for_type()Matt Turner2017-08-211-1/+1
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv: Move clamp_int64() inside the IVB checkMatt Turner2017-08-211-1/+1
| | | | | | It's only used in the gen7_cmd_buffer_emit_scissor() function. Reviewed-by: Jordan Justen <[email protected]>