summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* egl/android: Make get_fourcc() accept HAL formatsTomasz Figa2016-08-081-9/+11
| | | | | | | | | | | | | There are DRI_IMAGE_FOURCC macros, for which there are no corresponding DRI_IMAGE_FORMAT macros. To support such formats we need to make the lookup function take the native format directly. As a side effect, it simplifies all existing calls to this function, because they all called get_format() first to convert from native to DRI_IMAGE_FORMAT. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: I4674000fb5ccfd02e38b8fa89bc567ac1d4fc16b
* egl/android: Refactor image creation to separate flink and prime paths (v2)Tomasz Figa2016-08-081-42/+57
| | | | | | | | | | | | | | | | This patch splits current dri2_create_image_android_native_buffer() into main entry point and two additional functions, one for creating an image from flink name and one for handling prime FDs using the generic DMA-buf path. This makes the code cleaner and also prepares for disabling flink path more easily in the future. v2: Split into separate patch. Add error messages. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: Ifdfb5927399d56992fe707160423c29278f49172
* egl/android: Respect buffer mask in droid_image_get_buffers (v2)Tomasz Figa2016-08-081-5/+15
| | | | | | | | | | | | | | Drivers can request different set of buffers depending on the buffer mask they pass to the get_buffers callback. This patch makes droid_image_get_buffers() respect this mask. v2: Return error only in case of real error condition and ignore requests of unavailable buffers. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: I6c3c4eca90f4c618579f6725dec323c004cb44ba
* egl/android: Remove unused variables in droid_get_buffers_with_format()Tomasz Figa2016-08-081-3/+0
| | | | | | | | | | Fix compilation warnings due to unused variables left after some earlier code changes. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: Iec09eb2a62887f3a38dff156756ed8385f3f3447
* anv/pipeline/gen7: Set the depth format in 3DSTATE_SFJason Ekstrand2016-08-083-2/+25
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* isl: Add a helper for getting a depth format from an isl_formatJason Ekstrand2016-08-082-0/+26
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Unify 3DSTATE_RASTER and 3DSTATE_SF setup between gen7 and gen8Jason Ekstrand2016-08-083-91/+62
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Set 3DSTATE_SF::StatisticsEnableJason Ekstrand2016-08-081-0/+1
| | | | | | | | | We've been setting it in gen7 forever but never in gen8; best to make it consistent. This hasn't caused any problems yet because we don't advertise support for statistics queries yet. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Unconditionally set DXMultisampleRasterizaitonEnableJason Ekstrand2016-08-081-9/+2
| | | | | | | | | | | | | | | | | | The multisample rasterization mode is computed based on this field, 3DSTATE_RASTER::DXMultisampleRasterizationMode (only for forced multisampling), 3DSTATE_RASTER::APIMode, and the number of samples. There are two tables in the SKL PRM that describe how the final multisample mode is calculated: "Windower (WM) Stage >> Multisampling >> Multisample ModeState >> Table 1" and the formula for "SF_INT::Multisample Rasterization Mode". The "DX Multisample Rasterization Enable" bit changes whether multisample mode is set to OFF_PIXEL or ON_PATTERN in the samples > 1 case. In the samples == 1 case, the bit has no effect. Since Vulkan has no concept of disabling multisampling for samples > 1, we can just set the bit. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Use fewer designated initializers in emit_rs_stateJason Ekstrand2016-08-081-26/+27
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Make 3DSTATE_SF more consistent between gen7 and gen8+Jason Ekstrand2016-08-083-6/+12
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline/gen8: Remove an old commentJason Ekstrand2016-08-081-2/+0
| | | | | | | This is now handled in emit_3dstate_clip Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Skip ES 3.0/3.1 transform feedback primitive counting error.Kenneth Graunke2016-08-081-1/+17
| | | | | | | | | | | | | This error condition is not implementable when using tessellation or geometry shaders. The text was also removed from the ES 3.2 spec. I believe the intended behavior is to remove the error condition when either OES_geometry_shader or OES_tessellation_shader are exposed. v2: Quote a better part of issue 13 (suggested by Ian). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Share code between _mesa_validate_DrawArrays[_Instanced].Kenneth Graunke2016-08-081-64/+25
| | | | | | | | Mostly, I want to share the GLES 3 transform feedback handling, though most of the rest of the code is identical as well. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Implicitly enable OES_shader_io_blocks if geom/tess are enabled.Kenneth Graunke2016-08-081-0/+11
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Expose gl_PointSize if OES/EXT_tessellation_point_size is enabled.Kenneth Graunke2016-08-081-1/+5
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add extension plumbing for OES/EXT_tessellation_shader.Kenneth Graunke2016-08-084-3/+19
| | | | | | | | This adds the #extension directive support, built-in #defines, lexer keyword support, and updates has_tessellation_shader(). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Move tessellation shader gets to GL_CORE, GLES31 section.Kenneth Graunke2016-08-081-33/+36
| | | | | | | This makes them available in the GLES 3.1 API. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add {OES,EXT}_tessellation_shader to the extensions table.Kenneth Graunke2016-08-082-2/+9
| | | | | | | | | | | | Also update _mesa_has_tessellation to know about the new extensions. For now, these are dummy_false, to avoid turning on the extension until everything's in place. Eventually, we'll move them over to the "ARB_tessellation_shader" bit so that any drivers supporting both the desktop extension and ES 3.1 get the feature. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi: Add PatchParameteriOES and PatchParameteriEXT.Kenneth Graunke2016-08-082-0/+13
| | | | | | | | | The OES_tessellation_shader and EXT_tessellation_shader specifications have suffixed names. These are identical to the core function, so just alias them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeonsi: add has_draw_indirect_multi flagNicolai Hähnle2016-08-083-1/+14
| | | | | | | | | | Prefer to use DRAW_(INDEX)_INDIRECT_MULTI when available in the firmware. Versions for SI and CI already added as provided by the firmware team, but keep in mind that they won't currently be used since the radeon kernel module has no interface to query the firmware version. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: transpose indirect/index draw dispatchNicolai Hähnle2016-08-081-45/+31
| | | | | | This allows better code sharing for indirect draw calls. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move index buffer calculations in si_emit_draw_packets upNicolai Hähnle2016-08-081-9/+12
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: unify emitting PKT3_SET_BASE for indirect drawsNicolai Hähnle2016-08-081-16/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: query ME/PFP/CE firmware versionsNicolai Hähnle2016-08-083-0/+28
| | | | | | | The radeon kernel module doesn't have the firmware query interface, so the corresponding values will remain 0. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move spi_ps_input_addr override outside of the loopNicolai Hähnle2016-08-081-3/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: drop unnecessary u_pstipple.h includeNicolai Hähnle2016-08-081-1/+0
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: do not pass the return type to buffer_load_constNicolai Hähnle2016-08-081-18/+18
| | | | | | | Overriding it is not allowed anyway, and actually lead to a crash when polygon stippling was used with monolithic shaders. Reviewed-by: Marek Olšák <[email protected]>
* glsl: Combine GS and TES array resizing visitors.Kenneth Graunke2016-08-071-72/+35
| | | | | | | | These are largely identical, except that the GS version has a few extra error conditions. We can just pass in the stage and skip these. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Fix location bias for patch variables.Kenneth Graunke2016-08-071-0/+3
| | | | | | | | | | | | We need to subtract VARYING_SLOT_PATCH0, not VARYING_SLOT_VAR0. Since "patch" only applies to inputs and outputs, we can just handle this once outside the switch statement, rather than replicating the check twice and complicating the earlier conditions. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Fix the program resource names of gl_TessLevelOuter/Inner[].Kenneth Graunke2016-08-071-0/+12
| | | | | | | | | These are lowered to gl_TessLevel{Outer,Inner}MESA. We need them to appear in the program resource list with their original names and types. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Delete bogus ir_set_program_inouts assert.Kenneth Graunke2016-08-071-3/+7
| | | | | | | | | | | | | | | | This assertion is bogus. Varying structs, and arrays of structs, are allowed by GLSL, and we can see them here. While we currently don't have any partial-variable support for those, simply returning false and marking the entire thing as used is certainly legitimate. I believe this is often swept under the rug by varying packing, but that's disabled in certain tessellation situations. Hit by 20 dEQP-GLES31.functional.tessellation.user_defined_io.* tests. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Simplify interface qualifier parsing.Kenneth Graunke2016-08-071-34/+7
| | | | | | | | This better matches the grammar in section 4.3.9 of the GLSL 4.5 spec, and also removes some redundant code. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Add a has_tessellation_shader() helper.Kenneth Graunke2016-08-073-18/+12
| | | | | | | | Similar to has_geometry_shader(), has_compute_shader(), and so on. This will make it easier to add more conditions here later. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* Revert "gallium/radeon: count contexts"Marek Olšák2016-08-062-4/+0
| | | | | | This reverts commit b403eb338533894ee012a96bf55653996c92ec7c. Not needed.
* radeonsi: add GLSL lit testsMarek Olšák2016-08-0619-0/+490
| | | | | | | | | | | | They can only be run manually as described in HOW_TO_RUN. It should help catch suboptimal code generation. Some of the tests already fail. v2: rename the tests to *.glsl, fix lit.cfg to find FileCheck Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* radeonsi: add a standalone compiler amdgcn_glslcMarek Olšák2016-08-063-0/+323
| | | | | | | | | This will be used by GLSL lit tests. For developers only. It shouldn't be distributable and it doesn't use the Mesa build system. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add environment variable SI_FORCE_FAMILYMarek Olšák2016-08-061-0/+32
| | | | | | | | This will be used by: amdgcn_glslc -mcpu=[family] It can also be used for shader-db if you want stats for a different family. Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/radeon: implement cs_get_next_fenceMarek Olšák2016-08-062-2/+29
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: implement cs_get_next_fenceMarek Olšák2016-08-062-4/+35
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add cs_get_next_fence winsys callbackMarek Olšák2016-08-061-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: count contextsMarek Olšák2016-08-062-0/+4
| | | | | | We don't wanna use unflushed fences when we have multiple contexts. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: count gfx IB flushesMarek Olšák2016-08-063-1/+3
| | | | | | | This will be used as a counter for whether fence_finish needs to flush the IB. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: move radeon_winsys::cs_memory_below_limit to driversMarek Olšák2016-08-067-52/+32
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: inline radeon_winsys::query_memory_usageMarek Olšák2016-08-064-15/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon/winsyses: expose per-IB used_vram and used_gart to driversMarek Olšák2016-08-065-25/+24
| | | | | | The following patches will use this. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon/winsyses: print CS submission error numberMarek Olšák2016-08-062-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: flush if constant, shader, and streamout buffers use too much memoryMarek Olšák2016-08-061-15/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: flush if sampler views and images use too much memoryMarek Olšák2016-08-062-19/+63
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: deal with high vertex buffer memory usage correctlyMarek Olšák2016-08-063-3/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>