History log of /external/mesa3d/src/mesa/program/program.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5ceedefd6c32fa31e6a35831a8a7a315e009ccc3 09-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> mesa/glsl: remove hack to reset sampler units to zero

Now that we have the is_arb_asm flag we can just skip the
initialisation.

V2: remove hack from standalone compiler where it was never
needed since it only compiles glsl shaders.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
f584f3821426955b94f36c77191edcfe1b1cc7d5 09-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> st/mesa/glsl: add new is_arb_asm flag in gl_program

Set the flag via the _mesa_init_gl_program() and NewProgram()
helpers.

In i965 we currently check for the existance of gl_shader_program
to decide if this is an ARB assembly style program or not.

Adding a flag makes the code clearer and will help removes a
dependency on gl_shader_program in the i965 codegen functions.

Also this will allow use to skip initialising sampler units for
linked shaders, we currently memset it to zero again during linking.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
68245aa6f5f832ba3066fb65050ff79ad3e5531c 20-Dec-2016 Timothy Arceri <timothy.arceri@collabora.com> glsl/mesa: add reference to gl_shader_program_data from gl_program

We also add the stubs for the standalone compiler in this change.

By adding a reference here we can now refactor some code to use
gl_program where we were previously awkwardly using gl_shader_program.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
0de6f6223ab917ec532e3fe3afd14f8f5cd3b87b 31-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> mesa/compiler: add stage to shader_info

This will allow us to simplify the current program logic for SSO.

Also since we aim to detach shader_info from nir_shader this will come
in handy avoiding passing nir_shader around just to keep track of
the stage we are dealing with.

V2: set stage for arb asm programs also.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
c3df65c123c6392b0b116900395a89fd3dbb9b85 17-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> st/mesa/r200/i915/i965: move ARB program fields into a union

It's common for games to compile 2000 programs or more so at

32bits x 2000 programs x 22 fields x 2 (at least) stages

This should give us something like 352 kilobytes in savings
once we add some more glsl only fields.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/mesa/program/program.c
0ad69e6b51b06c483db37c3b7eeb1da1a95d0629 05-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> mesa: make use of ralloc when creating ARB asm gl_program fields

This will allow us to move the ARB asm fields in gl_program into
a union as we will be able call ralloc_free() on the entire struct
when destroying the context.

In this change we switch over to using ralloc for the Instructions,
String and LocalParams fields of gl_program.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/mesa/program/program.c
cc6aa1d161280f10ded7834d1ec2413bc97589fe 02-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> st/mesa/r200/i915/i965: use rzalloc() to create gl_program

This allows us to use ralloc_parent() to see which data structure owns
shader_info which allows us to fix a regression in nir_sweep().

This will also allow us to move some fields from gl_linked_shader to
gl_program, which will allow us to do some clean-ups like storing
gl_program directly in the CurrentProgram array in gl_pipeline_object
enabling some small validation optimisations at draw time.

Also it is error prone to depend on the gl_linked_shader for
programs in current use because a failed linking attempt will free
infomation about the current program. In i965 we could be trying
to recompile a shader variant but may have lost some required fields.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
4016f08854a41b50d7636fc5e3cf0dfab5029cab 20-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> glsl/st/mesa: use common system values read field

And set system values read directly in shader_info.

st/mesa changes where:
Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
3423488d55b9c483fcdb3996eb89b424c1031d24 19-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> st/mesa/r200/i915/i965: eliminate gl_fragment_program

Here we move OriginUpperLeft and PixelCenterInteger into gl_program
all other fields have been replace by shader_info.

V2: Don't use anonymous union/structs to hold vertex/fragment fields
suggested by Ian.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
17e28a1571b6141368fefc84cc8b0a3b4e52f8ee 19-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> i965/mesa/st/swrast: set fs shader_info directly and switch to using it

Note we access shader_info from the program struct rather than the
nir_shader pointer because shader cache won't create a nir_shader.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
9605b98a078654f6f76e85221599e5fa8c073de6 18-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> i965/mesa/st: eliminate gl_compute_program

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
81faead818a0b2fde131df019f5dfb0baef49273 18-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> mesa/i965/i915/r200: eliminate gl_vertex_program

Here we move the only field in gl_vertex_program to the
ARB program fields in gl_program.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
92f77e9c01085c6babe6ce80dfe4e0e7abab61a1 19-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> i965/mesa/st: eliminate gl_geometry_program

We now get all the gs metadata from shader_info.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
67c2d80a839614e4638d6cff390627122f8148ca 19-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> i965/mesa/st: eliminate gl_tess_eval_program

We now get all the tes metadata from shader_info.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
64d9773cfebded42691a70e3b233cadf896e53ba 19-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> i965/mesa/st: eliminate gl_tess_ctrl_program

We now get all the tcs metadata from shader_info.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/program/program.c
de2ef0401b197f176998e10848dc0822b8a047d7 02-Mar-2016 Matt Turner <mattst88@gmail.com> program: Drop GL_FRAGMENT_PROGRAM_NV from switch statement.
/external/mesa3d/src/mesa/program/program.c
beac7b1b8b0a74bbf0ef76e681a31c98e9250e55 31-Jan-2016 Ilia Mirkin <imirkin@alum.mit.edu> mesa: use geometric helper for computing min samples

In case we have a draw buffer without attachments, we should be looking
at the default number of samples.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
/external/mesa3d/src/mesa/program/program.c
bcb56c2c69dd1695d7828d831d71c957e7e497c6 13-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> program: convert _mesa_init_gl_program() to take struct gl_program *

Rather than accepting a void pointer, only to down and up cast around
it, convert the function to take the base (struct gl_program) pointer.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/mesa/program/program.c
9abbf65d0ae8bd3e1e50d4bdfdf0d80191ace9aa 14-Oct-2015 Brian Paul <brianp@vmware.com> mesa: remove unused functions in program.c

replace_registers() and adjust_param_indexes() were unused.

Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/program/program.c
d695c676ea61f48f121969462ece708b739a02c0 05-Oct-2015 Marek Olšák <marek.olsak@amd.com> program: remove _mesa_init_*_program wrappers

They didn't do anything useful.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
092f0427dcc15e36666f24c817957727632ed377 05-Oct-2015 Marek Olšák <marek.olsak@amd.com> program: remove other unused functions

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
5042a3eef8d4e4314d0463b83d267875fd3dd910 05-Oct-2015 Marek Olšák <marek.olsak@amd.com> program: remove unused cloning and combining functions

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
c947a3a4c4fbd210fd19a78d7b07ccfdd6f03812 05-Oct-2015 Marek Olšák <marek.olsak@amd.com> program: remove unused function _mesa_find_line_column

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
1dd943d7fb5bd374e871436ccf6546327687c761 30-Jul-2015 Matt Turner <mattst88@gmail.com> mesa: Add locking to programs.

Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
d4b0e0b717b698682700bf1cd9d448043a57701d 10-Jun-2015 Matt Turner <mattst88@gmail.com> mesa: Remove debugging code from _mesa_reference_*.

Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
a894ed82931840713aac25634ed469ac65889bfa 10-Mar-2014 Fabian Bieler <fabianbieler@fastmail.fm> mesa: add misc tessellation shader support

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/program.c
78d3054980edd1a12e56ad0362e889915cff335b 07-Mar-2014 Fabian Bieler <fabianbieler@fastmail.fm> mesa: add tessellation shader init functions.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
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>
/external/mesa3d/src/mesa/program/program.c
4312b4f5704ddd88e27b3bf2c17eaf054567f067 28-May-2015 Marek Olšák <marek.olsak@amd.com> mesa: use GL_GEOMETRY_PROGRAM_NV instead of MESA_GEOMETRY_PROGRAM

There's no reason to use our own definition.
Tessellation will use the NV definitions too.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
b7ef7903b8f582438172ef1bdc72788be3aa0860 28-May-2015 Marek Olšák <marek.olsak@amd.com> mesa: remove useless gl_compute_program_state::Current

This is for user assembly shaders only (not GLSL). We won't support those.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
e8b040477e271324a88d35c003775337848a500c 28-May-2015 Marek Olšák <marek.olsak@amd.com> mesa: remove unused geometry shader variables

These states are for GS assembly shaders only. We don't support those.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
abb049dab6155ee4994cf7df88b7913897078dff 11-Jan-2014 Paul Berry <stereotype441@gmail.com> mesa/cs: Update program.c for compute shaders.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/program.c
89c1feb78d010bc457f5d02be84c955eebf3549f 08-Apr-2015 Kenneth Graunke <kenneth@whitecape.org> i965: Create NIR during LinkShader() and ProgramStringNotify().

Previously, we translated into NIR and did all the optimizations and
lowering as part of running fs_visitor. This meant that we did all of
that work twice for fragment shaders - once for SIMD8, and again for
SIMD16. We also had to redo it every time we hit a state based
recompile.

We now generate NIR once at link time. ARB programs don't have linking,
so we instead generate it at ProgramStringNotify time.

Mesa's fixed function vertex program handling doesn't bother to inform
the driver about new programs at all (which is rather mean), so we
generate NIR at the last minute, if it hasn't happened already.

shader-db runs ~9.4% faster on my i7-5600U, with a release build.

v2: Check NirOptions != NULL in ProgramStringNotify(). Don't bother
using _mesa_program_enum_to_shader_stage as we already know it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
/external/mesa3d/src/mesa/program/program.c
d7193ce42cedc4cc7839fc4522edf5724e954c80 07-Mar-2015 Brian Paul <brianp@vmware.com> mesa: use strdup() instead of _mesa_strdup()

We were already using strdup() in various places in Mesa. Get rid
of the _mesa_strdup() wrapper. All the callers pass a non-NULL
argument so the NULL check isn't needed either.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/program.c
bfcdb843830bba0190e00e35e3c5c18c4bdb5de1 21-Feb-2015 Matt Turner <mattst88@gmail.com> mesa: Use assert() instead of ASSERT wrapper.

Acked-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
941269f89c147a606787a10e41959ede98da5df6 28-Aug-2014 Kenneth Graunke <kenneth@whitecape.org> mesa: Delete ctx->GeometryProgram.Cache.

The VertexProgram and FragmentProgram have a Cache member for dealing
with fixed function programs. There are no fixed function geometry
programs, so this should never have existed, and was just copy and
pasted.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
dd8f15a5533cf2847c8039b626cdc7ee18b1eccf 08-Aug-2014 Brian Paul <brianp@vmware.com> mesa: whitespace, 80-column wrapping in program.c

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/mesa/program/program.c
d8f7577d5f018d84e4f474df05b2a20cf70c0479 08-Aug-2014 Brian Paul <brianp@vmware.com> mesa: simplify/rename _mesa_init_program_struct()

No need to return a value. Remove unused ctx parameter. Remove
_mesa_ prefix since it's static.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/mesa/program/program.c
6d3632c9c9c58f8fe1bae26871432342ccaaaf4b 06-Jun-2014 Iago Toral Quiroga <itoral@igalia.com> glsl: Store info about geometry shaders that emit vertices to non-zero streams.

On Intel hardware when a geometry shader outputs GL_POINTS primitives we
only need to emit vertex control bits if it emits vertices to non-zero
streams, so use a flag to track this.

This flag will be set to TRUE when a geometry shader calls EmitStreamVertex()
or EndStreamPrimitive() with a non-zero stream parameter in a later patch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/program.c
96a95f48eaf8af2c6ace51531bdd5bfbcf71165e 16-Jun-2014 Iago Toral Quiroga <itoral@igalia.com> mesa: Copy Geom.UsesEndPrimitive when cloning a geometry program.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/mesa/program/program.c
d129ea7fa2e57288f64cd247a0ac6d876e1717d2 01-Mar-2014 Brian Paul <brianp@vmware.com> mesa: switch to c11 mutex functions

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/program/program.c
86d6b5546b75ac7d5eedc26c14f579a4bfb40406 25-Jan-2014 Jordan Justen <jordan.l.justen@intel.com> mesa: initialize gl_geometry_program Invocations field

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
/external/mesa3d/src/mesa/program/program.c
47d480e3e4850ef8934775570444feea503295d7 08-Jan-2014 Paul Berry <stereotype441@gmail.com> mesa/cs: Create the gl_compute_program struct, and the code to initialize it.

Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/program/program.c
3313cc269bd428ca96a132d86da5fddc0f27386a 13-Jan-2014 Anuj Phogat <anuj.phogat@gmail.com> i965: Add an option to ignore sample qualifier

This will be useful in my next patch which depends on a functionality
of _mesa_get_min_invocations_per_fragment() to ignore the sample
qualifier (prog->IsSample) based on a flag passed to it.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
/external/mesa3d/src/mesa/program/program.c
b539385789a95074cc53c9e16988d2384ec5c7de 08-Jan-2014 Paul Berry <stereotype441@gmail.com> mesa: Index into ctx->Const.Program[] rather than using ad-hoc code.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/program.c
84732a982c3eeaca2e2809532c8422dc5f7045c1 08-Jan-2014 Paul Berry <stereotype441@gmail.com> mesa: replace ctx->Const.{Vertex,Fragment,Geomtery}Program with an array.

These are replaced with
ctx->Const.Program[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In
patches to follow, this will allow us to replace a lot of ad-hoc logic
with a variable index into the array.

With the exception of the changes to mtypes.h, this patch was
generated entirely by the command:

find src -type f '(' -iname '*.c' -o -iname '*.cpp' -o -iname '*.py' \
-o -iname '*.y' ')' -print0 | xargs -0 sed -i \
-e 's/Const\.VertexProgram/Const.Program[MESA_SHADER_VERTEX]/g' \
-e 's/Const\.GeometryProgram/Const.Program[MESA_SHADER_GEOMETRY]/g' \
-e 's/Const\.FragmentProgram/Const.Program[MESA_SHADER_FRAGMENT]/g'

Suggested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/program.c
665b8d7b6d8eae03c9dc0ef1a744fe59d9cc6cb6 07-Jan-2014 Paul Berry <stereotype441@gmail.com> mesa: Clean up nomenclature for pipeline stages.

Previously, we had an enum called gl_shader_type which represented
pipeline stages in the order they occur in the pipeline
(i.e. MESA_SHADER_VERTEX=0, MESA_SHADER_GEOMETRY=1, etc), and several
inconsistently named functions for converting between it and other
representations:

- _mesa_shader_type_to_string: gl_shader_type -> string
- _mesa_shader_type_to_index: GLenum (GL_*_SHADER) -> gl_shader_type
- _mesa_program_target_to_index: GLenum (GL_*_PROGRAM) -> gl_shader_type
- _mesa_shader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string

This patch tries to clean things up so that we use more consistent
terminology: the enum is now called gl_shader_stage (to emphasize that
it is in the order of pipeline stages), and the conversion functions are:

- _mesa_shader_stage_to_string: gl_shader_stage -> string
- _mesa_shader_enum_to_shader_stage: GLenum (GL_*_SHADER) -> gl_shader_stage
- _mesa_program_enum_to_shader_stage: GLenum (GL_*_PROGRAM) -> gl_shader_stage
- _mesa_progshader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string

In addition, MESA_SHADER_TYPES has been renamed to MESA_SHADER_STAGES,
for consistency with the new name for the enum.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

v2: Also rename the "target" field of _mesa_glsl_parse_state and the
"target" parameter of _mesa_shader_stage_to_string to "stage".

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
88dc24663079d3b7ae62a953a770887dc0b709da 29-Nov-2013 Chris Forbes <chrisf@ijw.co.nz> mesa: Require per-sample shading if the `sample` qualifier is used.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/mesa/program/program.c
e5885c119de1e508099cc1111e1c9f8ff00fab88 20-Sep-2013 Eric Anholt <eric@anholt.net> mesa: Dynamically allocate the storage for program local parameters.

The array was 64kb per struct gl_program, plus we statically stored a copy
of one on disk for _mesa_DummyProgram. Given that most struct gl_programs
we generate are for GLSL shaders that don't have local parameters, this
was a waste.

Since you can store and fetch parameters beyond what the program actually
uses, we do have to do a late allocation if necessary at
GetProgramLocalParameter time.

Reduces peak memory usage in the dota2 trace I made by 76MB (4.5%)

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/program.c
bb1f0969756fbb827c4b2520c632daa15342b064 13-Nov-2013 Eric Anholt <eric@anholt.net> mesa: Remove PROGRAM_ENV_PARAM enum.

This has been replaced with referring to env parameters using
PROGRAM_STATE_VAR and _mesa_load_state_parameters.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/program.c
33b0455211019988fe418cca5dfac62c7902c861 13-Nov-2013 Eric Anholt <eric@anholt.net> mesa: Remove PROGRAM_LOCAL_PARAM enum.

This has been replaced with referring to local parameters using
PROGRAM_STATE_VAR and _mesa_load_state_parameters.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/program.c
627b2692e916060f1cb72d5e254b63927961687d 17-Oct-2013 Anuj Phogat <anuj.phogat@gmail.com> mesa: Add a helper function _mesa_get_min_invocations_per_fragment()

This function is used to test if we need to do per sample shading or
per fragment shading.

V2: Use MAX2() to make sure the function returns a number >= 1.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
/external/mesa3d/src/mesa/program/program.c
07572621bc4515c71c56754a2bd9c7c832653d2b 20-Sep-2013 Eric Anholt <eric@anholt.net> mesa: Drop an extra copy-and-pasted copy in the program clone function.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@.intel.com>
/external/mesa3d/src/mesa/program/program.c
669b88eb12496dd5f1ba933a56c8311624245639 20-Sep-2013 Eric Anholt <eric@anholt.net> mesa: Convert some runtime asserts to static asserts.

Noticed while grepping through the code for something else.

v2: Don't convert really-runtime asserts to static asserts.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@.intel.com>
/external/mesa3d/src/mesa/program/program.c
3998cfa933dcd9134b75d9f0ae2c9cfcd6f2ee45 05-Jun-2013 Rico Schüller <kgbricola@web.de> mesa: remove outdated version lines in comments

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
3d8d5b298a268b119d840bc9bae0ee9e0c9244a9 21-Apr-2013 Kenneth Graunke <kenneth@whitecape.org> mesa: Restore 78-column wrapping of license text in C-style comments.

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>
/external/mesa3d/src/mesa/program/program.c
96ff2edc73ccf11d4d198ba3665507f73ae4a9f7 21-Apr-2013 Kenneth Graunke <kenneth@whitecape.org> mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.

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>
/external/mesa3d/src/mesa/program/program.c
dd404bc94f78a1766527becee03f8ef6ae3a799b 21-Apr-2013 Kenneth Graunke <kenneth@whitecape.org> mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.

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>
/external/mesa3d/src/mesa/program/program.c
b76f6d9557ff27140e18cf8aa2b57db8876d5d4d 17-Apr-2013 Brian Paul <brianp@vmware.com> mesa: remove #include "mfeatures.h" from numerous source files

None of the remaining FEATURE_x symbols in mfeatures.h are used anymore.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/program/program.c
eed6baf7621fa94e7888f8079b155fc67a08540c 23-Feb-2013 Paul Berry <stereotype441@gmail.com> Replace gl_frag_attrib enum with gl_varying_slot.

This patch makes the following search-and-replace changes:

gl_frag_attrib -> gl_varying_slot
FRAG_ATTRIB_* -> VARYING_SLOT_*
FRAG_BIT_* -> VARYING_BIT_*

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
a6d807c86f9972335048ad21c33277385eec08e8 23-Feb-2013 Paul Berry <stereotype441@gmail.com> Replace gl_geom_result enum with gl_varying_slot.

This patch makes the following search-and-replace changes:

gl_geom_result -> gl_varying_slot
GEOM_RESULT_* -> VARYING_SLOT_*

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
d7c60a4a4fa4a0680f243376367c297a66a73343 23-Feb-2013 Paul Berry <stereotype441@gmail.com> Replace gl_geom_attrib enum with gl_varying_slot.

This patch makes the following search-and-replace changes:

gl_geom_attrib -> gl_varying_slot
GEOM_ATTRIB_* -> VARYING_SLOT_*
GEOM_BIT_* -> VARYING_BIT_*

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
36b252e94724b2512ea941eff2b3a3abeb80be79 23-Feb-2013 Paul Berry <stereotype441@gmail.com> Replace gl_vert_result enum with gl_varying_slot.

This patch makes the following search-and-replace changes:

gl_vert_result -> gl_varying_slot
VERT_RESULT_* -> VARYING_SLOT_*

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
ccbb479f4090948ed3765495192332ebc4cf1f4f 23-Jan-2013 Brian Paul <brianp@vmware.com> mesa: use GLbitfield64 when copying program inputs

Note: This is a candidate for the 9.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/program/program.c
701a0f6a769ed257057be365cbe88e9f114bc05d 23-Jan-2013 Brian Paul <brianp@vmware.com> mesa: add some casts to silence MSVC warnings

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/program/program.c
8d418d16165624a59b2049d4097b4ab0dc82ffa9 15-Oct-2012 Kenneth Graunke <kenneth@whitecape.org> mesa: Remove support for named parameters.

These were only part of NV_fragment_program, so we can kill them.

The fact that PROGRAM_NAMED_PARAM appears in r200_vertprog.c is rather
comedic, but also demonstrates that people just spam the various types
of parameters everywhere because they're confusing.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
9dc2c28983b68f290558d070806b236c202b3744 15-Oct-2012 Kenneth Graunke <kenneth@whitecape.org> mesa: Remove the gl_program::Resident flag.

It apparently was only used for NV programs.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/program.c
8b2fe73897b1d50fd99de3f66bf78fe3fc44bfee 10-Oct-2012 Eric Anholt <eric@anholt.net> mesa: Remove miscellaneous remains of NV_vertex_program.

v2: Rebase on top of get.c changes.

Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
/external/mesa3d/src/mesa/program/program.c
cc763f0f3f5558c4ce055e54da6ebd2279009322 10-Oct-2012 Eric Anholt <eric@anholt.net> mesa: Remove support for GL_VERTEX_STATE_PROGRAMs and their execution.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
6ab9c0476992752ff3ac0c80b6952075a4679aeb 10-Oct-2012 Eric Anholt <eric@anholt.net> mesa: Remove support for NV_vertex_program's tracked matrices.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
961fcc45adab2e803e45c4e1d8e5b9f1a36b4b18 11-Sep-2012 Oliver McFadden <oliver.mcfadden@linux.intel.com> mesa: remove FEATURE_ATI_fragment_shader define.

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
b7d15977f66bb3de9c475e3138c56ab1d4151382 11-Sep-2012 Oliver McFadden <oliver.mcfadden@linux.intel.com> mesa: remove FEATURE_NV_(fragment|vertex)_program defines.

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
528f48432e58579d28a374581b1e6c7e64055381 11-Sep-2012 Oliver McFadden <oliver.mcfadden@linux.intel.com> mesa: remove FEATURE_ARB_shader_objects and related defines.

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
009250a096cdf2babc8d87defa05309e96b8bba2 11-Sep-2012 Oliver McFadden <oliver.mcfadden@linux.intel.com> mesa: remove FEATURE_es2_glsl and related defines.

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
5067506ea6ada5eeae33b1acf1c916e00121c12a 04-Sep-2012 Matt Turner <mattst88@gmail.com> Remove useless checks for NULL before freeing

This patch has been generated by the following Coccinelle semantic
patch:

// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
...
- }

@@
expression E;
type T;
@@
+ free ((T) E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free((T) E);
(
- E = NULL;
|
- E = 0;
)
...
- }

@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
- free (E);
- }

@@
expression E;
type T;
@@
+ free ((T) E);
- if (unlikely (E != NULL)) {
- free ((T) E);
- }

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
2b7a972e3f36bfcdc6fbe2b59d7ffdcde49c9405 04-Sep-2012 Matt Turner <mattst88@gmail.com> Don't cast the return value of malloc/realloc

This patch has been generated by the following Coccinelle semantic
patch:

// Don't cast the return value of malloc/realloc.
//
// Casting the return value of malloc/realloc only stands to hide
// errors.

@@
type T;
expression E1, E2;
@@
- (T)
(
_mesa_align_calloc(E1, E2)
|
_mesa_align_malloc(E1, E2)
|
calloc(E1, E2)
|
malloc(E1)
|
realloc(E1, E2)
)
/external/mesa3d/src/mesa/program/program.c
5e310e9f8300a357d6bdaf098c72098518b564f3 20-Jun-2012 Paul Berry <stereotype441@gmail.com> mesa: Add UsesDFdy to struct gl_fragment_program.

The i965 back-end needs to compile dFdy() differently for FBOs and
window system framebuffers, because Y coordinates are flipped between
the two (see commit 82d2596: i965: Compute dFdy() correctly for FBOs).
This boolean will allow it to avoid unnecessarily recompiling shaders
that don't use dFdy().

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/program.c
e4f8d33aea7e0112dfbf3a38fdc36d11b2e7be10 18-Jul-2012 Brian Paul <brianp@vmware.com> mesa: use gl_program cast wrappers

In a few cases, remove unneeded casts.
And fix a few other const-correctness issues.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/program.c
1ab1b15e9d0da1c5215a20770735b5477f5313df 23-Oct-2011 Chia-I Wu <olv@lunarg.com> mesa, i965: prepare for more than 8 texture targets

3-bit fields are used store texture target in several places. That will fail
when TEXTURE_EXTERNAL_INDEX, which happends to be the 9th texture target, is
added. Make them 4-bit fields.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
/external/mesa3d/src/mesa/program/program.c
7ec2b0d0d6b6a0f760e55ffdee0bdb385a3e900a 01-Nov-2010 Eric Anholt <eric@anholt.net> mesa: Convert fixed function fragment program generator to GLSL IR.

This is a step towards providing a direct route for drivers accepting
GLSL IR for codegen. Perhaps more importantly, it runs the fixed
function fragment program through the GLSL IR optimization. Having
seen how easy it is to make ugly fixed function texenv code that can
do unnecessary work, this may improve real applicatinos.
/external/mesa3d/src/mesa/program/program.c
35613afee3e038b70ada210b2dfbbc9abc883f4f 19-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Remove unused gl_program::Attributes

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/program.c
cd76f114e608ffb93a03ac3ffc3e11876d6a057e 16-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Remove unused field gl_program::Varying

Lots of things set and copy this field around, but nothing uses it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/program.c
4683529048ee133481b2d8f1cae1685aa1736f9a 04-Aug-2011 Bryan Cain <bryancain3@gmail.com> Merge branch 'glsl-to-tgsi'

Conflicts:
src/mesa/state_tracker/st_atom_pixeltransfer.c
src/mesa/state_tracker/st_program.c
6d89abadbcd68bbe9e08f041412549f8dc1fc73c 18-May-2011 Bryan Cain <bryancain3@gmail.com> mesa: support boolean and integer-based parameters in prog_parameter

The functionality is not used by anything yet, and the glUniform functions will
need to be reworked before this can reach its full usefulness. It is
nonetheless a step towards integer support in the state tracker and classic drivers.
/external/mesa3d/src/mesa/program/program.c
1e5fd8e480b661c1ab748c2ded587650ea7f3d20 30-Apr-2011 Bryan Cain <bryancain3@gmail.com> mesa: fix segfault when no Mesa IR is generated
/external/mesa3d/src/mesa/program/program.c
323e4bff799a657632c5777c8be6e306202953af 14-Jul-2011 Dave Airlie <airlied@redhat.com> mesa: split _mesa_reference_program() into hot/cold paths.

inline the hotpath of the reference remaining the same. This shouldn't
penalise the slow path at all but improve the hot path so we don't have
to jump to the function.

It also moves some assert checks under an #ifndef NDEBUG.

Minor clean-ups added by Brian.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/program.c
4d203a01e20dedcfaab09c18922e8ed9dcb39729 16-Apr-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Kill gl_fragment_program::FogOption with fire

All drivers expect this to always be GL_NONE. Don't let there be any
opportunity for a bad value to leak out and infect some unsuspecting
driver. If any driver for hardware that had fixed-function
per-fragment fog (i915 and perhaps some r300-ish) was ever going to
add support, it would have done it by now.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
/external/mesa3d/src/mesa/program/program.c
874a2c0b7da62f4dd08dedcec221f55b22e40e95 06-Apr-2011 Brian Paul <brianp@vmware.com> mesa: core support for GL_ARB_texture_buffer_object

No GLSL or driver support yet.
/external/mesa3d/src/mesa/program/program.c
11150e4667ce11b056d98244754ce3f2a79599a6 15-Mar-2011 Brian Paul <brianp@vmware.com> mesa: use BITFIELD64_BIT() macro
/external/mesa3d/src/mesa/program/program.c
098f9c5325de16bfb5bf8b0e93e0ec1871db4a76 13-Mar-2011 Eric Anholt <eric@anholt.net> Revert "mesa: Convert fixed function fragment program generator to GLSL IR."

This reverts commit 7cb87dffce2c7a37f960f3a865cf92fd193dd8c5.
There were regressions (Bug #35244) and more review has been requested.
/external/mesa3d/src/mesa/program/program.c
7cb87dffce2c7a37f960f3a865cf92fd193dd8c5 01-Nov-2010 Eric Anholt <eric@anholt.net> mesa: Convert fixed function fragment program generator to GLSL IR.

This is a step towards providing a direct route for drivers accepting
GLSL IR for codegen. Perhaps more importantly, it runs the fixed
function fragment program through the GLSL IR optimization. Having
seen how easy it is to make ugly fixed function texenv code that can
do unnecessary work, this may improve real applicatinos.
/external/mesa3d/src/mesa/program/program.c
8ad821df0a2d49964141f2ea4ef8179f4edc052f 02-Mar-2011 Brian Paul <brianp@vmware.com> mesa: added gl_program_constants::MaxAddressOffset

See https://bugs.freedesktop.org/show_bug.cgi?id=29418
/external/mesa3d/src/mesa/program/program.c
21750a2d9d2a4ed69308316b121fd53b0c873aea 09-Jan-2011 Vinson Lee <vlee@vmware.com> mesa: Include mfeatures.h in program.c.

Include mfeatures.h for feature tests.
/external/mesa3d/src/mesa/program/program.c
c628fd743ee3c3305e9beac7f0e6efacf6982115 23-Nov-2010 Brian Paul <brianp@vmware.com> mesa: replace #defines with new gl_shader_type enum
/external/mesa3d/src/mesa/program/program.c
512f840702d58b48607a9dca06dd939256c7afed 23-Nov-2010 Brian Paul <brianp@vmware.com> mesa: _mesa_valid_register_index() to validate register indexes
/external/mesa3d/src/mesa/program/program.c
f72e4b306bb26b067b46f2d7561aabeb6f3f4be0 25-Oct-2010 Brian Paul <brianp@vmware.com> mesa: silence enum comparison warning

http://bugs.freedesktop.org/show_bug.cgi?id=31069
/external/mesa3d/src/mesa/program/program.c
f9995b30756140724f41daf963fa06167912be7f 12-Oct-2010 Kristian Høgsberg <krh@bitplanet.net> Drop GLcontext typedef and use struct gl_context instead
/external/mesa3d/src/mesa/program/program.c
029c1815717ea62bae28e86798c86dfa98cbc8a7 05-Sep-2010 Luca Barbieri <luca@luca-barbieri.com> mesa: don't smash the stack in _mesa_find_used_registers

At some point this actually triggered, not sure if it still does.

Give a meaningful assert and refuse to smash the stack anyway.
/external/mesa3d/src/mesa/program/program.c
4567b479531d2791ad2d6a598c9dd9e3730b0504 10-Aug-2010 Brian Paul <brianp@vmware.com> mesa: additional program limit assertions
/external/mesa3d/src/mesa/program/program.c
56643096f1eb01eefa1a532ac096b32d23b6b8ba 30-Jul-2010 Brian Paul <brianp@vmware.com> mesa: added gl_program::IndirectRegisterFiles field

Now drivers, etc. can know which register files are accessed with
indirect addressing. Before we just checked gl_program::NumAddressRegs
but didn't know if that was the constant buffer, temp regs, or what.

The only user of this new field so far will be the gallium state tracker.
/external/mesa3d/src/mesa/program/program.c
da7bd6a90e1fee5c16327338fd251c0f6be34e36 28-Jun-2010 Zack Rusin <zackr@vmware.com> mesa: initial support for ARB_geometry_shader4

laying down the foundation for everything and implementing most of the
stuff.
linking, gl_VerticesIn and multidimensional inputs are left.
/external/mesa3d/src/mesa/program/program.c
ec2b92f98c2e7f161521b447cc1d9a36bce3707c 11-Jun-2010 Brian Paul <brianp@vmware.com> mesa: rename src/mesa/shader/ to src/mesa/program/
/external/mesa3d/src/mesa/program/program.c