summaryrefslogtreecommitdiff
path: root/src/mesa/main/config.h
AgeCommit message (Collapse)AuthorFilesLines
2023-08-04Revert "mesa, compiler: Move gl_texture_index to glsl_types.h"Faith Ekstrand1-0/+3
This reverts commit 1b836a52ea2dcc0b77a48a2a3d1f9052321cf325. This patch, while claiming to decouple things, actually increases coupling because it leaks two OpenGL state tracker limits and an OpenGL state tracker fixed binding enum into the entire compiler. Nothing wants to know these outside the OpenGL state tracker and the GL-specific compiler passes. Put them back where they were. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24491>
2023-06-07mesa, compiler: Move gl_texture_index to glsl_types.hYonggang Luo1-3/+0
This move is done for decouple glsl_types.h from src/mesa/* This is achieved by move gl_texture_index from src/mesa/main/menums.h to src/compiler/shader_enums.h And move ATOMIC_COUNTER_SIZE,MAX_VERTEX_STREAMS from src/mesa/main/config.h to src/compiler/shader_enums.h Move include main/[config|menums].h into glsl/glsl_parser_extras.h from glsl_types.h As now glsl_types.h should not include headers from src/mesa/* Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23420>
2022-06-06mesa: add hw select name stack code pathQiang Yu1-0/+4
HW code path will not flush vertex whenever name stack change. It will save the current name stack and write to select buffer only when no space left or exit select mode. This let us submit multi draws from different name stack at once instead of submit draws for a single name stack then wait it finish before submit next one. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
2021-04-13compiler: move TEXTURE_COORD/VERTEX_GENERIC_ATTRIB limits into shader_enums.hMarek Olšák1-8/+0
because they are used there. Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050>
2020-12-08mesa: remove MAX_3D_TEXTURE_LEVELS, MAX_CUBE_TEXTURE_LEVELSMarek Olšák1-7/+1
they are redundant with MAX_TEXTURE_LEVELS Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7956>
2019-09-27shader_enums: Move MAX_DRAW_BUFFERS to this file.Eric Anholt1-6/+1
We include shader_enums.h from freedreno's compiler for both GL and Vulkan, and the main/config.h include resulted in polluting the namespace with things like MAX_VIEWPORTS that other Vulkan drivers use as their driver-specific maximums. Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2018-08-24Revert "mesa: bump GL_MAX_ELEMENTS_INDICES and GL_MAX_ELEMENTS_VERTICES"Kenneth Graunke1-3/+0
This reverts commit 095515e16ca3cb2c9f1813b6602ee57ae28325a8. This breaks KHR-GL46.map_buffer_alignment.functional on i965. This code was apparently not reviewed and I don't know why we would move from a driver configurable constant to a hardcoded value for all drivers. This really looks like an accidental hack push.
2018-08-24Revert recent changes about not including compute in combined limits.Kenneth Graunke1-13/+9
As far as I can tell, no one reviewed these changes, they made i965 assert fail on driver load, and I am not certain they are correct. (Hopefully reverting these does not break radeonsi too badly...) The uniform related changes seem fine and reasonable, but the texture image units change is possibly incorrect. According to the OES_tessellation_shader spec issue 5: (5) How are aggregate shader limits computed? RESOLVED: Following the GL 4.4 model, but we restrict uniform buffer bindings to 12/stage instead of 14, this results in MAX_UNIFORM_BUFFER_BINDINGS = 72 This is 12 bindings/stage * 6 shader stages, allowing a static partitioning of the bindings even though at most 5 stages can appear in a program object). MAX_COMBINED_UNIFORM_BLOCKS = 60 This is 12 blocks/stage * 5 stages, since compute shaders can't be mixed with other stages. MAX_COMBINED_TEXTURE_IMAGE_UNITS = 96 This is 16 textures/stage * 6 stages. which definitely is including compute shaders in that last limit. Not including compute shaders breaks the following test: dEQP-GLES31.functional.state_query.integer.max_combined_texture_image_units_getinteger There was enough breakage that I figured we should just send this back to the drawing board. Revert "i965: don't include compute resources in "Combined" limits" Revert "st/mesa: don't include compute resources in "Combined" limits" Revert "mesa: don't include compute resources in MAX_COMBINED_* limits" This reverts commit b03dcb1e5f507c5950d0de053a6f76e6306ee71f. This reverts commit cff290df4c09547cd2cb3b129ec59bdebdadba90. This reverts commit 45f87a48f94148b484961f18a4f1ccf86f066b1c.
2018-08-23mesa: don't include compute resources in MAX_COMBINED_* limitsMarek Olšák1-9/+13
5 is the maximum number of shader stages that can be used by 1 execution call at the same time (e.g. a draw call). The limit ensures that each stage can use all of its binding points. Compute is separate and doesn't need the 5x multiplier. Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-08-23mesa: bump GL_MAX_ELEMENTS_INDICES and GL_MAX_ELEMENTS_VERTICESMarek Olšák1-0/+3
same number as our closed GL driver v2: don't use MaxArrayLockSize Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-06-14mesa: add support for ARB_sample_locationsRhys Perry1-0/+9
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)
2016-11-11mesa/compiler: move MAX_VARYING to shader_enums.hKenneth Graunke1-1/+0
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-06-18mesa: add GL_EXT_window_rectangles state storage/retrieval functionalityIlia Mirkin1-2/+5
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Brian Paul <brianp@vmware.com>
2016-03-02main: remove MAX_VIEWPORT_WIDTH and MAX_VIEWPORT_HEIGHT constantsSamuel Iglesias Gonsálvez1-5/+0
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-02-13mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZESamuel Pitoiset1-5/+0
This will allow to query the underlying drivers for the maximum total storage size of all variables declared as <shared> with PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-02-13mesa: make compute maximums reflect driver-provided valuesIlia Mirkin1-6/+0
Looks like the various max's were never plumbed through. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-11-26mesa: remove ARB_geometry_shader4Marta Lofstedt1-1/+1
No drivers currently implement ARB_geometry_shader4, nor are there any plans to implement it. We only support the version of geometry shaders that was incorporated into OpenGL 3.2 / GLSL 1.50. Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-09-25mesa: set MAX_SHADER_STORAGE_BUFFERS to 16.Samuel Iglesias Gonsalvez1-1/+1
v2: - Set the value to 16 and drop the comment. (Kristian) Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2015-07-23mesa: Add glGet support for ARB_shader_subroutine implementation limitsChris Forbes1-0/+6
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-23mesa: add tessellation shader state and limitsChris Forbes1-0/+8
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-07-14mesa: Add shader storage buffer support to struct gl_contextIago Toral Quiroga1-0/+2
This includes the array of bindings, the current buffer bound to the GL_SHADER_STORAGE_BUFFER target and a set of general limits and default values for shader storage buffers. v2: - Use spec values for the new defined constants (Jordan) Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-06-09mesa: remove some MAX_NV_FRAGMENT_PROGRAM_* macrosBrian Paul1-11/+2
GL_NV_fragment_program support was removed a while ago. This is just some clean-up. Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-17mesa: Add support for the ARB_pipeline_statistics_query extensionBen Widawsky1-0/+3
This was originally part of a single patch which added the extension, and implemented it for i965 classic. For information about the evolution of the patch, please see the subsequent commit. One difference here as compared to the original mega patch is this does build support for the compute shader query. Since it cannot be tested on any platform, it will always return NULL for now. Jordan has already written a patch to address this, and when that patch lands, this logic can be modified. v2: Fix typo in subject (Brian Paul) Add checks for desktop gl (Ilia) Fail for any callers for now (Ilia) Update QueryCounterBits for new tokens (Ilia) Jordan: Use _mesa_has_compute_shaders Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> v3: Rebased on patch which adds the proper information to unstub tessellation shaders. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-10mesa: Bump MAX_IMAGE_UNIFORMS to 32.Francisco Jerez1-1/+1
So the i965 driver can expose 32 image uniforms per shader stage. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-07-27main/cs: Add additional compute shader constant valuesJordan Justen1-0/+11
With MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader, this fixes piglit: * arb_compute_shader-minmax Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2014-05-02mesa: Add core support for the GL_INTEL_performance_query extension.Petri Latvala1-0/+8
Like AMD_performance_monitor, this extension provides an interface for applications (and OpenGL-based tools) to access GPU performance counters. Since the exact performance counters available vary between vendors and hardware generations, the extension provides an API the application can use to get the names, types, and minimum/maximum values of all available counters. Applications create performance queries based on available query types, and begin/end measurement collection. Multiple queries can be measuring simultaneously. v2: Whitespace changes v3: src/mapi/glapi/gen/gl_API.xml: Also expose the functions to GLES2. v4: Whitespace changes, static_dispatch="false" for all functions, fix dispatch_sanity test for GLES2 functions Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-06main/get: support ARB_gpu_shader5Jordan Justen1-0/+9
If a driver enables ARB_gpu_shader5 and sets Const.MaxVertexSteams >= 4, then piglit's arb_gpu_shader5-minmax test should now pass. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-01-22mesa: Bump MAX_TEXTURE_IMAGE_UNITS to 32.Kenneth Graunke1-1/+1
This allows drivers to optionally support more than 16 texture units. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2014-01-20mesa: Add new constants related to GL_ARB_viewport_arrayIan Romanick1-0/+3
These limits will be queryable by GL_MAX_VIEWPORTS, GL_VIEWPORT_SUBPIXEL_BITS, and GL_VIEWPORT_BOUNDS_RANGE. Drivers that actually implement the extension must set values for these constants that comply with the minimum-maximums from the spec. Most of these changes were part of other patches. They were separated out because it make reordering of later patches easier. Also, MaxViewports wasn't set by that patch, and I completely overlooked it in review. It's now obvious that it's set. :) v2 (idr): Split these changes out from the original patches. Keep MaxViewportWidth and MaxViewportHeight as GLuint. Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-01-15mesa: Add state data structures required for ARB_shader_image_load_store.Francisco Jerez1-0/+3
v2: Increase MAX_IMAGE_UNITS to what i965 wants and add a separate MAX_IMAGE_UNIFORMS define, clarify a couple of comments. Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-10-29mesa: Add support for ARB_shader_atomic_counters.Francisco Jerez1-0/+5
This patch implements the common support code required for the ARB_shader_atomic_counters extension. It defines the necessary data structures for tracking atomic counter buffer objects (from now on "ABOs") associated with some specific context or shader program, it implements support for binding buffers to an ABO binding point and querying the existing atomic counters and buffers declared by GLSL shaders. v2: Fix extension checks. Drop unused MAX_ATOMIC_BUFFERS constant. Acked-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-09-04mesa: Add some constants and state variables for KHR_debug functionsTimothy Arceri1-1/+6
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-06-05mesa: remove outdated version lines in commentsRico Schüller1-1/+0
Signed-off-by: Brian Paul <brianp@vmware.com>
2013-06-04mesa: change MAX_PROGRAM_ADDRESS_REGS to 1, clamp to it in state trackerBrian Paul1-1/+1
We've never properly supported more than one address register. There isn't even a field in prog_src_register or prog_dst_register to indicate which address register to use if RelAddr!=0. In the state tracker, clamp MaxAddressRegs against MAX_PROGRAM_ADDRESS_REGS since many gallium drivers do support more. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65226 Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-28mesa: declare UniformBufferBindings as an array with a static sizeMarek Olšák1-0/+3
Some Gallium drivers were crashing, because the array was not large enough. v2: clamp the per-shader maximum in st/mesa, then sum them all up NOTE: This is a candidate for the stable branches.
2013-05-11mesa: remove unused gl_constants::MaxColorTableSizeMarek Olšák1-3/+0
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-05-11mesa: unify MaxVertexVaryingComponents and MaxGeometryVaryingComponentsMarek Olšák1-2/+0
The limits should not be different and OpenGL requires both to be at least 32, which is also the maximum limit on radeon. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-05-11mesa: consolidate definitions of max texture image unitsMarek Olšák1-4/+2
Shaders are unified on most hardware (= same limits in all stages). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-23mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke1-3/+4
The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-23mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke1-1/+1
This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-23mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke1-1/+1
Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-29mesa: bump MAX_VARYING to 32Marek Olšák1-1/+1
We're starting to get apps utilizing more than 16 varyings and most current hardware supports 32 anyway. Tested with r600g. swrast, softpipe and llvmpipe still advertise 16 varyings. This fixes a WebGL crash after launching this demo: https://developer.mozilla.org/en-US/demos/detail/falling-cubes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54402 NOTE: This is a candidate for the stable branches. Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-15mesa: Remove defines for NV_vertex_program limits.Eric Anholt1-9/+0
Note that _mesa_GetVertexAttribPointervNV() is actually glGetVertexAttribPointerv(), which operates on the generic attributes. The geometry shader initialization looks like arbitrary cruft to me. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-28mesa: rename MaxTransformFeedbackSeparateAttribs to MaxTransformFeedbackBuffersMarek Olšák1-0/+1
This is a cleanup for ARB_transform_feedback3, where GL_MAX_TRANSFORM_FEEDBACK_BUFFERS is introduced for interleaved attribs and has the same meaning as GL_MAX_.._SEPARATE_ATTRIBS for separate attribs. Also, the maximum number of TFB buffers is reduced from 32 to 4, which makes this patch useful even without the extension. I don't know of any hardware which can do more than 4. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-10mesa: add infrastructure for GL_ARB_debug_outputnobled1-0/+6
Marek v2: don't add the extension to extensions.c yet
2012-02-24mesa: move more swrast-related #defines out of core MesaBrian Paul1-40/+0
2012-02-24mesa: remove last of MAX_WIDTH, MAX_HEIGHTBrian Paul1-9/+4
Define new MAX_VIEWPORT_WIDTH/HEIGHT and MAX_RENDERBUFFER_SIZE values instead.
2012-02-24mesa: remove some cruft from config.hBrian Paul1-16/+1
2012-02-24mesa: minor comment clean-ups in config.hBrian Paul1-4/+4
2012-02-24mesa: remove WIN32 MAX_WIDTH work-around in config.hBrian Paul1-17/+0
There aren't any more stack-allocated arrays dimensioned by MAX_WIDTH so there shouldn't be any more stack overflows.