aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gallium/trace: Wrap resource_get_param if availableKenneth Graunke2019-08-211-0/+16
| | | | | | Fixes: 0346b700833 ("gallium/screen: Add pipe_screen::resource_get_param") Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/ddebug: Wrap resource_get_param if availableKenneth Graunke2019-08-211-0/+13
| | | | | | Fixes: 0346b700833 ("gallium/screen: Add pipe_screen::resource_get_param") Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: recover target_check before get_current_tex_objectsJose Maria Casanova Crespo2019-08-211-7/+7
| | | | | | | | | | | | | | | | | At compressed_tex_sub_image we only can obtain the tex_object after compressed_subtexture_target_check is validated for TEX_MODE_CURRENT. So if the target is wrong the error is raised to the user. This completes the fix for the regression introduced on "mesa: refactor compressed_tex_sub_image function" of the pending failing tests: dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.compressedtexsubimage3d v2: Fix warning that texObj might be used uninitialized (Gert Wollny) Fixes: 7df233d68dc ("mesa: refactor compressed_tex_sub_image function") Reviewed-By: Gert Wollny <[email protected]>
* gallium: Add buffer and configs handling or fp16 formatsKevin Strasser2019-08-215-0/+51
| | | | | | | | | | | | | | | Expose configs when allow_fp16_configs has been enabled and DRI_LOADER_CAP_FP16 is set in the loader. Also, make kms_swrast_dri respect format bpp, to allow for allocating buffers wider than 32 bpp. Make fp16 opt-in for gallium. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965: Add handling for fp16 configsKevin Strasser2019-08-212-1/+29
| | | | | | | | | | | | Expose configs when allow_fp16_configs has been enabled and DRI_LOADER_CAP_FP16 is set in the loader. Also, define a new dri configuration option so users can disable exposure of fp16 formats. Make fp16 opt-in for i965. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: Add buffer handling and visuals for fp16 formatsKevin Strasser2019-08-215-1/+41
| | | | | | | | | | Define and set a new loader cap DRI_LOADER_CAP_FP16, indicating that gbm can handle fp16 formats. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Add fp16 formatsKevin Strasser2019-08-214-0/+31
| | | | | | | | | | | Add dri formats for RGBA ordered 64 bpp IEEE 754 half precision floating point. Leverage existing offscreen render support for MESA_FORMAT_RGBA_FLOAT16 and MESA_FORMAT_RGBX_FLOAT16. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Handle dri configs with floating point pixel dataKevin Strasser2019-08-214-2/+30
| | | | | | | | | | | | In the case that __DRI_ATTRIB_FLOAT_BIT is set in the dri config, set EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT in the egl config. Add a field to the platform driver visual to indicate if it has components that are in floating point form. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Handle configs with floating point pixel dataKevin Strasser2019-08-211-0/+5
| | | | | | | | | | | In order to handle pixel formats that consist of floating point data, enable floatMode field in the dri config, and set __DRI_ATTRIB_FLOAT_BIT in the render type attribute. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx: Add fields for color shiftsKevin Strasser2019-08-212-0/+5
| | | | | | | | | | glx doesn't read the masks from the dri config directly, but for consistency add shifts to the glxconfig. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Convert configs to use shifts and sizes instead of masksKevin Strasser2019-08-2110-103/+213
| | | | | | | | | | | | Change dri2_add_config to take arrays of shifts and sizes, and compare with those set in the dri config. Convert all platform driver masks to shifts and sizes. In order to handle older drivers, where shift attributes aren't available, we fall back to the mask attributes and compute the shifts with ffs. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: move bitcount to bitscan.hKevin Strasser2019-08-212-36/+32
| | | | | | | | | bitcount is free from the pipe header dependencies that make u_math.h hard to include by non-gallium specific code, so move it to bitscan.h. bitscan.h is included by u_math.h so existing references will continue working. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Add config attributes for color channel shiftKevin Strasser2019-08-214-23/+61
| | | | | | | | | | | | | | | The existing mask attributes can only support up to 32 bpp. Introduce per-channel SHIFT attributes that indicate how many bits, from lsb towards msb, the bit field is offset. A shift of -1 will indicate that there is no bit field set for the channel. As old loaders will still be looking for masks, we set the masks to 0 for any formats wider than 32 bpp. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: Use consistent approach for config format filteringKevin Strasser2019-08-211-8/+9
| | | | | | | rgb10 uses an 'if(allowed) continue' approach, do the same for rgba_ordering. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965: Add helper function for allowed config formatsKevin Strasser2019-08-211-31/+34
| | | | | | | | | The driver checks dri config options and loader caps to filter out certain formats during config creation. Fold 4 call sites under a single helper function. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* drm-uapi: Update headers for fp16 formatsKevin Strasser2019-08-211-0/+11
| | | | | | | | | From drm-next commit 88ab9c76d191ad8645b483f31e2b394b0f3e280e Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: add RADV_DEBUG=allentrypointsAndres Rodriguez2019-08-212-8/+20
| | | | | | | | | | | | This debug option allows vkGet[Instance/Device]ProcAddr() to succeed even if the extension associated with the requested entrypoint was not enabled. This has come in handy in a few instances when debugging VR applications, so I thought it would be good to have a cleaned up version upstreamed. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* panfrost: Fix PIPE_BUFFER spacingAlyssa Rosenzweig2019-08-211-3/+3
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Implement depth range clippingAlyssa Rosenzweig2019-08-211-3/+12
| | | | | | | This should fix glDepthRangef issues. Eventually, something similar should allow implementing the depth bounds test. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Don't bail on PIPE_BUFFERAlyssa Rosenzweig2019-08-211-5/+5
| | | | | | We can handle some of it. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Identify and disassemble indirect texture/samplerAlyssa Rosenzweig2019-08-212-6/+28
| | | | | | | | | | | | | A pair of special flags can turn the texture/sampler handle fields into register selects. This means code like: texture(uTextures[hr28.w], ...) can be compiled to something like: texture ..., fsampler[hr28.w], texture[hr28.w] Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Breakout texture reg select printerAlyssa Rosenzweig2019-08-211-9/+26
| | | | | | | This data structure is shared in other parts of the texture word, so let's streamline printing. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Pass stream_output_info by referenceAlyssa Rosenzweig2019-08-211-7/+7
| | | | | | It's a large structure, apparently. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Guard against NULL rasterizer explicitlyAlyssa Rosenzweig2019-08-211-1/+3
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/bifrost: Correct file size signednessAlyssa Rosenzweig2019-08-211-2/+2
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Fix missing ret assignment in DRM codeAlyssa Rosenzweig2019-08-211-1/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Hoist bo != NULL check before dereferenceAlyssa Rosenzweig2019-08-211-3/+3
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Hoist job != NULL checkAlyssa Rosenzweig2019-08-211-3/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Prevent potential integer overflow in instancingAlyssa Rosenzweig2019-08-211-1/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Clarify intention with PIPE_SWIZZLE_X checkAlyssa Rosenzweig2019-08-211-1/+2
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Pay attention to framebuffer dimension signAlyssa Rosenzweig2019-08-211-9/+2
| | | | | | These are unsigned so the clamp-positive is redundant. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Mark fallthrough explicitlyAlyssa Rosenzweig2019-08-211-0/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Don't check reads_point_coordAlyssa Rosenzweig2019-08-211-1/+1
| | | | | | Useless check. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Simplify contradictory check.Alyssa Rosenzweig2019-08-211-4/+1
| | | | | | Coverity. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Reorder bits check to fix 8-bit masksAlyssa Rosenzweig2019-08-211-5/+5
| | | | | | Coverity. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Represent unused nodes by ~0Alyssa Rosenzweig2019-08-2111-58/+56
| | | | | | | This allows nodes to be unsigned and prevents a class of weird signedness bugs identified by Coverity. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/bifrost: Avoid buffer overflow in disassemblerAlyssa Rosenzweig2019-08-211-1/+4
| | | | | | | This path shouldn't be possible for in-spec shaders, but let's be defensive. (Because security, right? Mostly because Coverity.) Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Remove all_zeroAlyssa Rosenzweig2019-08-211-13/+7
| | | | | | The checks confuse Coverity, so let's make it explicit what's going on. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Don't leak FBD pointerAlyssa Rosenzweig2019-08-211-3/+5
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Allocate `dependencies` on stackAlyssa Rosenzweig2019-08-211-1/+4
| | | | | | It's small; this way we don't leak memory. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Free liveness infoAlyssa Rosenzweig2019-08-211-0/+2
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* v3d: Use the correct opcodes for signed image min/maxJason Ekstrand2019-08-211-0/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* intel/nir: Add a helper for getting BRW_AOP from an intrinsicJason Ekstrand2019-08-214-170/+78
| | | | | | So many duplicated switch statements.... Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Add explicit signs to image min/max intrinsicsJason Ekstrand2019-08-2125-117/+236
| | | | | | | | | | | This better matches all the other atomic intrinsics such as those for SSBOs and shared variables where the sign is part of the intrinsic opcode. Both generators (GLSL and SPIR-V) know the sign from the type of the image variable or handle. In SPIR-V, signed min/max are separate opcodes from unsigned. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* pan/decode: Cleanup mali_attr printingAlyssa Rosenzweig2019-08-211-20/+44
| | | | | | | | We can smush this into one-line per record as per usual. We still need more validation and cleaning this up, especially around instancing. But for LINEAR records, it works okay already. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Validate attribute/varying buffer pointerAlyssa Rosenzweig2019-08-211-0/+3
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Include address in union mali_attrAlyssa Rosenzweig2019-08-211-19/+7
| | | | | | No need to break it out into extra lines. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Use concise texture printingAlyssa Rosenzweig2019-08-211-33/+35
| | | | | | | | This consolidates texture format and dimensionality into something simple: tiled rgba8_unorm.rgb1: 512x512 Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Break up usage2 fieldAlyssa Rosenzweig2019-08-213-28/+42
| | | | | | This is another bit field describing layout. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Pretty-print sRGB formatAlyssa Rosenzweig2019-08-211-4/+11
| | | | | | We can just stick an "s" in if it's sRGB. Signed-off-by: Alyssa Rosenzweig <[email protected]>