summaryrefslogtreecommitdiff
path: root/src/mesa/main/samplerobj.h
AgeCommit message (Collapse)AuthorFilesLines
2020-12-01mesa: reorganize gl_texture and sampler structures for glPush/PopAttribMarek Olšák1-1/+1
Put the fields saved by glPush/PopAttrib into the sub-structure declared as Attrib. This will make glPush/PopAttrib much faster because it will only save and restore that structure. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
2017-07-31mesa: add KHR_no_error support to glDeleteSamplers()Samuel Pitoiset1-0/+5
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31mesa: add KHR_no_error support to glBindSampler()Samuel Pitoiset1-0/+4
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31mesa: add KHR_no_error support to glBindSamplers()Samuel Pitoiset1-0/+5
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for gl*Samplers()Samuel Pitoiset1-0/+7
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2016-03-09mesa/main: do not wrap header inclusion in extern "C"Emil Velikov1-4/+2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-01-11mesa: Refator _mesa_BindSampler to make _mesa_bind_samplerIan Romanick1-0/+4
Pulls the parts of _mesa_BindSampler that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11mesa: Add _mesa_set_sampler_srgb_decode methodIan Romanick1-0/+4
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11mesa: Add _mesa_set_sampler_filters methodIan Romanick1-0/+5
v2: Add filter enum assertions. Suggested by Jason. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11mesa: Add _mesa_set_sampler_wrap methodIan Romanick1-0/+4
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2015-04-01mesa: remove unneeded #include of colormac.hBrian Paul1-0/+3
Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2015-03-25main: Added entry point for glCreateSamplersMartin Peres1-0/+2
Because of the current way the code is architectured, there is no functional difference between the DSA and the non-DSA path. Reviewed-by: Laura Ekstrand <laura@jlekstrand.net> Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
2014-12-16mesa: put extern "C" in header filesBrian Paul1-0/+9
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-05-02glapi: Add infrastructure for ARB_multi_bindFredrik Höglund1-0/+2
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.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>
2013-03-07mesa: fix glGetInteger*(GL_SAMPLER_BINDING).Alan Hourihane1-0/+2
If the sampler object has been deleted on another context, an alternative context may reference the old sampler. So ensure the sampler object still exists. Note: this is a candidate for the stable branch. Signed-off-by: Alan Hourihane <alanh@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21mesa: Initially populate the display list with the exec list.Eric Anholt1-4/+0
This cuts out a ton of code to make functions not set to a save_ variant match. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-02mesa: Mark _mesa_{init,delete}_sampler_object as staticMatt Turner1-7/+0
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-06dispatch: Make all API functions non-static.Paul Berry1-8/+25
Some of the functions that we store in the dispatch table are declared as non-static in their .c files and are inserted into the dispatch table directly by _mesa_create_exec_table(). Other functions are declared as static, and are inserted into the dispatch table by a dedicated function that lives in the same .c file (e.g. _mesa_loopback_init_api_table() in api_loopback.c). This patch makes all of these functions non-static, and creates appropriate prototypes for them, so that in future patches we can populate the entire dispatch table using a single code-generated function. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-10-23_mesa_create_exec_table: GLES3 fixes.Paul Berry1-1/+2
This patch sets up the dispatch table for the following GLES3 functions when a GLES3 context is in use: - BeginQuery - BeginTransformFeedback - BindSampler - BindTransformFeedback - BlitFramebuffer - ClearBufferfi - ClearBufferfv - ClearBufferiv - ClearBufferuiv - ClientWaitSync - CopyBufferSubData - DeleteQueries - DeleteSamplers - DeleteSync - DeleteTransformFeedbacks - EndQuery - EndTransformFeedback - FenceSync - FramebufferTextureLayer - GenQueries - GenSamplers - GenTransformFeedbacks - GetInteger64v - GetQueryObjectuiv - GetQueryiv - GetSamplerParameterfv - GetSamplerParameteriv - GetStringi - GetSynciv - GetTransformFeedbackVarying - GetVertexAttribIiv - GetVertexAttribIuiv - IsQuery - IsSampler - IsSync - IsTransformFeedback - PauseTransformFeedback - RenderbufferStorageMultisample - ResumeTransformFeedback - SamplerParameterf - SamplerParameterfv - SamplerParameteri - SamplerParameteriv - TransformFeedbackVaryings - VertexAttribDivisor - VertexAttribIPointer - WaitSync And it avoids setting up the dispatch table for these non-GLES3 functions: - ColorMaski - GetBooleani_v - Enablei - Disablei - IsEnabledi - ClearColorIiEXT - ClearColorIuiEXT - TextureStorage2DEXT - TextureStorage3DEXT - GetActiveUniformName - GetnUniformdv - GetnUniformfv - GetnUniformiv - GetnUniformuiv Reviewed-by: Brian Paul <brianp@vmware.com> v2: Make the ctx argument to _mesa_init_transform_feedback_dispatch() a const pointer. Add a comment to remind us to add GetBufferParameteri64v once tests exist for it. Also add VertexAttribDivisor for GLES3, and remove GetActiveUniformName and GetnUniform{dv,fv,iv,uiv} for GLES3. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-08-12mesa/samplerobj: Avoid crash in sampler query if texture unit is disabledPauli Nieminen1-1/+3
Sampler queries are so far made only for enabled texture unit. But if any code would query sampler before checking texture unit state that would result to NULL deference. Making the inline helper easier to use with NULL check makes a lot sense because compiler is likely to combine the checks for the current texture. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-01mesa: Allow meta module to call sampler functionsPauli Nieminen1-0/+11
To allow meta module to use sample objects mesa GL functions need to be visible and linkable for meta module. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20mesa: add _mesa_is_mipmap_filter() helperBrian Paul1-0/+9
Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20mesa: make _mesa_reference_sampler_object() an inline functionBrian Paul1-1/+11
To make the no-change case faster, as we do for the other object-reference functions. Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-01mesa: s/INLINE/inline/Brian Paul1-1/+1
INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2011-04-23intel: Add support for ARB_sampler_objects.Eric Anholt1-0/+8
This extension support consists of replacing "gl_texture_obj->Sampler." with "_mesa_get_samplerobj(ctx, unit)->". One instance of referencing the texture's base sampler remains in the initial miptree allocation, where I'm not sure we have a clear association with any texture unit. Tested with piglit ARB_sampler_objects/sampler-objects. Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-10mesa: new code/functions for GL_ARB_sampler_objectsBrian Paul1-0/+54
This implements the infrastructure for sampler objects and all the new API functions.