summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: make use of ac_get_spi_shader_z_format()Samuel Pitoiset2017-12-143-23/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: add ac_get_spi_shader_z_format()Samuel Pitoiset2017-12-144-1/+84
| | | | | | | | ac_shader_util.c will contain shader helpers for RadeonSI and RADV. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not load the local invocation index when it's unusedSamuel Pitoiset2017-12-144-2/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not load unused gl_LocalInvocationID/gl_WorkGroupID componentsSamuel Pitoiset2017-12-141-3/+8
| | | | | | | | We should also not load the input SGPRs and VGPRS, but let's start with this for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: scan which components of gl_LocalInvocationID are usedSamuel Pitoiset2017-12-142-1/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: scan which components of gl_WorkGroupID are usedSamuel Pitoiset2017-12-142-0/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: set FORCE_SIMD_DIST(1) for compute when profitableSamuel Pitoiset2017-12-141-0/+14
| | | | | | | Ported from RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: calculate best compute resource limitsSamuel Pitoiset2017-12-141-1/+14
| | | | | | | Ported from RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: store the dispatch initiator into the deviceSamuel Pitoiset2017-12-143-11/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: replace grid_components_used by uses_grid_sizeSamuel Pitoiset2017-12-143-5/+6
| | | | | | | | Use a boolean instead because the number of needed SGPRs is always 3. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: always emit all compute block componentsSamuel Pitoiset2017-12-142-13/+11
| | | | | | | | | The number of grid components is always 3 when gl_NumWorkGroups is declared, because it relies on the number of components of nir_instrinsic_load_num_work_groups. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* egl/android: Provide an option for the backend to expose KHR_imageHarish Krupo2017-12-143-1/+4
| | | | | | | | | | | | | | | | | From android cts 8.0_r4, a new test case checks if all the required egl extensions are exposed. In the current implementation we expose KHR_image if KHR_image_base and KHR_image_pixmap are supported but KHR_image spec does not mandate the existence of both the extensions. This patch preserves the current check and also provides the backend with an option to expose the KHR_image extension. Test: run cts -m CtsOpenGLTestCases -t \ android.opengl.cts.OpenGlEsVersionTest#testRequiredEglExtensions Signed-off-by: Harish Krupo <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: Don't advertise VK_EXT_debug_report.Bas Nieuwenhuizen2017-12-141-1/+0
| | | | | | | We never supported it. Missed during copy and pasting. Fixes: 17201a2eb0b "radv: port to using updated anv entrypoint/extension generator." Reviewed-by: Samuel Pitoiset <[email protected]>
* i965: Don't allocate an MCS for 16x MSAA and width > 8192.Kenneth Graunke2017-12-141-0/+4
| | | | | | | | | | | | The hardware doesn't support this, and isl_surf_get_mcs_surf will fail. I feel a bit bad replicating this logic, but we want to decide up front. This fixes the following test when run with --deqp-surface-width=16384: - GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_error_blitframebuffer_multisampled_framebuffers_different_sample_count Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* Android: fix missing generation of vtn_gather_types.cRob Herring2017-12-131-0/+5
| | | | | | | | | | Commit bb1e6ff161c9 ("spirv: Add a prepass to set types on vtn_values") added generation of vtn_gather_types.c, but forgot to add it to the Android build files. Fixes: bb1e6ff161c9 ("spirv: Add a prepass to set types on vtn_values") Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* mesa: Add glSpecializeShaderARB to common_desktop_functionsDylan Baker2017-12-131-0/+3
| | | | | | | | | CC: Nicolai Hähnle <[email protected]> CC: Mark Janes <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104231 Fixes: 46b21b8f906 ("mesa: add GL_ARB_gl_spirv boilerplate") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* egl/android: Partially handle HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINEDTomasz Figa2017-12-131-2/+39
| | | | | | | | | | | | | | There is no API available to properly query the IMPLEMENTATION_DEFINED format. As a workaround we rely here on gralloc allocating either an arbitrary YCbCr 4:2:0 or RGBX_8888, with the latter being recognized by lock_ycbcr failing. Reviewed-on: https://chromium-review.googlesource.com/566793 Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Robert Foss <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* swr: Correct texture allocation and limit max size to 2GBBruce Cherniak2017-12-132-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes piglit tex3d-maxsize by correcting 4 things: The total_size calculation was using 32-bit math, therefore a >4GB allocation request overflowed and was not returning false (unsupported). Changed AlignedMalloc arguments from "unsigned int" to size_t, to handle >4GB allocations. Added error checking on texture allocations to fail gracefully. Finally, temporarily decreased supported max texture size from 4GB to 2GB. The gallivm texture-sampler needs some additional work to correctly handle larger than 2GB textures (offsets to LLVMBuildGEP are signed). I'm working on a follow-on patch to allow up to 4GB textures, as this is useful in HPC visualization applications. Fixes piglit tex3d-maxsize. v2: Updated patch description to clarify ">4GB". Reviewed-By: George Kyriazis <[email protected]>
* swr: Fix KNOB_MAX_WORKER_THREADS thread creation override.Bruce Cherniak2017-12-131-2/+1
| | | | | | | | | | | | | Environment variable KNOB_MAX_WORKER_THREADS allows the user to override default thread creation and thread binding. Previous commit to adjust linux cpu topology caused setting this KNOB to bind all threads to a single core. This patch restores correct functionality of override. Cc: <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* meson: fix glx-test raceDylan Baker2017-12-131-1/+1
| | | | | | | This test should rely on dispatch.h being generated, but it doesn't. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium/docs: document behavior of set_sample_mask()Brian Paul2017-12-131-1/+4
| | | | | | | | The sample mask is used even if msaa is not explicity enabled when we have a framebuffer with multisampled surfaces. That's DX behavior and what the Radeon drivers do. Not sure about other drivers at this point. Reviewed-by: Roland Scheidegger <[email protected]>
* glsl: trivial whitespace fixes in link_varyings.cppBrian Paul2017-12-131-2/+2
|
* program: Don't reset SamplersValidated when restoring from shader cacheJordan Justen2017-12-131-7/+9
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103988 Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove second include of errors.h in src/mesa/main/glspirv.cKai Wasserbäch2017-12-121-4/+0
| | | | | | Fixes: 5bc03d2508 ("mesa: implement SPIR-V loading in glShaderBinary") Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeonsi: create get_tcs_tes_buffer_address helperTimothy Arceri2017-12-131-12/+32
| | | | | | This will be shared between the NIR and TGSI backends. Reviewed-by: Nicolai Hähnle <[email protected]>
* ac: fix nir_op_f2f64Timothy Arceri2017-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | Without this we get the error "FPExt only operates on FP" when converting the following: vec1 32 ssa_5 = b2f ssa_4 vec1 64 ssa_6 = f2f64 ssa_5 Which results in: %44 = and i32 %43, 1065353216 %45 = fpext i32 %44 to double With this patch we now get: %44 = and i32 %43, 1065353216 %45 = bitcast i32 %44 to float %46 = fpext float %45 to double Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir: fix shift for uint64_tTimothy Arceri2017-12-131-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: skip forced array splitting for tcsTimothy Arceri2017-12-131-1/+2
| | | | | | | | | nir_lower_io_to_temporaries() does not support tcs so we cannot assume there are no indirects here. Also the radeonsi backend (the only backend to support tess) has support for tcs indirects so there is no need to lower them anyway. Reviewed-by: Nicolai Hähnle <[email protected]>
* intel/fs/bank_conflicts: Don't touch Gen7 MRF hack registers.Francisco Jerez2017-12-123-7/+19
| | | | | | | Fixes: af2c320190f3c731 "intel/fs: Implement GRF bank conflict mitigation pass." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104199 Reported-by: Darius Spitznagel <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: compute scratch space size correctly for Gen9+Kevin Rogovin2017-12-121-1/+5
| | | | | | | | Fixes: 8ecdbb61360 "i965: Pretend there are 4 subslices for compute shader threads on Gen9+." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104005 Signed-off-by: Kevin Rogovin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Eero Tamminen <[email protected]>
* i965: Program MEDIA_VFE_STATE in a more readable fashion.Kevin Rogovin2017-12-121-6/+13
| | | | | | | | This patch is purely for readability improvements when programming the MEDIA_VFE_STATE. Signed-off-by: Kevin Rogovin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* cso: add point rasterization sanity check assertionBrian Paul2017-12-121-0/+5
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/u_blitter: replace tabs with spacesBrian Paul2017-12-121-18/+18
| | | | Reviewed-by: Marek Olšák <[email protected]>
* xlib: call _mesa_warning() instead of fprintf()Brian Paul2017-12-121-1/+2
| | | | | | | | We use _mesa_warning() everywhere else in this code. Change requested by Rick Irons of Mathworks. CC: <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium/util: don't pass a pipe_resource to util_resource_is_array_texture()Brian Paul2017-12-122-4/+4
| | | | | | | | | No need to pass a pipe_resource when we can just pass the target. This makes the function potentially more usable. Rename it too. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/aux: include nr_samples in util_resource_size() computationBrian Paul2017-12-121-1/+2
| | | | | | | | | | | | | This function is only used in two places: 1. VMware driver, but only for HUD reporting 2. st/nine state tracker, used for texture memory accounting Fixes: a69efa9482d ("util: add new util_resource_size() function in u_resource.[ch]") Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* svga: trivial whitespace/formatting fixes in svga_pipe_rasterizer.cBrian Paul2017-12-121-9/+5
|
* st/mesa: trivial whitespace/formatting fixes in st_atom_rasterizer.cBrian Paul2017-12-121-20/+22
|
* spirv: Handle image and sampler function parametersJason Ekstrand2017-12-121-0/+73
|
* spirv/cfg: Refactor the function parameter loop a bitJason Ekstrand2017-12-121-5/+9
|
* spirv/cfg: Be a bit more precise about function parametersJason Ekstrand2017-12-121-3/+2
| | | | | | Pointers with no storage type are converted to inout variables but SSA values and pointers with a storage type (which turns into a uint or uvec2) are just input variables.
* spirv: Make sampled images a real typeJason Ekstrand2017-12-122-1/+11
| | | | | | | Previously, we just gave them exactly the same type as the respective image (which already had a sampler2D or similar type). Now they have their own base type and a pointer to the vtn_type for the image. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* i915: add missing 0 definesEric Engestrom2017-12-121-0/+2
| | | | | | | | | | | Thanks to Emil's -Wundef, t_dd_dmatmp.h now complains that intel_render.c is missing a couple `#define`s. Assigning them to 0 keeps the existing behaviour; I'll let someone else turn them on if this is the behaviour that was intended. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: refuse to compile SPIR-V shaders or link mixed shadersNicolai Hähnle2017-12-122-1/+28
| | | | | | | | | | | | Note that gl_shader::CompileStatus will also indicate whether a shader has been successfully specialized. v2: Use the 'spirv_data' member of gl_shader to know if it is a SPIR-V shader, instead of a dedicated flag. (Timothy Arceri) v3: Use bool instead of GLboolean. (Ian Romanick) Reviewed-by: Ian Romanick <[email protected]>
* mesa/shaderapi: add a getter for GL_SPIR_V_BINARY_ARBNicolai Hähnle2017-12-121-0/+3
| | | | | | | v2: Use the 'spirv_data' member of gl_shader instead of a dedicated flag. (Timothy Arceri) Reviewed-by: Ian Romanick <[email protected]>
* mesa: implement SPIR-V loading in glShaderBinaryNicolai Hähnle2017-12-125-3/+97
| | | | | | | | | | | | | | | | | | v2: * Add a gl_shader_spirv_data member to gl_shader, which already encapsulates a gl_spirv_module where the binary will be saved. (Eduardo Lima) * Just use the 'spirv_data' member to know whether a gl_shader has the SPIR_V_BINARY_ARB state. (Timothy Arceri) * Remove redundant argument checks. Move extension presence check to API entry point where the rest of checks are. Retype 'n' and 'length'arguments to use the correct and more standard types. (Ian Romanick) * Fix some nitpicks. (Ian Romanick) Reviewed-by: Ian Romanick <[email protected]>
* mesa/glspirv: Add struct gl_shader_spirv_dataEduardo Lima Mitev2017-12-122-0/+42
| | | | | | | | | | | | | | | | | This is a per-shader structure holding the SPIR-V data associated with the shader (binary module, specialization constants and entry-point). This is needed because both gl_shader and gl_linked_shader need to share this data. Instead of copying the data, we pass a reference to it upon program linking. That's why it is reference-counted. This struct is created and associated with the shader upon calling glShaderBinary(), then subsequently filled up by the call to glSpecializeShaderARB(). v2: Readability improvements (Ian Romanick) Reviewed-by: Ian Romanick <[email protected]>
* mesa/glspirv: Add struct gl_spirv_moduleNicolai Hähnle2017-12-122-0/+33
| | | | | | | | | v2: * Make the SPIR-V module struct part of a larger gl_shader_spirv_data struct that will be introduced later, and don't reference it directly in gl_shader. (Eduardo Lima) * Readability improvements (Ian Romanick) Reviewed-by: Ian Romanick <[email protected]>
* mesa: add GL_ARB_gl_spirv boilerplateNicolai Hähnle2017-12-1213-0/+138
| | | | | | | | | | | | v2: * Add meson build bits (Eric Engestrom) * Return INVALID_OPERATION error on SpecializeShaderARB (Ian Romanick) v3: Include boilerplate for the GL 4.6 alias of glSpecializeShaderARB (Neil Roberts) Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* spirv: Add support for all bit sizes in OpSwitchJason Ekstrand2017-12-111-8/+26
| | | | | Reviewed-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101560