summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir/linker: Add the start of a pure-NIR linker for XFBNeil Roberts2018-07-314-0/+321
| | | | | | | | | | | | | | | | | | | | v2: ignore names on purpose, for consistency with other places where we are doing the same (Alejandro) v3: changes proposed by Timothy Arceri, implemented by Alejandro Piñeiro: * Remove redundant 'struct active_xfb_varying' * Update several comments, including spec quotes if needed * Rename struct 'active_xfb_varying_array' to 'active_xfb_varyings' * Rename variable 'array' to 'active_varyings' * Replace one if condition for an assert (<MAX_FEEDBACK_BUFFERS) * Remove BufferMode initialization (was already done) v4: simplify output pointer handling (Timothy) Signed-off-by: Neil Roberts <[email protected]> Signed-off-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* nir/types: Add a wrapper to access gl_typeNeil Roberts2018-07-312-0/+8
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* arb_gl_spirv: add calls to several nir loweringsAlejandro Piñeiro2018-07-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | For now we are just adding nir lowerings that are needed/mandatory to get things working. After everything is settled, we would start to add good-to-have lowerings. This patch adds the following calls: * nir_split_var_copits and nir_split_per_member_structs: as vulkan drivers are doing now. See commit b0c643d8f579a3e1e45a08f6d9de099f2c45898b ("spirv: Use NIR per-member splitting") for more info. Without this commit, piglit tests like this crashes: spec/arb_gl_spirv/execution/varying/block And in general most of the shaders that includes any kind of struct. * nir_copy_prop: after nir_deref_instr introduction, function calls need this. See commit "nir,spirv: Rework function calls" (c11833ab24dcba26de1b0a5805e35a5d6761514e) for more info. Reviewed-by: Timothy Arceri <[email protected]>
* compiler/spirv: add XFB and GeometryStreams capability check supportAlejandro Piñeiro2018-07-312-2/+10
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* nir/gather_info: Set info.gs.uses_streamsNeil Roberts2018-07-311-0/+5
| | | | | | | | | | | Whenever a non-zero stream is written to it now sets uses_streams to true. This reflects the code in validate_geometry_shader_emissions for GLSL. v2: set uses_streams at gather_info instead that at spirv to nir (Jason Ekstrand) Reviewed-by: Jason Ekstrand <[email protected]>
* spirv/nir: Fix the stream ID when emitting a primitive or vertexNeil Roberts2018-07-311-2/+5
| | | | | | | | | It looks like it was previously taking the SPIR-V instruction number directly instead of looking up the constant value. v2: use vtn_constant_value helper (Jason) Reviewed-by: Jason Ekstrand <[email protected]>
* spirv: Handle the SpvDecorationStream decorationNeil Roberts2018-07-312-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | From SPIR-V 1.0 spec, section 3.20, "Decoration": "Stream Apply to an object or a member of a structure type. Indicates the stream number to put an output on." Note the "or", so that means that it is allowed for both a full struct or a membef or a struct (although the wording is not really ideal, and somewhat error-prone, imho). We found this with some Geometry Streams tests for ARB_gl_spirv, where the full gl_PerVertex is assigned Stream 0 (default value on OpenGL for gl_PerVertex). So this commit allows structs to have this Decoration, and sets the stream at the nir variable if needed. Signed-off-by: Neil Roberts <[email protected]> Signed-off-by: Alejandro Piñeiro <[email protected]> v2: squash two Decoration Stream patches (Jason) Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glspirv: Set last_vert_progNeil Roberts2018-07-311-0/+7
| | | | | | v2: simplify last_vert check (Timothy) Reviewed-by: Timothy Arceri <[email protected]>
* spirv: Handle XFB variable decorationsNeil Roberts2018-07-311-3/+9
| | | | | | | | | These set the new explicit XFB members on nir_variable. This is needed to support ARB_gl_spirv, as Vulkan doesn't support transform feedback. Reviewed-by: Timothy Arceri <[email protected]>
* spirv: Handle SpvExecutionModeXfbNeil Roberts2018-07-311-1/+1
| | | | | | This just sets has_transform_feedback_varyings on the shader. Reviewed-by: Timothy Arceri <[email protected]>
* nir: Add members for the explicit XFB properties to nir_variableNeil Roberts2018-07-312-1/+30
| | | | | | | | These are copied from the from the corresponding values in ir_variable. The intention is to eventually use them in a pure-NIR linker. Reviewed-by: Timothy Arceri <[email protected]>
* etnaviv: fix typo in query namesChristian Gmeiner2018-07-311-2/+2
| | | | | | | Fixes: d0bed0b4944d ("etnaviv: support HI performance counters") Cc: [email protected] Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Chris Healy <[email protected]>
* mesa: fix a typo (trivial)Tapani Pälli2018-07-311-1/+1
| | | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add glRenderbufferStorage support for EXT_texture_norm16 formatsTapani Pälli2018-07-311-3/+7
| | | | | | | | | These bits were missing, found when extending the Piglit test. Fixes: 7f467d4f73 "mesa: GL_EXT_texture_norm16 extension plumbing" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* egl/surfaceless: Allow DRMless fallback.David Riley2018-07-301-0/+19
| | | | | | | | | | Allow platform_surfaceless to use swrast even if DRM is not available. To be used to allow a fuzzer for virgl to be run on a jailed VM without hardware GL or DRM support. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]> Signed-off-by: David Riley <[email protected]>
* egl/surfaceless: Define DRI_SWRastLoader extension when using swrast.David Riley2018-07-301-4/+21
| | | | | | | Signed-off-by: David Riley <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> [chadv: Dropped spurious hunk] Reviewed-by: Chad Versace <[email protected]>
* v3d: Dump the contents off all the buffers in CLIF mode.Eric Anholt2018-07-302-25/+207
| | | | | | A V3D_DEBUG=clif file from a non-texturing .shader_test can now be successfully run through the CLIF runner in the simulator. Now I need to build an open source CLIF runner against the v3d DRM module.
* v3d: Split walking the CLs to generate relocs from walking CLs to dump.Eric Anholt2018-07-303-37/+49
| | | | | | We need to dump each buffer's contents in order for a CLIF file, so we need to collect all of the relocs into a buffer (such as the indirect CL full of both uniforms and GL shader states) before we start dumping.
* v3d: Include commands to run the BCL and RCL in CLIF dumps.Eric Anholt2018-07-304-16/+47
|
* v3d: Use a short, underscored name for packets in CLIF/CL dumping.Eric Anholt2018-07-303-45/+72
| | | | | | | These will match the names that the CLIF parser expects to see. I may in the future decide to change more of the other names so that I match the names the HW/closed SW team uses for their packets, rather than the names in the spec (which only they and I can read anyway).
* v3d: Rename "configuration" and "config" in the XML to "cfg"Eric Anholt2018-07-305-51/+54
| | | | | | This matches what CLIF parsing expects, and makes TILE_BINNING_MODE_CONFIGURATION_COMMON_CONFIGURATION into a much more legible TILE_BINNING_MODE_CFG_COMMON.
* v3d: s/colour/color in the XML.Eric Anholt2018-07-304-39/+39
| | | | | | The CLIF format expects american english spelling, and the rest of Mesa is too. I was previously adhering to the spec's spelling, which is counterproductive.
* v3d: Rename primitives to prims in the XML to match CLIF names.Eric Anholt2018-07-303-12/+12
| | | | This makes us match up with the V3D HW team's names a bit more.
* v3d: Print CLIF fixed-point values as just their decimal value.Eric Anholt2018-07-301-6/+16
| | | | The parser doesn't handle float input, so we have to dump the raw value.
* v3d: When not doing terminal pretty-printing, comment struct field names.Eric Anholt2018-07-301-1/+7
| | | | | The struct field names aren't part of the CLIF ABI, just the order of fields within the struct. The comments are there for human readability.
* v3d: Add a separate flag for CLIF ABI output versus human-readable CLs.Eric Anholt2018-07-307-5/+15
| | | | | | A few of the upcoming changes would make the V3D_DEBUG=cl output less readable, so let's make proper CLIF file production be under a separate V3D_DEBUG=clif flag.
* v3d: Add pack header support for f187 values.Eric Anholt2018-07-307-22/+34
| | | | | | V3D only has one of these (the top 16 bits of a float32) left in its CLs, but VC4 had many more. This gets us proper pretty-printing of the values instead of a large uint.
* v3d: Move depth offset packet setup to CSO creation time.Eric Anholt2018-07-304-33/+34
| | | | | This should be some simpler memcpying at draw time, and makes the next change easier.
* r600: reduce num compute threads to 1024.Dave Airlie2018-07-311-1/+1
| | | | | | | | | | I copied this value from radeonsi, but it was wrong, 1024 seems to be correct answer from looking at gpuinfo. This should fix a few compute shader related hangs. (at least in CTS) Cc: <[email protected]> (airlied: pushed because it avoids hangs)
* freedreno/a5xx: fix txf_msRob Clark2018-07-303-0/+12
| | | | | | Somehow this got lost from the initial MSAA patch. Signed-off-by: Rob Clark <[email protected]>
* nvc0: serialize before updating some constant buffer bindings on Maxwell+Rhys Perry2018-07-304-47/+81
| | | | | | | | | | | | | | | | | To avoid serializing, this has the user constant buffer always be 65536 bytes and enabled unless it's required that something else is used for constant buffer 0. Fixes artifacts with at least XCOM: Enemy Within, 0 A.D. and Unigine Valley, Heaven and Superposition. v2: changed uniform_buffer_bound to be bool instead of a uint32_t v3: remove magic constants v3: remove pointless code in nvc0_validate_driverconst Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100177 Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* v3d: Block bin on render when doing vertex texturing.Eric Anholt2018-07-291-0/+14
| | | | | | | | | | | | The kernel by default serializes the BCL on previous BCLs submitted on this FD, but not RCLs. For now this fix is conservative and blocks on last RCL if any vertex texturing is done, which fails to get bin/render overlap if there was an intermediate job that doesn't draw to the BCL's buffer. I've dropped a perf_debug() in here to note that as a potential future improvement. Fixes intermittent failures in KHR-GLES3.copy_tex_image_conversions.required.*
* v3d: Fix meson build without vc4.Eric Anholt2018-07-291-1/+1
|
* vc4: Fix meson build when enabled without v3d.Eric Anholt2018-07-294-23/+28
| | | | | Reported-by: Rob Clark <[email protected]> Fixes: e92959c4e03c ("v3d: Pass the whole clif_dump structure to v3d_print_group().")
* nir/instr_set: Fix nir_instrs_equal for derefsJason Ekstrand2018-07-291-2/+2
| | | | | | | | | | | | We weren't returning at the end of the nir_isntr_type_deref case in nir_instrs_equal and it was falling through to the default of false. While we're at it, make the default unreachable because all statements in the switch now have their own returns. Had we done that before, we would have caught this bug a long time ago. Fixes: 19a4662a540a8c94 "nir: Add a deref instruction type" Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Thomas Helland<[email protected]>
* nir: Take if uses into account in ssa_def_components_readJason Ekstrand2018-07-291-0/+3
| | | | | Fixes: d800b7daa5440 "nir: Add a helper for figuring out what..." Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* util/list: Make some helpers take const listsJason Ekstrand2018-07-291-4/+4
| | | | | | | | They're all just querying things about the list and not mutating anything. Reviewed-by: Thomas Helland<[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* freedreno/a5xx: small cleanupRob Clark2018-07-291-26/+24
| | | | | | | | | | We no longer have semi-custom clear pipe that uses 3d state. Normal clears happen via hw blitter, and everything else uses u_blitter these days. So we don't need this hack. TODO a3xx+a4xx could get same treatment. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a5xx: remove unused prototypeRob Clark2018-07-291-3/+0
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix caps harderRob Clark2018-07-291-4/+4
| | | | | Fixes: 868ca81c and f485e567 Signed-off-by: Rob Clark <[email protected]>
* nir/lower_int64: mark all metadata as dirtyKarol Herbst2018-07-281-0/+3
| | | | | | | | | v2: use nir_metadata_preserve preserve metadata in case of !progress Fixes: 074f5ba0b56b12ddaca81eac3d9ed19da7054297 "nir: Add a simple int64 lowering pass" Signed-off-by: Karol Herbst <[email protected]>
* android: radv: enable build of vulkan.radv HAL moduleMauro Rossi2018-07-281-0/+1
| | | | | | | | | src/amd/Android.mk requires to include src/amd/vulkan/Android.mk to enable the build of vulkan.radv module Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* android: radv: add Android.mk for vulkan.radv HAL moduleMauro Rossi2018-07-281-0/+166
| | | | | | | | | radv implements the Android Vulkan HAL interface, this patch adds Android.mk building rules by porting of radv automake rules. vendor HAL module is installed as /vendor/lib/hw/vulkan.radv.so Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: generate entrypoints for VK_ANDROID_native_bufferMauro Rossi2018-07-281-3/+0
| | | | | | | | | | | | Patch changes radv entrypoints generator to not skip this extension even though it is set as disabled in the vk.xml Reference: 63525ba730 ("android: enable VK_ANDROID_native_buffer") Fixes: 69f447553c ("vulkan: Drop vk_android_native_buffer.xml") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: move vk_format_table.c to generated sourcesMauro Rossi2018-07-281-2/+2
| | | | | | | | | | | | Android build system will try to compile vk_format_table.c as a shipped source, but at compile time it will be missing, we move it to generated source, where it belongs Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* xlib: fix build break from _swrast_map_soft_renderbuffer() callBrian Paul2018-07-271-1/+1
| | | | | | We need to pass the new flip_y argument. Reviewed-by: Clayton Craft <[email protected]>
* swrast: fix crash in AA line code when there's no textureBrian Paul2018-07-271-4/+6
| | | | | | | Fixes a crash running the Piglit polygon-mode-facing test (and probably others). Reviewed-by: Neha Bhende <[email protected]>
* mesa: add switch case for GL 2.1 in _mesa_compute_version()Brian Paul2018-07-271-0/+3
| | | | | | | The xlib/swrast driver only supports GL 2.1. This patch fixes a crash if the app calls glGetString(GL_SHADING_LANGUAGE_VERSION). Reviewed-by: Neha Bhende <[email protected]>
* tgsi: whitespace fixes in tgsi_ureg.cBrian Paul2018-07-271-23/+22
| | | | Trivial.
* gallium/util: whitespace fixes in u_inlines.hBrian Paul2018-07-271-36/+44
| | | | Trivial.