summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915
AgeCommit message (Collapse)AuthorFilesLines
13 daysgallium: remove and emulate PIPE_CAP_MULTI_DRAWMarek Olšák1-0/+11
To remove PIPE_CAP checking in the common code. It's better if drivers lower multi draws even if the hardware doesn't support it beause the multi draw loop can be moved deeper into the driver to remove more overhead. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7679>
13 daystreewide: Disambiguate various variables named "debug_options"Adam Jackson1-2/+2
Name them after what they control so 'vi -t' can take you somewhere useful. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8165>
2020-12-22gallium: inline pipe_depth_state to decrease DSA state size by 4 bytesMarek Olšák1-3/+3
Depth and alpha states are now packed together, interleaved somewhat. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>
2020-12-22gallium: inline pipe_alpha_state to enable better DSA bitfield packingMarek Olšák1-3/+3
pipe_alpha_state and pipe_depth_state will be packed together because they have only a few bitfields each. This will eventually remove 4 bytes of padding in pipe_depth_stencil_alpha_state. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>
2020-12-22gallium: pass pipe_stencil_ref by value (it has only 2 bytes)Marek Olšák1-2/+2
This changes pipe_context::set_stencil_ref to pass the parameter by value. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>
2020-12-14gallium: Add optional pipe_context to flush_frontbufferJesse Natalie1-0/+2
It's hooked up in all the pipe wrapper drivers, and all the frontends except a couple places in glx/xlib. This enables a more efficient path for drivers which use swrast's Present, but hardware rendering (e.g. d3d12, zink). Reviewed-by: Dave Airlie <airlied@redhat.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8045>
2020-11-18gallium: extend draw_vbo to support multi drawsMarek Olšák1-3/+5
Essentially rename multi_draw to draw_vbo and remove start and count from pipe_draw_info. This is only an interface change. It doesn't add multi draw support anywhere. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441>
2020-11-18gallium: make pipe_draw_indirect_info * a draw_vbo parameterMarek Olšák1-2/+3
This removes 8 bytes from pipe_draw_info (think u_threaded_context) and a lot of info->indirect pointer indirections. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441>
2020-09-22gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*Marek Olšák1-4/+4
Acked-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749>
2020-08-05gallium: replace 16BIT_TEMPS cap with 16BIT_CONSTSRob Clark1-1/+1
All drivers that support mediump lowering should support 16BIT_TEMPS, but some do not also want 16b consts to be lowered. Replace the pipe cap in preperation to remove LowerPrecisionTemporaries. Note: also updates reference checksums for the arm64_a630_traces job, due to lowering more to 16b Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189>
2020-07-22i915: Remove a bunch of default handling of pipe caps.Eric Anholt1-145/+0
u_screen will return 0 for all of these, which means that this is one less driver to see in git grep when I'm checking who exposes a cap. The exception is the texel/gather offsets and stream output components, which will not be exposed since we don't expose the corresponding GLSL version. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>
2020-07-07gallium: add PIPE_SHADER_CAP_GLSL_16BIT_TEMPS for LowerPrecisionTemporariesMarek Olšák1-0/+1
Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
2020-06-22gallium: Add pipe cap for primitive restart with fixed indexNeil Roberts1-0/+1
Adds PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX which is a subset of the primitive restart cap for when the hardware can only support the fixed indices specified in GLES. The switch statements were automatically modified with this command: find \( \( -name \*.cpp -o -name \*.c \) \! -type l \) \ -exec sed -i -r \ 's/^(\s*case\s+PIPE_CAP_PRIMITIVE_RESTART)\s*:.*$/\0\n\1_FIXED_INDEX:/' \ {} \; v2: Add a note in screen.rst Reviewed-by: Eric Anholt <eric@anholt.net> (v1) Reviewed by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5559>
2020-06-02gallium: add shader caps INT16 and FP16_DERIVATIVESMarek Olšák1-0/+2
Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
2020-06-01meson: use gnu_symbol_visibility argumentDylan Baker1-1/+1
This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-05-23tree-wide: fix deprecated GitLab URLsEric Engestrom1-1/+1
They will stop working in the next GitLab release, so let's update them ASAP to make sure things are propagated to everyone by then. See: https://about.gitlab.com/releases/2020/05/06/gitlab-com-13-0-breaking-changes/#removal-of-deprecated-project-paths Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5111>
2020-05-13gallium: change comments to remove 'state tracker'Marek Olšák1-1/+1
Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
2020-05-13gallium: rename 'state tracker' to 'frontend'Marek Olšák2-2/+2
Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
2020-05-06draw: introduce sampler num samples + stride membersDave Airlie1-1/+1
This adds the num samples + sampler stride into the texture mapping paths, currently drivers just pass 0 for now. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
2020-04-29gallium: add pipe cap for scissored clears and pass scissor state to clear() ↵Mike Blumenkrantz2-0/+4
hook this adds a new pipe cap that drivers can support which enables passing buffer clears with scissor test enabled through to be handled by the driver instead of having mesa draw a quad also adjust all existing clear() hooks to have the new parameter Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4310>
2020-03-27util: don't include p_defines.h and u_pointer.h from galliumMarek Olšák1-1/+1
It's a mess, but this is what I arrived at. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
2019-11-14util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt5-6/+6
To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-09-19docs: Update bug report URLs for the gitlab migrationAdam Jackson1-1/+1
Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-07-22gallium: switch boolean -> bool at the interface definitionsIlia Mirkin5-16/+16
This is a relatively minimal change to adjust all the gallium interfaces to use bool instead of boolean. I tried to avoid making unrelated changes inside of drivers to flip boolean -> bool to reduce the risk of regressions (the compiler will much more easily allow "dirty" values inside a char-based boolean than a C99 _Bool). This has been build-tested on amd64 with: Gallium drivers: nouveau r300 r600 radeonsi freedreno swrast etnaviv v3d vc4 i915 svga virgl swr panfrost iris lima kmsro Gallium st: mesa xa xvmc xvmc vdpau va Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-07-19util: use standard name for vsnprintf()Eric Engestrom1-1/+1
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2019-07-19util: use standard name for snprintf()Eric Engestrom1-1/+1
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2019-07-10gallium: get rid of PIPE_CAP_SM3Erik Faye-Lund1-1/+3
PIPE_CAP_SM3 has always been an odd one out of all our caps. While most other caps are fine-grained and single-purpose, this cap encode several features in one. And since OpenGL cares more about single features, it'd be nice to get rid of this one. As it turns, this is now relatively simple. We only really care about three features using this cap, and those already got their own caps. So we can remove it, and make sure all current drivers just give the same response to all of them. The only place we *really* care about SM3 is in nine, and there we can instead just re-construct the information based on the finer-grained caps. This avoids DX9 semantics from needlessly leaking into all of the drivers, most of who doesn't care a whole lot about DX9 specifically. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-05-23gallium: Change PIPE_CAP_TGSI_FS_FBFETCH bool to PIPE_CAP_FBFETCH countKenneth Graunke1-1/+1
TGSI's FBFETCH instruction currently only supports reading from a single render target, but NIR intrinsics can support multiple render targets. radeonsi can only support fetching from RT 0, but other drivers may be able to support fetching from any render target. To express this, this patch renames PIPE_CAP_TGSI_FS_FBFETCH to simply PIPE_CAP_FBFETCH, and converts it from a boolean "is FBFETCH supported?" to an integer number of render targets which can be fetched. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-05-13gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.Eric Anholt1-3/+3
The _LEVELS assumes that the max is always power of two. For V3D 4.2, we can support up to 7680 non-power-of-two MSAA textures, which will let X11 support dual 4k displays on newer hardware. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-04-29i915: support NULL-resourcesErik Faye-Lund1-2/+5
It's legal for a buffer-object to have a NULL-resource, but let's just skip over it, as there's nothing to do. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
2019-04-24gallium: set PIPE_CAP_MAX_FRAMES_IN_FLIGHT to 2 for all driversMarek Olšák1-3/+0
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-23gallium: replace DRM_CONF_THROTTLE with PIPE_CAP_MAX_FRAMES_IN_FLIGHTMarek Olšák1-0/+3
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-15Delete autotoolsDylan Baker2-44/+0
Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Matt Turner <mattst88@gmail.com>
2019-03-17i915g: remove calls to pipe_sampler_view_release()Brian Paul1-8/+2
As with previous patches for svga, llvmpipe, swr drivers. Compile tested only. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-By: Jose Fonseca <jfonseca@vmware.com>
2019-02-07gallium: add PIPE_CAP_MAX_VARYINGSKarol Herbst1-0/+2
Some NVIDIA hardware can accept 128 fragment shader input components, but only have up to 124 varying-interpolated input components. We add a new cap to express this cleanly. For most drivers, this will have the same value as PIPE_SHADER_CAP_MAX_INPUTS for the fragment shader. Fixes KHR-GL45.limits.max_fragment_input_components Signed-off-by: Karol Herbst <karolherbst@gmail.com> [imirkin: rebased, improved docs/commit message] Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: 19.0 <mesa-stable@lists.freedesktop.org>
2018-10-30util: Move os_misc to utilDylan Baker1-1/+1
this is needed by u_debug Tested-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-09-07gallium: add PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGETMarek Olšák1-0/+1
2018-09-06gallium: enable GL_AMD_depth_clamp_separate on r600, radeonsiMarek Olšák1-0/+1
2018-09-04gallium: Add a helper for implementing PIPE_CAP_* default values.Eric Anholt1-2/+3
One of the pains of implementing a gallium driver is filling in a million pipe caps you don't know about yet when you're just starting out. One of the pains of working on gallium is copy-and-pasting your new PIPE_CAP into each driver. We can fix both of these by having each driver call into the default helper from their default case, so that both sides can ignore each other until they need to. v2: fix i915g build, revert swr change to avoid breaking scons build (https://travis-ci.org/anholt/mesa/jobs/419739857) v3: Rebase on 3 new gallium caps. Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1) Cc: Bruce Cherniak <bruce.cherniak@intel.com> Cc: George Kyriazis <george.kyriazis@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org>
2018-08-24gallium: Split out PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE.Kenneth Graunke1-0/+1
Some hardware can do PIPE_TEX_WRAP_MIRROR_REPEAT but not PIPE_TEX_WRAP_MIRROR_CLAMP and PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER. Drivers for such hardware would like to advertise support for ARB_texture_mirror_clamp_to_edge but not EXT_texture_mirror_clamp. This commit adds a new PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE bit, changes the extension enable to be based on that, and enables it in all upstream drivers which supported PIPE_CAP_TEXTURE_MIRROR_CLAMP (so they continue supporting this mode).
2018-08-23gallium: add PIPE_CAP_MAX_SHADER_BUFFER_SIZEMarek Olšák1-0/+3
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-08-23gallium: add PIPE_CAP_MAX_GS_INVOCATIONSMarek Olšák1-0/+3
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-07-31gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák2-0/+5
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-07-31gallium: add PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTSMarek Olšák1-0/+1
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-06-29gallium/util: remove dummy function util_format_is_supportedMarek Olšák1-3/+0
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2018-06-14gallium: add support for programmable sample locationsRhys Perry1-0/+1
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (v2) Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
2018-05-29gallium: add PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITYMarek Olšák1-0/+1
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-05-01gallium/i915: fix PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE typoBrian Paul1-1/+1
Fixes: fffe5e2d14f807c ("gallium: add initial support for conservative rasterization") Trivial.
2018-04-30gallium: add initial support for conservative rasterizationRhys Perry1-0/+13
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-03-29util: Move util_is_power_of_two to bitscan.h and rename to ↵Ian Romanick1-1/+2
util_is_power_of_two_or_zero The new name make the zero-input behavior more obvious. The next patch adds a new function with different zero-input behavior. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Suggested-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>