aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
...
* vl/dri3: add support for 10 bits formatLeo Liu2018-09-131-4/+25
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* vl/dri: add 10 bits format supportsLeo Liu2018-09-132-10/+65
| | | | | | | v2: Tell B10G10R10X2 and R10G10B10X2 formats for different HW. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* winsys/virgl: avoid unintended behaviorErik Faye-Lund2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we end up never taking the loop that writes ret, we can end up with an uninitialized value, and if we're *really* unlucky, that value can be -1, causing us to go down an error-path instead of a success path. This was obviously not intended, so let's just initialize this to zero. Noticed by Valgrind: Conditional jump or move depends on uninitialised value(s) at 0xBA640A0: virgl_drm_winsys_resource_cache_create (virgl_drm_winsys.c:348) by 0xBA62FCF: virgl_buffer_create (virgl_buffer.c:170) by 0xBA605AC: virgl_resource_create (virgl_resource.c:60) by 0xBCF816F: bufferobj_data (st_cb_bufferobjects.c:344) by 0xBCF816F: st_bufferobj_data (st_cb_bufferobjects.c:390) by 0xBB7E836: vbo_use_buffer_objects (vbo_exec_api.c:1136) by 0xBCFCC6E: st_create_context_priv (st_context.c:414) by 0xBCFD3CD: st_create_context (st_context.c:590) by 0xBBB30CA: st_api_create_context (st_manager.c:896) by 0xB981E76: dri_create_context (dri_context.c:155) by 0xB97BDCE: driCreateContextAttribs (dri_util.c:473) by 0x5288331: dri3_create_context_attribs (dri3_glx.c:309) by 0x5264D64: glXCreateContextAttribsARB (create_context.c:78) Fixes: a8987b88ff1 ("virgl: add driver for virtio-gpu 3D (v2)") Signed-off-by: Erik Faye-Lund <[email protected]>
* nv50,nvc0: warn on not-explicitly-handled capsIlia Mirkin2018-09-112-14/+26
| | | | | | | | | | Not handling caps explicitly means that we're likely getting incorrect values -- these need to be reviewed and set appropriately. While we're at it, add in some missing caps, and set all the subpixel stuff to 8 as that seems to be what the blob reports. Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: Correctly handle no config context creationElie Tournier2018-09-102-1/+5
| | | | | | | | | | | | This patch fixes the following Piglit test: spec@egl_mesa_configless_context@basic It also fixes few test in a virgl guest. v2: Evaluate the value of no_config (Ilia) Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Elie Tournier <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* radeonsi/nir: port some bindless and sampler code from TGSIMarek Olšák2018-09-101-30/+50
| | | | | | These might be all missing changes for bindless textures. Tested-by: Dieter Nützel <[email protected]>
* radeonsi: adjust and simplify max_alloc_size determinationMarek Olšák2018-09-101-3/+5
| | | | Tested-by: Dieter Nützel <[email protected]>
* radeonsi: split si_copy_bufferMarek Olšák2018-09-105-17/+33
| | | | | | compute and SDMA will be added into it. Tested-by: Dieter Nützel <[email protected]>
* radeonsi: don't call VBO prefetch with size=0Marek Olšák2018-09-101-1/+1
| | | | | | for the next commit. Tested-by: Dieter Nützel <[email protected]>
* radeonsi: merge SI and CI dma_clear_buffer and remove the callbackMarek Olšák2018-09-108-90/+66
| | | | | | | also use assertions for the requirements that offset and size are a multiple of 4. Tested-by: Dieter Nützel <[email protected]>
* radeonsi: fix GPU hangs with bindless textures and LLVM 7.0Marek Olšák2018-09-103-5/+33
| | | | Tested-by: Dieter Nützel <[email protected]>
* ac: use iN_0/1 constantsMarek Olšák2018-09-102-3/+3
| | | | Tested-by: Dieter Nützel <[email protected]>
* ac: add radeon_info::num_good_cu_per_shMarek Olšák2018-09-102-3/+5
| | | | Tested-by: Dieter Nützel <[email protected]>
* radeonsi: fix printing a BO list into ddebug reportsMarek Olšák2018-09-101-1/+2
| | | | | | | important for debugging Cc: 18.1 18.2 <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* r600: fix HTILE for NPOT textures with mipmappingMarek Olšák2018-09-101-2/+2
| | | | | Cc: 18.1 18.2 <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* winsys/radeon: fix CMASK fast clear for NPOT textures with mipmapping on SI/CIMarek Olšák2018-09-101-2/+2
| | | | | Cc: 18.2 <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* radeonsi: fix HTILE for NPOT textures with mipmapping on SI/CIMarek Olšák2018-09-101-2/+2
| | | | | | | VI uses addrlib so it's unaffected. Cc: 18.1 18.2 <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* svga: assorted fixes/changes in svga_pipe_blit.cBrian Paul2018-09-101-27/+15
| | | | | | To align the code with VMware's in-house copy. Signed-off-by: Brian Paul <[email protected]>
* svga: set buffer bind_flags in svga_buffer_add_host_surface()Brian Paul2018-09-101-0/+3
| | | | | | To match the in-house VMware code. Signed-off-by: Brian Paul <[email protected]>
* svga: add format conversion for legacy formatsCharmaine Lee2018-09-104-332/+433
| | | | | | | | | | | This patch extends the format_conversion table to support different view formats on texture buffer. For legacy image formats such as INTENSITY, LUMINANCE, LUMINANCE_ALPHA, special swizzle masks will be used on the red or RG channels. This fixes piglit test arb_texture_buffer_object-formats fs|vs arb Reviewed-by: Brian Paul <[email protected]>
* svga: remove obsolete code to reemit gs bindingCharmaine Lee2018-09-102-39/+0
| | | | | | | The svga_reemit_gs_bindings function is no longer needed. Remove it. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: move variant->fs_shadow_compare_units assignmentBrian Paul2018-09-101-0/+2
| | | | | | | Fixes a crash since the variant object isn't allocated until later in the function. Not sure how this got through. Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix resource checking in is_blending_enabled()Charmaine Lee2018-09-101-1/+2
| | | | | | | This patch makes sure a valid color buffer is bound before checking its resource. This fixes Unigine Valley running in SM41 device. Reviewed-by: Brian Paul <[email protected]>
* svga: Use texture_copy_region instead of texture_copy_handle for multisamplingNeha Bhende2018-09-101-9/+18
| | | | | | | | | | | | | This fixes some of tests cases in arb_copy_image-formats and also fixes SurfaceCopy related errors in vmware.log when multi sampled surfaces are used. Tested with piglit, glretrace on windows and linux VM. v2: As per Brian's comment Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add missing devcap check for texture array supportCharmaine Lee2018-09-101-1/+11
| | | | | | | | The patch checks DXFMT_ARRAY devcap for texture array support. Tested with MTT-piglit. No regressions. Reviewed-by: Brian Paul <[email protected]>
* svga: no need to check MULTISAMPLE devcap for view formatCharmaine Lee2018-09-101-1/+1
| | | | | | | | | | According to the current SVGA contract, any view format can be used on the underlying resource that is multisample. So there is no need to check the MULTISAMPLE devcap for the view format. Fixes black rendering issue with Tropics running with 4xMSAA. Reviewed-by: Brian Paul <[email protected]>
* svga: sync devcap name changes in svga3d_devcaps.hCharmaine Lee2018-09-102-12/+12
| | | | Reviewed-by: Brian Paul <[email protected]>
* svga: explicit set DXFMT_SHADER_SAMPLE for DS format for pre-SM41 deviceCharmaine Lee2018-09-101-5/+6
| | | | | | | Explicit set the DXFMT_SHADER_SAMPLE bit for depth stencil formats for pre-SM41 device only. This bit is now set by the SM41 device. Reviewed-by: Brian Paul <[email protected]>
* svga: remove unused variableCharmaine Lee2018-09-101-1/+0
| | | | Trivial.
* svga: draw round points when msaa is enabledBrian Paul2018-09-101-13/+15
| | | | | | | | | | | | | See comments for details. This allows the piglit ext_framebuffer_multisample-point-smooth test to pass. Also, test the pipe_rasterizer_state::point_quad_rasterization field to see if sprite point rasterization is needed because it's possible for no sprite_coord_enable bits to be set when drawing sprites. Finally, remove old, stale comments. Reviewed-by: Charmaine Lee <[email protected]>
* svga: check number of samples before emitting MSAA decls/opcodesBrian Paul2018-09-101-2/+14
| | | | | | | | | | | | If real MSAA is not available, we only support 1 sample/pixel. In that case, we must not declare MSAA resources or emit MSAA opcodes. Do that by checking the sample count. Fixes several piglit MSAA tests, such as arb_texture_multisample-sample-depth (when the hard-coded sample count of 4 is fixed in that test). Reviewed-by: Charmaine Lee <[email protected]>
* svga: remove obsolete comment on format_cap_table[]Brian Paul2018-09-101-10/+0
| | | | | | | | We removed the special cases referred to in this comment in the commit "svga: add a separate function to get dx format capabilities from vgpu10 device". Reviewed-by: Charmaine Lee <[email protected]>
* svga: allow TGSI_TEXTURE_CUBE_ARRAY in emit_tg4()Brian Paul2018-09-101-7/+2
| | | | | | | | | | | Technically, SM4.1 doesn't support cube map arrays, but our backend renderers actually do. This allows the Piglit textureGather cube map array tests to pass. Tested with GLrenderer, DX11renderer and SWrenderer. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: no dma on multisample surfaceCharmaine Lee2018-09-101-0/+7
| | | | | | | | | | Force direct map on multisample surface. Fixes SVGA Driver Errors running multisample piglit tests on Linux VM v2: use texture for the check. Reviewed-by: Neha Bhende <[email protected]>
* svga: src surface for IntraSurfaceCopy cannot be multisampleCharmaine Lee2018-09-101-0/+4
| | | | | | | Fixes SVGA Driver Errors with piglit test arb_copy_image-targets Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: fix missing format multisample devcap checkCharmaine Lee2018-09-101-0/+1
| | | | | | | | | | | In commit e4048f6cd1, svga_is_dx_format_supported() is supposed to also check the SVGA3D_DXFMT_MULTISAMPLE bit for multisample support of a format. Somehow that code is not included in that commit. This patch fixes it. Fixes piglit test spec@ext_framebuffer_multisample@formats all_samples. Reviewed-by: Brian Paul <[email protected]>
* svga: fix incorrect multisample support in VGPU9 deviceCharmaine Lee2018-09-101-0/+4
| | | | | | | Commit e4048f6cd1 unintentionally allows multisample support for VGPU9 device. This patch fixes this regression. Reviewed-by: Neha Bhende <[email protected]>
* svga: fix the missing devcap for SVGA3D_BC3_UNORM_SRGBCharmaine Lee2018-09-101-0/+1
| | | | | | | Set the devcap to SVGA3D_DEVCAP_DXFMT_BC3_UNORM_SRGB Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: add a separate function to get dx format capabilities from vgpu10 deviceCharmaine Lee2018-09-101-97/+91
| | | | | | | | | | | | | | | | | | Currently we have one function to get format capabailities and we convert DX10 devcaps back to DX9. This can be confusing. Going forward we will have a separate function for dealing with dx formats. This patch also fixes the depth stencil devcap. Instead of hardcoding the capabilities for the depth stencil formats, we will inquire the device for the capabilities. Note: we will still need to explicity set the SVGA3D_DXFMT_SHADER_SAMPLE bit for SVGA3D_R32_FLOAT_X8X24 and SVGA3D_R24_UNORM_X8 since this bit is not advertised but supported by the device. v2: reapply the patch after svga_is_format_supported is moved to svga_format.c Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: assign a separate function for is_format_supported() for vgpu10 deviceCharmaine Lee2018-09-103-18/+116
| | | | | | | | | | This patch adds a new function svga_is_dx_format_supported() to check for format support in a VGPU10 device. v2: reapply the patch after svga_is_format_supported is moved to svga_format.c Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: add some devcap debugging codeBrian Paul2018-09-101-0/+193
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix depth and coverage mask output declarationCharmaine Lee2018-09-101-3/+5
| | | | | | Set the component mask to zero for both registers. Reviewed-by: Brian Paul <[email protected]>
* svga: add sample positions for 2 samplesCharmaine Lee2018-09-101-0/+7
| | | | | | | Fixes piglit tests spec@arb_sample_shading@builtin-gl-sample-position 2 spec@arb_texture_multisample@fb-completeness@2 Reviewed-by: Brian Paul <[email protected]>
* svga: check sample count devcapsCharmaine Lee2018-09-101-0/+8
| | | | | | | Check sample count devcaps from the svga device to determine the supported sample counts. Reviewed-by: Brian Paul <[email protected]>
* svga: fix 1-element cube map array issueBrian Paul2018-09-102-5/+10
| | | | | | | | | As with 1D and 2D array textures, if there's only one array element (one cubemap in this case) we have to issue different shader code. This fixes a number of Piglit cubemap array tests. Reviewed-by: Charmaine Lee <[email protected]>
* svga: simplify array test in svga_init_shader_key_common()Brian Paul2018-09-101-11/+10
| | | | | | | And squash commit a patch to silence a compiler warning (add default case to the switch statement). Reviewed-by: Charmaine Lee <[email protected]>
* winsys/drm: check for CAPS2/SM41 support if VGPU10 is enabledCharmaine Lee2018-09-101-1/+1
| | | | | | | | No need to check for HW_CAPS2 or SM4_1 support if VGPU10 is not enabled or is explicitly disabled via the environment variable SVGA_VGPU10. Reviewed-by: Deepak Rawat <[email protected]>
* winsys/drm: Add support for quality level in surface ioctlDeepak Rawat2018-09-104-8/+16
| | | | | | | | | | | A new argument "quality level" is added in surface define v3 which represets precision settings for surface. This commit add support for quality level in DRM_VMW_GB_SURFACE_CREATE_EXT and DRM_VMW_GB_SURFACE_REF_EXT. Signed-off-by: Deepak Rawat <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: sync svga3d_types.h with upstream changesCharmaine Lee2018-09-101-10/+45
| | | | Reviewed-by: Brian Paul <[email protected]>
* winsys/drm: enable intra_surface_copy if HW_CAP2 is supportedCharmaine Lee2018-09-101-6/+9
| | | | | | | | | With drm version 2_15, we can inquire for support of HW_CAP2. If it is supported, we can enable intra_surface_copy support. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Deepak Rawat <[email protected]>