aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_hw.h
Commit message (Collapse)AuthorAgeFilesLines
* virgl: Enable CAP_CLEAR_TEXTURE if host supports itElie Tournier2020-05-071-0/+1
| | | | | | Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4345>
* virgl: Use ETC2 formats directly when possible.Lepton Wu2020-04-161-0/+12
| | | | | | | | | Don't emulate them with uncompressed formats if the host support them since uncompressed formats like GL_R16 could be not available on GLES hosts. Signed-off-by: Lepton Wu <[email protected]> Reviewed-by: Gert Wollny <[email protected]>
* virgl: fix format conversion for recent gallium changes.Dave Airlie2019-08-261-3/+65
| | | | | | | | | | | | | | | | | | The virgl formats are fixed in time snapshots of the gallium ones, we just need to provide a translation table between them when we enter the hardware. This fixes a regression since Eric renumbered the gallium table. Fixes: c45c33a5a2 (gallium: Remove manual defining of PIPE_FORMAT enum values.) Bugzilla: https://bugs.freedesktop.org/111454 v1 by Dave Airlie <[email protected]> v2: virgl: Add a number of formats to the table that are used, e.g. for vertex attributes v3: cover some more missing formats from a piglit run Signed-off-by: Gert Wollny <[email protected]>
* virgl: check scanout maskGurchetan Singh2019-08-081-0/+1
| | | | | | | | | Otherwise, virgl will report renderable or texturable formats as also scan-out formats. v2: drop host feature check (@kusma) Reviewed-by: Erik Faye-Lund <[email protected]>
* virgl: Add override for BGRA format to use swizzled SRGB formatGert Wollny2019-06-201-1/+10
| | | | | | | | | | | Tie in the check whether the host supports tweaks and whether this tweak is enabled. v2: Add comment about the emulated formats not being used directly in the guest (Gurchetan) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Add skeleton to evaluate cap and send tweaksGert Wollny2019-06-201-0/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Support VIRGL_BIND_SHAREDDavid Riley2019-06-191-0/+1
| | | | | | | Support a new virgl bind type for shared buffers. Signed-off-by: David Riley <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* virgl_hw: add YUV supportGurchetan Singh2019-06-181-0/+6
| | | | | | Add corresponding entries from p_format.h Reviewed-by: Emil Velikov <[email protected]>
* virgl: sync to virglrenderer virgl_hw.hGurchetan Singh2019-06-181-3/+10
| | | | | | | It's nice to keep these two files in sync, as they define guest userspace <---> host userspace communcation. Reviewed-by: Emil Velikov <[email protected]>
* virgl: Add copy_transfer3d definitionsAlexandros Frantzis2019-06-071-0/+1
| | | | | | | | | | Introduce definitions for the copy_transfer3d protocol command and virgl capability. This command transfers data to the host by copying through another resource, and will be used in upcoming commits to avoid waiting when transferring data for busy resources. Signed-off-by: Alexandros Frantzis <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* virgl: Support VIRGL_BIND_STAGINGAlexandros Frantzis2019-06-071-0/+1
| | | | | | | | | Support a new virgl bind type for staging buffers which don't require dedicated host-side storage. These will be used to implement copy transfers. Signed-off-by: Alexandros Frantzis <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* virgl: Enable CAP_CLIP_HALFZ if host supports itGert Wollny2019-06-061-0/+1
| | | | | | | | | | | On according hosts this enables the piglits as "pass": arb_clip_control-* v2: sync flag with host Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Chia-I Wu <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* virgl: get readback-formats from hostErik Faye-Lund2019-04-171-0/+1
| | | | | Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Enable passing arrays as input to fragment shadersGert Wollny2019-04-101-0/+2
| | | | | | | | | | | | | | | | | | | This is needed to properly handle interpolateAt* when the input to be interpolated is passed as array in the original GLSL. Currently, the the GLSL compiler would lower selecting the correct input so that the interpolant parameter to interpolateAt* is a temporary, and this can not be used to create a valid shader on the host side, because here the parameter must a shader input. By allowing the passing the created TGSI allows to create proper GLSL. This is related to the virglrenderer bug https://gitlab.freedesktop.org/virgl/virglrenderer/issues/74 v2: Squash the two patches handling these flags into another Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: add support for ARB_indirect_parametersDave Airlie2019-04-091-0/+1
| | | | | | The protocol changes are already in place for it. Reviewed-By: Gert Wollny <[email protected]>
* virgl: add support for ARB_multi_draw_indirectDave Airlie2019-04-091-0/+1
| | | | | | | This will pass the multi draw through to the host if it has support for it instead of using the st to emulate it Reviewed-By: Gert Wollny <[email protected]>
* virgl: add support for missing command buffer binding.Dave Airlie2019-04-091-0/+2
| | | | | | | When I added indirect support I forgot this, however to use it now we need to check for a new enough capability on the host side. Reviewed-By: Gert Wollny <[email protected]>
* virgl: define MAX_VERTEX_STREAMS based on availability of TF3Gert Wollny2019-04-021-0/+1
| | | | | | | | | | Since with gles hosts we lie about the GLSL feature level it is better to set the number of streams based on actual hosts capabilities. v2: Make use of feature check level to avoid regressions. Signed-off-by: Gert Wollny <[email protected]> Reviewed-By: Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Add a caps feature check versionGert Wollny2019-03-291-0/+1
| | | | | | | | | | | | | | | | | | When we add new feature checks on the host side that is used to enable a cap conditionally that was enabled unconditionally before we might end up with a feature regression when a new mesa version is used with an old virglrenderer version that doesn't check for that cap. To work around this problem add a version id to the caps that corresponds to the features that are actually checked on the host and check that version too when enabling the cap. Fixes: 2ee197d6e84aa37638d423363aca183952816067 virgl: Enable mixed color FBO attachemnets only when the host supports it Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Pohsien Wang <[email protected]>
* virgl: Add a caps to advertise GLES backendElie Tournier2019-03-091-0/+1
| | | | | Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: <Gurchetan Singh [email protected]>
* virgl: Enable mixed color FBO attachemnets only when the host supportsGert Wollny2019-02-221-0/+1
| | | | | | | it Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Elie Tournier <[email protected]>
* virgl: add protocol for resource transfersGurchetan Singh2019-02-151-0/+1
| | | | | | | | | Mostly similar to VIRGL_CCMD_RESOURCE_INLINE_WRITE. However, this uses the resource's already attached iovecs rather than the command buffer to transfer the data. v2: Used (1 << 16) not (1 << 15) [@gerddie] Reviewed-by: Gert Wollny <[email protected]>
* virgl: ARB_query_buffer_object supportDave Airlie2019-01-311-0/+2
| | | | | | v1.1: fix size define. Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Set sRGB write control CAP based on host capabilitiesGert Wollny2019-01-281-0/+1
| | | | | | | | | v2: - Use the renamed CAPS - add assetions to make sure that mesa doesn't try to switch destination surface formats when it is not supported. (Ilia Mirkin) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Add command and flags to initiate debugging on the host (v2)Gert Wollny2018-11-131-0/+1
| | | | | | | | | | | | On the host VREND_DEBUG=guestallow must be set to let the guest override the debug flags. v2: Send flag string instead of flags, this avoids the need to keep the flags in sync. v3: Only request host logging if the host actually understands the command Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* virgl: use hw-atomics instead of in-ssbo onesTomeu Vizoso2018-09-051-0/+5
| | | | | | | | Emulating atomics on top of ssbos can lead to too small max SSBO count, so let's use the hw-atomics mechanism to expose atomic buffers instead. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: ARB_enhanced_layouts supportDave Airlie2018-08-221-0/+1
| | | | | | | We need to handle the gaps in the streamout bindings on the guest side and enable if it the host has the rest enabled. Reviewed-by: Jakob Bornecrantz <[email protected]>
* virgl: report actual max-texture sizesErik Faye-Lund2018-08-151-0/+3
| | | | | | | | Instead of doing conservative guesses, we should report the max levels based on the max sizes we get from GL on the host. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* virgl: ARB_texture_barrier supportDave Airlie2018-08-141-0/+1
| | | | Reviewed-by: Tomeu Vizoso <[email protected]>
* virgl: add ARB_shader_clock supportDave Airlie2018-08-081-0/+1
| | | | Reviewed-by: Erik Faye-Lund <[email protected]>
* virgl: update virgl_hw.h from virglrendererErik Faye-Lund2018-08-071-1/+26
| | | | | | | | This just makes sure we're currently up-to-date with what virglrenderer has. Signed-off-by: Erik Faye-Lund <[email protected]> Acked-by: Dave Airlie <[email protected]>
* virgl: rename msaa_sample_positions -> sample_locationsErik Faye-Lund2018-08-071-1/+1
| | | | | | | | | | | | This matches what this field is called in virglrenderer's copy of this. This reduces the diff between the two different versions of virgl_hw.h, and should make it easier to upgrade the file in the future. Signed-off-by: Erik Faye-Lund <[email protected]> Acked-by: Dave Airlie <[email protected]>
* virgl: enable FBFETCH if virglrenderer supports itErik Faye-Lund2018-08-011-0/+1
| | | | | | | | | | | | | | | | | This fixes the following dEQP-GLES31 cases from NotSupported to Pass for me: - dEQP-GLES31.functional.blend_equation_advanced.state_query.* - dEQP-GLES31.functional.blend_equation_advanced.basic.* - dEQP-GLES31.functional.blend_equation_advanced.srgb.* - dEQP-GLES31.functional.blend_equation_advanced.msaa.* - dEQP-GLES31.functional.blend_equation_advanced.barrier.* - dEQP-GLES31.functional.draw_buffers_indexed.overwrite_*advanced_blend_eq* - dEQP-GLES31.functional.state_query.indexed.blend_equation_advanced_* - dEQP-GLES31.functional.debug.negative_coverage.*.advanced_blend.* Signed-off-by: Erik Faye-Lund <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* virgl: enable robustness if the host exposes itDave Airlie2018-08-011-0/+1
| | | | Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Support ARB_framebuffer_no_attachmentsDave Airlie2018-08-011-0/+1
| | | | | | This uses new protocol to send the default sizes to the host. Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: add initial ARB_compute_shader supportDave Airlie2018-08-011-0/+5
| | | | | | This hooks up compute shader creation and launch grid support. Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: add memory barrier supportDave Airlie2018-08-011-0/+1
| | | | Reviwed-by: Gert Wollny <[email protected]>
* virgl: add TXQS supportDave Airlie2018-08-011-0/+1
| | | | Reviwed-by: Gert Wollny <[email protected]>
* virgl: add initial images support (v2)Dave Airlie2018-08-011-0/+3
| | | | | | v2: add max image samples support Reviwed-by: Gert Wollny <[email protected]>
* forward precise-flag if supportedErik Faye-Lund2018-07-241-0/+1
| | | | | | | | | | | | | | | | New versions of virglrenderer supports the precise-flag, so let's forward it from TGSI if that's the case. This fixes a few dEQP-GLES31 tests: - dEQP-GLES31.functional.tessellation.common_edge.quads_equal_spacing_precise - dEQP-GLES31.functional.tessellation.common_edge.quads_fractional_even_spacing_precise - dEQP-GLES31.functional.tessellation.common_edge.quads_fractional_odd_spacing_precise - dEQP-GLES31.functional.tessellation.common_edge.triangles_equal_spacing_precise - dEQP-GLES31.functional.tessellation.common_edge.triangles_fractional_even_spacing_precise - dEQP-GLES31.functional.tessellation.common_edge.triangles_fractional_odd_spacing_precise Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* virgl: add initial shader_storage_buffer_object support. (v2)Dave Airlie2018-07-241-0/+3
| | | | | | | | | | | This adds the guest side support for ARB_shader_storage_buffer_object. Co-authors: Gurchetan Singh <[email protected]> v2: move to using separate maximums (fixup macros) Reviewed-By: Gert Wollny <[email protected]>
* virgl: Expose GL_ARB_copy_image if host supports itGert Wollny2018-07-201-0/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: respect max_vertex_attrib_stride capErik Faye-Lund2018-07-171-1/+2
| | | | | | This is required for OpenGL 4.4 and OpenGL ES 3.1 support. Reviewed-by: Dave Airlie <[email protected]>
* virgl: implement set_min_samplesErik Faye-Lund2018-07-171-0/+1
| | | | | | | | This allows us to implement glMinSampleShading correctly, which up until now just got ignored. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* virgl: Add support for glGetMultisampleGert Wollny2018-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use caps to obtain the multisample sample positions for up to 16 positions and implement the according Gallium interface. This implemenation (plus its counterpart in virglrenderer) assume that the fixed sample position are always the same for a given number of samples over the whole live time of a qemu session. It also assumes that sample series are only given for 2, 4, 8, and 16 samples, and for intermediate numbers N of samples the next higher supported set from above list is picked and the sample positions for the first N samples are returned accordingly. Fixes (when run on GL host): dEQP-GLES31.functional.texture.multisample.samples_1.sample_position dEQP-GLES31.functional.texture.multisample.samples_2.sample_position dEQP-GLES31.functional.texture.multisample.samples_3.sample_position dEQP-GLES31.functional.texture.multisample.samples_4.sample_position dEQP-GLES31.functional.texture.multisample.samples_8.sample_position dEQP-GLES31.functional.texture.multisample.samples_10.sample_position dEQP-GLES31.functional.texture.multisample.samples_12.sample_position dEQP-GLES31.functional.texture.multisample.samples_13.sample_position dEQP-GLES31.functional.texture.multisample.samples_16.sample_position v2: remove unrelated chunk (thanks Ilia Mirkin) v3: - also return positions for intermediate sample counts - fix unused varible warning - update description v4: explain better what this patch assumes and how it handles sample numbers that are not directly advertised (thanks go to Erik Faye-Lund for making me aware that this should be documented) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* virgl: add ARB_texture_view supportDave Airlie2018-06-271-0/+1
| | | | Reviewed-By: Gert Wollny <[email protected]>
* virgl: use bits in caps set v2[email protected]2018-06-051-0/+5
| | | | | | | | | Let's add another field to caps v2, that can help report boolean values. Suggested-by: Gert Wollny <[email protected]> Suggested-by: Dave Airlie <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* virgl: add shader offset alignment to to v2 caps struct[email protected]2018-06-051-0/+1
| | | | | | | | | | | | | | | | | | This is the SSBO analogue to fe0647. User supplied data must be a multiple of GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT. This fixes 44 GLES31 tests on airlied@'s GLES31 sketch branches with Nvidia hardware, but this patch standalone can applied to master. The alignment restriction on Nvidia is 32, hence the default value. Example tests: dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.0 dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std430 v2: Move to a better place in case statement v3: Rebase Reviewed-by: Dave Airlie <[email protected]>
* virgl: Update virgl_hw.hJakob Bornecrantz2018-05-301-0/+1
| | | | | | Reviewed-by: Gurchetan Singh <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* virgl: update caps bitset to latest version.Dave Airlie2018-05-301-0/+5
| | | | | | | | This makes this use all 32 bits, so future sets need to be defined in a new struct. Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>