summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_context.c
AgeCommit message (Collapse)AuthorFilesLines
2021-12-03classic/i965: Remove driverDylan Baker1-1975/+0
Reviewed-by: Emma Anholt <emma@anholt.net> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10153>
2021-11-08intel: move away from booleans to identify platformsLionel Landwerlin1-1/+1
v2: Drop changes around GFX_VERx10 == 75 (Luis) v3: Replace (GFX_VERx10 < 75 && devinfo->platform != INTEL_PLATFORM_BYT) by (devinfo->platform == INTEL_PLATFORM_IVB) Replace (devinfo->ver >= 5 || devinfo->platform == INTEL_PLATFORM_G4X) by (devinfo->verx10 >= 45) Replace (devinfo->platform != INTEL_PLATFORM_G4X) by (devinfo->verx10 != 45) v4: Fix crocus typo v5: Rebase v6: Add GFX3, ILK & I965 platforms (Jordan) Move ifdef to code expressions (Jordan) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12981>
2021-11-04intel: Add has_bit6_swizzle to devinfoJason Ekstrand1-2/+0
There's no good reason to have this rather complex check in three drivers. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13636>
2021-10-15intel: fix INTEL_DEBUG environment variable on 32-bit systemsMarcin Ślusarz1-7/+7
INTEL_DEBUG is defined (since 4015e1876a77162e3444eeaa29a0dfbc47efe90e) as: #define INTEL_DEBUG __builtin_expect(intel_debug, 0) which unfortunately chops off upper 32 bits from intel_debug on platforms where sizeof(long) != sizeof(uint64_t) because __builtin_expect is defined only for the long type. Fix this by changing the definition of INTEL_DEBUG to be function-like macro with "flags" argument. New definition returns 0 or 1 when any of the flags match. Most of the changes in this commit were generated using: for c in `git grep INTEL_DEBUG | grep "&" | grep -v i915 | awk -F: '{print $1}' | sort | uniq`; do perl -pi -e "s/INTEL_DEBUG & ([A-Z0-9a-z_]+)/INTEL_DBG(\1)/" $c perl -pi -e "s/INTEL_DEBUG & (\([A-Z0-9_ |]+\))/INTEL_DBG\1/" $c done but it didn't handle all cases and required minor cleanups (like removal of round brackets which were not needed anymore). Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13334>
2021-07-29i965: Write a custom allocator for the intel memobj structRohan Garg1-0/+12
This helps ensure we're not doing out of bounds access later. Signed-off-by: Rohan Garg <rohan.garg@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12075>
2021-07-14intel/dev: Add a max_cs_workgroup_threads fieldJason Ekstrand1-7/+1
This is distinct form max_cs_threads because it also encodes restrictions about the way we use GPGPU/COMPUTE_WALKER. This gets rid of the MIN2(64, devinfo->max_cs_threads) we have scattered all over the driver and puts it in a central place. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-07-14intel/dev: Handle BSW naming issuesJason Ekstrand1-20/+0
Braswell, a particular Cherryview variant, is especially strange. We can't even get the chip name from the PCI ID and instead have to look at fusing information to decide if it's a 400 or a 405. Pull that into the common code as well. This fixes BSW naming on ANV and crocus. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-07-14intel/dev: Put the device name in intel_device_infoJason Ekstrand1-1/+1
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-07-14intel/dev: Handle CHV CS thread weirdness in get_device_info_from_fdJason Ekstrand1-12/+0
Cherryview is weird in that the actual limits we can expose through GL are dependent on fusing information which is only obtainable at runtime. The same PCI ID may have different configurations with different maximum CS thread counts. We currently handle this in i965 and ANV by doing the calculation in the driver. This dates back to when intel_device_info was computed from the PCI ID. Now that we have get_device_info_from_fd, we can move the CHV stuff there and get it out of the driver. This fixes CHV thread counts on crocus as well. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-06-17mesa: add gallium flush_flags param into ctx->Driver.FlushMarek Olšák1-2/+2
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11341>
2021-06-03intel/nir,i965: Move HW generation check for UBO pushing to i965Jason Ekstrand1-0/+6
Iris only runs on BDW+ and ANV already handles this by not even trying on anything older than HSW. The only driver benefiting from this common check is i965. Moving it out makes the pass more generic and if some driver comes along which can push UBOs on IVB, it should work for that. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11145>
2021-05-17intel: simplify is_haswell checks, part 1Marcin Ślusarz1-2/+2
Generated with: files=`git grep is_haswell | cut -d: -f1 | sort | uniq` for file in $files; do cat $file | \ sed "s/devinfo->ver <= 7 && !devinfo->is_haswell/devinfo->verx10 <= 70/g" | \ sed "s/devinfo->ver >= 8 || devinfo->is_haswell/devinfo->verx10 >= 75/g" | \ sed "s/devinfo->is_haswell || devinfo->ver >= 8/devinfo->verx10 >= 75/g" | \ sed "s/devinfo.is_haswell || devinfo.ver >= 8/devinfo.verx10 >= 75/g" | \ sed "s/devinfo->ver > 7 || devinfo->is_haswell/devinfo->verx10 >= 75/g" | \ sed "s/devinfo->ver == 7 && !devinfo->is_haswell/devinfo->verx10 == 70/g" | \ sed "s/devinfo.ver == 7 && !devinfo.is_haswell/devinfo.verx10 == 70/g" | \ sed "s/devinfo->ver < 8 && !devinfo->is_haswell/devinfo->verx10 <= 70/g" | \ sed "s/device->info.ver == 7 && !device->info.is_haswell/device->info.verx10 == 70/g" \ > tmpXXX mv tmpXXX $file done Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10810>
2021-04-28i965: Initial implementation for EXT_memory_object_*Rohan Garg1-0/+26
Signed-off-by: Rohan Garg <rohan.garg@collabora.com> Reviewed-by: Eleni Maria Stea <estea@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>
2021-04-28i965: plumb device/driver UUID generatorsRohan Garg1-0/+27
Use the same generators as used in anv driver so both Vulkan and OpenGL drivers can share the same external memory objects. Signed-off-by: Rohan Garg <rohan.garg@collabora.com> Reviewed-by: Eleni Maria Stea <estea@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>
2021-04-20intel: Rename gen_perf prefix to intel_perf in source filesAnuj Phogat1-1/+1
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965 grep -E "gen_perf" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_perf\([^\.]\)/intel_perf\1/g" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20intel: Rename gen_get_device prefix to intel_get_deviceAnuj Phogat1-1/+1
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965" grep -E "gen_get_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_get_device/intel_get_device/g" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20intel: Rename gen_device prefix to intel_deviceAnuj Phogat1-7/+7
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965" grep -E "gen_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device/intel_device/g" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-09dri: Use __DRI_BUFFER_COUNT consistently internallyAdam Jackson1-1/+1
These arrays were all sized with insufficiently large magic numbers, which is probably not a good idea. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10142>
2021-04-02intel: Rename Genx keyword to GfxxAnuj Phogat1-2/+2
Commands used to do the changes: export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965" grep -E "Gen[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/Gen\([[:digit:]]\+\)/Gfx\1/g" Exclude changes in src/intel/perf/oa-*.xml: find src/intel/perf -type f \( -name "*.xml" \) | xargs sed -ie "s/Gfx/Gen/g" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936>
2021-04-02intel: Rename genx keyword to gfxx in source filesAnuj Phogat1-12/+12
Commands used to do the changes: export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965" grep -E "gen[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/gen\([[:digit:]]\+\)/gfx\1/g" Exclude pack.h and xml changes in this patch: grep -E "gfx[[:digit:]]+_pack\.h" -rIl $SEARCH_PATH | xargs sed -ie "s/gfx\([[:digit:]]\+_pack\.h\)/gen\1/g" grep -E "gfx[[:digit:]]+\.xml" -rIl $SEARCH_PATH | xargs sed -ie "s/gfx\([[:digit:]]\+\.xml\)/gen\1/g" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936>
2021-04-02intel: Rename GENx prefix in macros to GFXx in source filesAnuj Phogat1-1/+1
Commands used to do the changes: export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965" grep -E "GEN" -rIl src/intel/genxml | grep -E ".*py" | xargs sed -ie "s/GEN\([%{]\)/GFX\1/g" grep -E "[^_]GEN[[:digit:]]+" -rIl $SEARCH_PATH | grep -E ".*(\.c|\.h|\.y|\.l)" | xargs sed -ie "s/\([^_]\)GEN\([[:digit:]]\+\)/\1GFX\2/g" Leave out renaming GFX12_CCS_E macros. They fall under renaming pattern like "_GEN[[:digit:]]+": grep -E "GFX12_CCS_E" -rIl $SEARCH_PATH | xargs sed -ie "s/GFX12_CCS_E/GEN12_CCS_E/g" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936>
2021-04-02intel: Rename gen field in gen_device_info struct to verAnuj Phogat1-33/+33
Commands used to do the changes: export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965" grep -E "info\)*(.|->)gen" -rIl $SEARCH_PATH | xargs sed -ie "s/info\()*\)\(\.\|->\)gen/info\1\2ver/g" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936>
2021-03-11i965: Rename files with "intel_" prefix to "brw_"Anuj Phogat1-9/+9
v2: Rename intel_batchbuffer.c to intel_batch.c and intel_batchbuffer.h to intel_batch.h Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9510>
2021-03-10intel: Rename "GEN_" prefix used in common code to "INTEL_"Anuj Phogat1-3/+3
This patch renames all macros with "GEN_" prefix defined in common code. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413>
2021-03-10intel: Rename files with gen_ prefix in common code to intel_Anuj Phogat1-1/+1
Changes in this patch include: - Rename all files in src/intel/common path - Update the filenames used in source and build files Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413>
2021-02-25i965: Eliminate all tabs except in brw_defines.hKenneth Graunke1-7/+7
For a while we were doing 3-space indent with 8-space tabs, largely due to the emacs settings of a couple of contributors. We stopped using tabs a long time ago, and they're just a nuisance at this point. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-25i965: Rename more camel-case functions to brw and underscore styleKenneth Graunke1-15/+15
Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-25i965: Rename intelInit and brwInit camel-case functions to brw_*Kenneth Graunke1-11/+11
The driver style has been to use underscores for internal functions. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-25i965: Rename the rest of intel_* functions to brw_*Kenneth Graunke1-109/+97
Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-25i965: Rename intel_mip* to brw_mip*.Kenneth Graunke1-23/+23
With lots of indentation fixes. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-25i965: Rename intel_renderbuffer to brw_renderbufferKenneth Graunke1-14/+14
For now, keeping the 'irb' name on local variables. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-25i965: Rename intel_screen to brw_screenKenneth Graunke1-5/+5
Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-25i965: Rename intel_batchbuffer_* to brw_batch_*.Kenneth Graunke1-9/+9
Shorter, matching the convention in iris, and drops use of "intel_" on i965-specific code that isn't shared. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
2021-02-15mesa: optimize set_varying_vp_inputs by precomputing the conditionsMarek Olšák1-0/+1
set_varying_vp_inputs is called every draw call, which checks _Maintain*Program. Let's move that checking out of there. This adds a new flag that determines whether set_varying_vp_inputs should do anything. All code that changes _Maintain*Program must now reinitialize the new flag. This is done by new function _mesa_reset_vertex_processing_mode. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>
2021-02-03i965: use aligned malloc for context instead of rallocTapani Pälli1-4/+7
Fixes: 3175b63a ("mesa: don't allocate matrices with malloc") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4118 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8805>
2021-01-27i965: Don't parse driconf againIan Romanick1-10/+4
It was already parsed in intelInitScree2, and the results are stored in the screen. Fixes: d67ef485804 ("i965/screen: Allow drirc to set 'allow_rgb10_configs' again.") Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387>
2021-01-27i965: Use allow_higher_compat_version option during screen initializationIan Romanick1-0/+23
Currently, `allow_higher_compat_version` is only used during context creation. Doing that means an application that doesn't request a specific version can be given a version higher than 3.0. However, an application still cannot request a higher version via glXCreateContextAttribsARB. The GLX and DRI layers will only see that version 3.0 is supported, so context creation will fail before the drive is called. For this to work, max_gl_compat_version must be set to a higher version. This enables running many piglit tests on i965 with allow_higher_compat_version. v2: Fix a typo in a comment. Noticed by Tim. Fix a typo in the commit message. Noticed by the spell checker. :) v3: Don't parse driconf again. Suggested by Tim. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387>
2020-10-19i965: Silence unused parameter warningsIan Romanick1-1/+1
src/mesa/drivers/dri/i965/intel_screen.c: In function ‘brw_driconf_get_xml’: src/mesa/drivers/dri/i965/intel_screen.c:103:33: warning: unused parameter ‘driver_name’ [-Wunused-parameter] 103 | brw_driconf_get_xml(const char *driver_name) | ~~~~~~~~~~~~^~~~~~~~~~~ src/mesa/drivers/dri/i965/intel_screen.c: In function ‘intel_unmap_image’: src/mesa/drivers/dri/i965/intel_screen.c:882:33: warning: unused parameter ‘context’ [-Wunused-parameter] 882 | intel_unmap_image(__DRIcontext *context, __DRIimage *image, void *map_info) | ~~~~~~~~~~~~~~^~~~~~~ src/mesa/drivers/dri/i965/intel_screen.c:882:54: warning: unused parameter ‘image’ [-Wunused-parameter] 882 | intel_unmap_image(__DRIcontext *context, __DRIimage *image, void *map_info) | ~~~~~~~~~~~~^~~~~ src/mesa/drivers/dri/i965/intel_screen.c: In function ‘intelReleaseBuffer’: src/mesa/drivers/dri/i965/intel_screen.c:2904:33: warning: unused parameter ‘dri_screen’ [-Wunused-parameter] 2904 | intelReleaseBuffer(__DRIscreen *dri_screen, __DRIbuffer *buffer) | ~~~~~~~~~~~~~^~~~~~~~~~ src/mesa/drivers/dri/i965/brw_context.c: In function ‘brw_set_background_context’: src/mesa/drivers/dri/i965/brw_context.c:144:58: warning: unused parameter ‘queue_info’ [-Wunused-parameter] 144 | struct util_queue_monitoring *queue_info) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7167>
2020-10-06i965: drop likely/unlikely around INTEL_DEBUGMarcin Ślusarz1-3/+3
It's included in declaration of INTEL_DEBUG. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6732>
2020-08-18driconf: Support selection by Vulkan applicationName.Bas Nieuwenhuizen1-1/+1
This adds applicationName + version through like engineName. Rationale: A game (World War Z) includes the store name in the executable name, so has multiple executable names. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6120>
2020-08-08i965: add support for force_gl_vendorTimothy Arceri1-0/+5
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3363 Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6198>
2020-07-15mesa: add bool param to _mesa_free_context_dataPierre-Eric Pelloux-Prayer1-1/+1
The param controls whether _mesa_destroy_debug_output should be called or not. No functional changes; this will be used by the next commit. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5789>
2020-05-27iris, i965: Update limits for ARB_compute_variable_group_sizeCaio Marcelo de Oliveira Filho1-15/+6
The CS compiler now produces multiple SIMD variants, so the previous trade-off between "always using SIMD32" and "having a smaller max invocations" is now gone. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-05mesa: extend GLSLZeroInit semanticsPierre-Eric Pelloux-Prayer1-1/+1
This commit introduces a new way to zero-init variables but keep the old one to not break any existing behavior. With this change GLSLZeroInit becomes an integer, with the following possible values: - 0: no 0 init - 1: current behavior - 2: new behavior. Similar to 1, except ir_var_function_out type are 0 initialized but ir_var_shader_out. The rationale behind 2 is: zero initializing ir_var_shader_out can prevent some optimization where out variables are completely eliminated when not written to. On the other hand, zero initializing "ir_var_function_out" has no effect on correct shaders but typically helps shadertoy since the main function is: void mainImage(out vec4 fragColor) { ... } So with this change we're sure that fragColor will always get a value. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>
2020-04-22meta,i965: Rip GL_EXT_texture_multisample_blit_scaled support out of metaJason Ekstrand1-8/+0
i965 is the only driver that ever linked to this code and it's been doing it in BLORP for a long time now. The only possible case where it would have fallen back to meta was for depth/stencil but that should have ended starting with 6cec618e82aa2. Rip out the dead code. Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4622>
2020-04-21remove final imports.h and imports.c bitsDylan Baker1-1/+0
This moves the fi_types to a new mesa_private.h and removes the imports.c file. The vast majority of this patch is just removing pound includes of imports.h and fixing up the recursive includes. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
2020-04-21replace imports memory functions with utils memory functionsDylan Baker1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
2020-04-09i965: Implement ARB_compute_variable_group_sizePlamena Manolova1-0/+18
This patch adds the implementation of ARB_compute_variable_group_size for i965. We do this by storing the local group size in a push constant. Additional changes made by Caio Marcelo de Oliveira Filho. Signed-off-by: Plamena Manolova <plamena.manolova@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
2020-03-27Move compiler.h and imports.h/c from src/mesa/main into src/utilMarek Olšák1-1/+1
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
2020-02-13i965: enable INTEL_blackhole_renderLionel Landwerlin1-0/+26
v2: condition the extension on context isolation support from the kernel (Chris) v3: (Lionel) The initial version of this change used a feature of the Gen7+ command parser to turn the primitive instructions into no-ops. Unfortunately this doesn't play well with how we're using the hardware outside of the user submitted commands. For example resolves are implicit operations which should not be turned into no-ops as part of the previously submitted commands (before blackhole_render is enabled) might not be disabled. For example this sequence : glClear(); glEnable(GL_BLACKHOLE_RENDER_INTEL); glDrawArrays(...); glReadPixels(...); glDisable(GL_BLACKHOLE_RENDER_INTEL); While clear has been emitted outside the blackhole render, it should still be resolved properly in the read pixels. Hence we need to be more selective and only disable user submitted commands. This v3 manually turns primitives into MI_NOOP if blackhole render is enabled. This lets us enable this feature on any platform. v4: Limit support to gen7.5+ (Lionel) v5: Enable Gen7.5 support again, requires a kernel update of the command parser (Lionel) v6: Disable Gen7.5 again... Kernel devs want these patches landed before they accept the kernel patches to whitelist INSTPM (Lionel) v7: Simplify change by never holding noop (there was a shortcoming in the test not considering fast clears) Only program register using MI_LRI (Lionel) v8: Switch to software managed blackhole (BDW hangs on compute batches...) v9: Simplify the noop state tracking (Lionel) v10: Don't modify flush function (Ken) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v8) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2964>