mesa: Move texenvprogram.c to ff_fragment_shader.cpp. This file is about to change to generating a shader program instead of a fragment program.
mesa: fix num_draw_buffers==0 in fixed-function fragment program generation This fixes a problem when glDrawBuffers(GL_NONE). The fragment program was writing to color output[0] but OutputsWritten was 0. That led to a failed assertion in the Mesa->TGSI translation code. NOTE: This is a candidate for the 7.9 and 7.10 branches.
mesa: Include mtypes.h in files that use gl_context struct. Directly include mtypes.h if a file uses a gl_context struct. This allows future removal of headers that are not strictly necessary but indirectly include mtypes.h for a file.
Track separate programs for each stage The assumption is that all stages are the same program or that varyings are passed between stages using built-in varyings.
Drop GLcontext typedef and use struct gl_context instead
mesa: Fix printf-like warnings.
mesa: fix texenv generation when num color bufs == 0 Before, if there were no color buffers enabled (with glDrawBuffers(GL_NONE)) when the texenv program was generated, we'd emit writes to OUTPUT[1] but the OutputsWritten mask was 0. This inconsistency caused an assertion to fail later in the Mesa->TGSI translation. Fixes fd.o bug 28169 NOTE: this is a candidate for the 7.8 branch (and depends on commit b6b9b17d27c570cc99ae339e595cf2f63ca5e8d7).
mesa: make the number of draw buffers part of the texenv program key state All the state that effects the program should be in the key. This didn't help with bug 28169 but is a good fix anyway. NOTE: this is a low-priority candidate for the 7.8 branch. In practice, this issue might never be hit.
mesa: rename src/mesa/shader/ to src/mesa/program/
texenvprogram: fix for ARB_draw_buffers. piglit has a test called fbo-drawbuffers, this fails for me on r300g, and fixing the texenv program to use the DATA outputs fixes it. Signed-off-by: Dave Airlie <airlied@redhat.com>
Replace the _mesa_*printf() wrappers with the plain libc versions
Remove _mesa_memcmp in favor of plain memcmp. This may break the SUNOS4 build, but it's no longer relevant.
Remove _mesa_memset in favor of plain memset. This may break the SUNOS4 build, but it's no longer relevant.
mesa: add back-door support for cylindrical texture wrap mode If the texture priority field is 0.125 set the PROG_PARAM_BIT_CYL_WRAP flag. The gallium state tracker will look for this flag. This feature is only for testing purposes and may be remove at some point. But if it's useful we could write a GL/Mesa extension to expose it properly.
mesa: change ctx->Driver.ProgramStringNotify() to return GLboolean GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE.
mesa: Remove an unnecessary store reported by clang. This was a workaround for a compiler warning that was showing a real error. The real error was later fixed.
mesa: Remove _mesa_exit wrapper for exit(). It does nothing else while being less useful than exit() because it lacks attributes that real exit() has.
Merge branch 'outputswritten64' Add a GLbitfield64 type and several macros to operate on 64-bit fields. The OutputsWritten field of gl_program is changed to use that type. This results in a fair amount of fallout in drivers that use programs. No changes are strictly necessary at this point as all bits used are below the 32-bit boundary. Fairly soon several bits will be added for clip distances written by a vertex shader. This will cause several bits used for varyings to be pushed above the 32-bit boundary. This will affect any drivers that support GLSL. At this point, only the i965 driver has been modified to support this eventuality. I did this as a "squash" merge. There were several places through the outputswritten64 branch where things were broken. I foresee this causing difficulties later for bisecting. The history is still available in the branch. Conflicts: src/mesa/drivers/dri/i965/brw_wm.h
mesa: added default case return to silence warning
mesa: in texenvprogram code, only do saturation when really needed. For some env modes (like modulate or replace) we don't have to clamp because we know the results will be in [0,1].