Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/mesa/mesa
This commit is contained in:
@@ -24,6 +24,8 @@ TBD
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>Updated glext.h file (version 39)
|
||||
<li>Updated glxext.h file (version 18)
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ all: full subset
|
||||
FULL = \
|
||||
main.doxy \
|
||||
math.doxy \
|
||||
array_cache.doxy \
|
||||
vbo.doxy \
|
||||
glapi.doxy \
|
||||
shader.doxy \
|
||||
swrast.doxy \
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ PROJECT_NAME = Mesa
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 6.2
|
||||
PROJECT_NUMBER = 6.5
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
doxygen tnl_dd.doxy
|
||||
doxygen array_cache.doxy
|
||||
doxygen vbo.doxy
|
||||
doxygen math.doxy
|
||||
doxygen swrast.doxy
|
||||
doxygen swrast_setup.doxy
|
||||
@@ -10,7 +10,7 @@ doxygen shader.doxy
|
||||
|
||||
echo Building again, to resolve tags
|
||||
doxygen tnl_dd.doxy
|
||||
doxygen array_cache.doxy
|
||||
doxygen vbo.doxy
|
||||
doxygen math.doxy
|
||||
doxygen swrast.doxy
|
||||
doxygen swrast_setup.doxy
|
||||
|
||||
+1
-1
@@ -45,5 +45,5 @@ TAGFILES = main.tag=../core \
|
||||
swrast.tag=../swrast \
|
||||
swrast_setup.tag=../swrast_setup \
|
||||
tnl.tag=../tnl \
|
||||
array_cache.tag=array_cache
|
||||
vbo.tag=vbo
|
||||
GENERATE_TAGFILE = swrast.tag
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<div class="qindex">
|
||||
<a class="qindex" href="../main/index.html">core</a> |
|
||||
<a class="qindex" href="../glapi/index.html">glapi</a> |
|
||||
<a class="qindex" href="../array_cache/index.html">array_cache</a> |
|
||||
<a class="qindex" href="../vbo/index.html">vbo</a> |
|
||||
<a class="qindex" href="../math/index.html">math</a> |
|
||||
<a class="qindex" href="../shader/index.html">shader</a> |
|
||||
<a class="qindex" href="../swrast/index.html">swrast</a> |
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ SKIP_FUNCTION_MACROS = YES
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES = tnl_dd.tag=../tnl_dd \
|
||||
array_cache.tag=../array_cache \
|
||||
vbo.tag=../vbo \
|
||||
glapi.tag=../glapi \
|
||||
math.tag=../math \
|
||||
shader.tag=../shader \
|
||||
|
||||
+1
-1
@@ -45,5 +45,5 @@ TAGFILES = tnl_dd.tag=../tnl_dd \
|
||||
swrast.tag=../swrast \
|
||||
swrast_setup.tag=../swrast_setup \
|
||||
tnl.tag=../tnl \
|
||||
array_cache.tag=../array_cache
|
||||
vbo.tag=../vbo
|
||||
GENERATE_TAGFILE = math.tag
|
||||
|
||||
+1
-1
@@ -45,5 +45,5 @@ TAGFILES = main.tag=../core \
|
||||
swrast.tag=../swrast \
|
||||
swrast_setup.tag=../swrast_setup \
|
||||
tnl.tag=../tnl \
|
||||
array_cache.tag=array_cache
|
||||
vbo.tag=vbo
|
||||
GENERATE_TAGFILE = swrast.tag
|
||||
|
||||
+1
-1
@@ -44,5 +44,5 @@ TAGFILES = main.tag=../core \
|
||||
tnl_dd.tag=../tnl_dd \
|
||||
swrast_setup.tag=../swrast_setup \
|
||||
tnl.tag=../tnl \
|
||||
array_cache.tag=array_cache
|
||||
vbo.tag=vbo
|
||||
GENERATE_TAGFILE = swrast.tag
|
||||
|
||||
@@ -45,5 +45,5 @@ TAGFILES = tnl_dd.tag=../tnl_dd \
|
||||
math.tag=../math \
|
||||
swrast.tag=../swrast \
|
||||
tnl.tag=../tnl \
|
||||
array_cache.tag=../array_cache
|
||||
vbo.tag=../vbo
|
||||
GENERATE_TAGFILE = swrast_setup.tag
|
||||
|
||||
+1
-1
@@ -46,5 +46,5 @@ TAGFILES = tnl_dd.tag=../tnl \
|
||||
shader.tag=../shader \
|
||||
swrast.tag=../swrast \
|
||||
swrast_setup.tag=swrast_setup \
|
||||
array_cache.tag=array_cache
|
||||
vbo.tag=vbo
|
||||
GENERATE_TAGFILE = tnl.tag
|
||||
|
||||
+1
-1
@@ -45,5 +45,5 @@ TAGFILES = main.tag=../core \
|
||||
swrast.tag=../swrast \
|
||||
swrast_setup.tag=../swrast_setup \
|
||||
tnl.tag=../tnl \
|
||||
array_cache.tag=array_cache
|
||||
vbo.tag=vbo
|
||||
GENERATE_TAGFILE = tnl_dd.tag
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "Mesa array_cache"
|
||||
PROJECT_NAME = "Mesa vbo"
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../src/mesa/array_cache/
|
||||
INPUT = ../src/mesa/vbo/
|
||||
FILE_PATTERNS = *.c \
|
||||
*.h
|
||||
RECURSIVE = NO
|
||||
@@ -24,7 +24,7 @@ FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
HTML_OUTPUT = array_cache
|
||||
HTML_OUTPUT = vbo
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -47,4 +47,4 @@ TAGFILES = main.tag=../core \
|
||||
swrast_setup.tag=../swrast_setup \
|
||||
tnl.tag=../tnl \
|
||||
tnl_dd.tag=../tnl_dd
|
||||
GENERATE_TAGFILE = array_cache.tag
|
||||
GENERATE_TAGFILE = vbo.tag
|
||||
+579
-8
@@ -52,9 +52,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2006/08/30 */
|
||||
/* glext.h last updated 2007/02/12 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 34
|
||||
#define GL_GLEXT_VERSION 39
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
@@ -3019,7 +3019,6 @@ extern "C" {
|
||||
#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
|
||||
@@ -3104,6 +3103,8 @@ extern "C" {
|
||||
|
||||
#ifndef GL_EXT_framebuffer_multisample
|
||||
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
|
||||
#define GL_MAX_SAMPLES_EXT 0x8D57
|
||||
#endif
|
||||
|
||||
#ifndef GL_MESAX_texture_stack
|
||||
@@ -3122,6 +3123,268 @@ extern "C" {
|
||||
#ifndef GL_EXT_gpu_program_parameters
|
||||
#endif
|
||||
|
||||
#ifndef GL_APPLE_flush_buffer_range
|
||||
#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
|
||||
#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_gpu_program4
|
||||
#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
|
||||
#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
|
||||
#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
|
||||
#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
|
||||
#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
|
||||
#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
|
||||
#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
|
||||
#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_geometry_program4
|
||||
#define GL_LINES_ADJACENCY_EXT 0x000A
|
||||
#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
|
||||
#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
|
||||
#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
|
||||
#define GL_GEOMETRY_PROGRAM_NV 0x8C26
|
||||
#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
|
||||
#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
|
||||
#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
|
||||
#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
|
||||
#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
|
||||
#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
|
||||
#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_geometry_shader4
|
||||
#define GL_GEOMETRY_SHADER_EXT 0x8DD9
|
||||
/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
|
||||
/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
|
||||
/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
|
||||
/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
|
||||
#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
|
||||
#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
|
||||
#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
|
||||
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
|
||||
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
|
||||
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
|
||||
/* reuse GL_LINES_ADJACENCY_EXT */
|
||||
/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
|
||||
/* reuse GL_TRIANGLES_ADJACENCY_EXT */
|
||||
/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
|
||||
/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
|
||||
/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
|
||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
|
||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
|
||||
/* reuse GL_PROGRAM_POINT_SIZE_EXT */
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_vertex_program4
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_gpu_shader4
|
||||
#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
|
||||
#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
|
||||
#define GL_SAMPLER_BUFFER_EXT 0x8DC2
|
||||
#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
|
||||
#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
|
||||
#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
|
||||
#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
|
||||
#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
|
||||
#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
|
||||
#define GL_INT_SAMPLER_1D_EXT 0x8DC9
|
||||
#define GL_INT_SAMPLER_2D_EXT 0x8DCA
|
||||
#define GL_INT_SAMPLER_3D_EXT 0x8DCB
|
||||
#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
|
||||
#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
|
||||
#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
|
||||
#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
|
||||
#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
|
||||
#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
|
||||
#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
|
||||
#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
|
||||
#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
|
||||
#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
|
||||
#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
|
||||
#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
|
||||
#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_draw_instanced
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_packed_float
|
||||
#define GL_R11F_G11F_B10F_EXT 0x8C3A
|
||||
#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
|
||||
#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_array
|
||||
#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
|
||||
#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
|
||||
#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
|
||||
#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
|
||||
#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
|
||||
#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
|
||||
#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
|
||||
#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
|
||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_buffer_object
|
||||
#define GL_TEXTURE_BUFFER_EXT 0x8C2A
|
||||
#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
|
||||
#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
|
||||
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
|
||||
#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_compression_latc
|
||||
#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
|
||||
#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
|
||||
#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
|
||||
#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_compression_rgtc
|
||||
#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
|
||||
#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
|
||||
#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
|
||||
#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_shared_exponent
|
||||
#define GL_RGB9_E5_EXT 0x8C3D
|
||||
#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
|
||||
#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_depth_buffer_float
|
||||
#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
|
||||
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
|
||||
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
|
||||
#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_fragment_program4
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_framebuffer_multisample_coverage
|
||||
#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
|
||||
#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
|
||||
#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
|
||||
#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_sRGB
|
||||
#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
|
||||
#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_geometry_shader4
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_parameter_buffer_object
|
||||
#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
|
||||
#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
|
||||
#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
|
||||
#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
|
||||
#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_draw_buffers2
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_transform_feedback
|
||||
#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
|
||||
#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
|
||||
#define GL_TEXTURE_COORD_NV 0x8C79
|
||||
#define GL_CLIP_DISTANCE_NV 0x8C7A
|
||||
#define GL_VERTEX_ID_NV 0x8C7B
|
||||
#define GL_PRIMITIVE_ID_NV 0x8C7C
|
||||
#define GL_GENERIC_ATTRIB_NV 0x8C7D
|
||||
#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
|
||||
#define GL_ACTIVE_VARYINGS_NV 0x8C81
|
||||
#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
|
||||
#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
|
||||
#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
|
||||
#define GL_PRIMITIVES_GENERATED_NV 0x8C87
|
||||
#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
|
||||
#define GL_RASTERIZER_DISCARD_NV 0x8C89
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
|
||||
#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
|
||||
#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_bindable_uniform
|
||||
#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
|
||||
#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
|
||||
#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
|
||||
#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
|
||||
#define GL_UNIFORM_BUFFER_EXT 0x8DEE
|
||||
#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_integer
|
||||
#define GL_RGBA32UI_EXT 0x8D70
|
||||
#define GL_RGB32UI_EXT 0x8D71
|
||||
#define GL_ALPHA32UI_EXT 0x8D72
|
||||
#define GL_INTENSITY32UI_EXT 0x8D73
|
||||
#define GL_LUMINANCE32UI_EXT 0x8D74
|
||||
#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
|
||||
#define GL_RGBA16UI_EXT 0x8D76
|
||||
#define GL_RGB16UI_EXT 0x8D77
|
||||
#define GL_ALPHA16UI_EXT 0x8D78
|
||||
#define GL_INTENSITY16UI_EXT 0x8D79
|
||||
#define GL_LUMINANCE16UI_EXT 0x8D7A
|
||||
#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
|
||||
#define GL_RGBA8UI_EXT 0x8D7C
|
||||
#define GL_RGB8UI_EXT 0x8D7D
|
||||
#define GL_ALPHA8UI_EXT 0x8D7E
|
||||
#define GL_INTENSITY8UI_EXT 0x8D7F
|
||||
#define GL_LUMINANCE8UI_EXT 0x8D80
|
||||
#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
|
||||
#define GL_RGBA32I_EXT 0x8D82
|
||||
#define GL_RGB32I_EXT 0x8D83
|
||||
#define GL_ALPHA32I_EXT 0x8D84
|
||||
#define GL_INTENSITY32I_EXT 0x8D85
|
||||
#define GL_LUMINANCE32I_EXT 0x8D86
|
||||
#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
|
||||
#define GL_RGBA16I_EXT 0x8D88
|
||||
#define GL_RGB16I_EXT 0x8D89
|
||||
#define GL_ALPHA16I_EXT 0x8D8A
|
||||
#define GL_INTENSITY16I_EXT 0x8D8B
|
||||
#define GL_LUMINANCE16I_EXT 0x8D8C
|
||||
#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
|
||||
#define GL_RGBA8I_EXT 0x8D8E
|
||||
#define GL_RGB8I_EXT 0x8D8F
|
||||
#define GL_ALPHA8I_EXT 0x8D90
|
||||
#define GL_INTENSITY8I_EXT 0x8D91
|
||||
#define GL_LUMINANCE8I_EXT 0x8D92
|
||||
#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
|
||||
#define GL_RED_INTEGER_EXT 0x8D94
|
||||
#define GL_GREEN_INTEGER_EXT 0x8D95
|
||||
#define GL_BLUE_INTEGER_EXT 0x8D96
|
||||
#define GL_ALPHA_INTEGER_EXT 0x8D97
|
||||
#define GL_RGB_INTEGER_EXT 0x8D98
|
||||
#define GL_RGBA_INTEGER_EXT 0x8D99
|
||||
#define GL_BGR_INTEGER_EXT 0x8D9A
|
||||
#define GL_BGRA_INTEGER_EXT 0x8D9B
|
||||
#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
|
||||
#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
|
||||
#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -3162,7 +3425,7 @@ typedef unsigned short GLhalfNV;
|
||||
/* This code block is duplicated in glext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GLX_OML_sync_control extension). */
|
||||
/* (as used in the GL_EXT_timer_query extension). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(__sun__)
|
||||
@@ -3184,12 +3447,12 @@ typedef unsigned long long int uint64_t;
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#elif defined(WIN32) && defined(_MSC_VER)
|
||||
typedef long int int32_t;
|
||||
#elif defined(_WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(_WIN32)
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#elif defined(WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <inttypes.h> /* Fallback option */
|
||||
#endif
|
||||
@@ -6687,6 +6950,314 @@ typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLu
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_APPLE_flush_buffer_range
|
||||
#define GL_APPLE_flush_buffer_range 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
|
||||
GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_gpu_program4
|
||||
#define GL_NV_gpu_program4 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
|
||||
GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
|
||||
GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
|
||||
GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
|
||||
GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
|
||||
GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
|
||||
GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
|
||||
GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
|
||||
GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
|
||||
GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
|
||||
GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
|
||||
GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
|
||||
GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
|
||||
GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_geometry_program4
|
||||
#define GL_NV_geometry_program4 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
|
||||
GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
|
||||
GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
|
||||
GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
|
||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_geometry_shader4
|
||||
#define GL_EXT_geometry_shader4 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_vertex_program4
|
||||
#define GL_NV_vertex_program4 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
|
||||
GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
|
||||
GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
|
||||
GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
|
||||
GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
|
||||
GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
|
||||
GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
|
||||
GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
|
||||
GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
|
||||
GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
|
||||
GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
|
||||
GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
|
||||
GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
|
||||
GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
|
||||
GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
|
||||
GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
|
||||
GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
|
||||
GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
|
||||
GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
|
||||
GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_gpu_shader4
|
||||
#define GL_EXT_gpu_shader4 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
|
||||
GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
|
||||
GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
|
||||
GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
|
||||
GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
|
||||
GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
|
||||
GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
|
||||
GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
|
||||
typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_draw_instanced
|
||||
#define GL_EXT_draw_instanced 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
|
||||
GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
|
||||
typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_packed_float
|
||||
#define GL_EXT_packed_float 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_array
|
||||
#define GL_EXT_texture_array 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_buffer_object
|
||||
#define GL_EXT_texture_buffer_object 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_compression_latc
|
||||
#define GL_EXT_texture_compression_latc 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_compression_rgtc
|
||||
#define GL_EXT_texture_compression_rgtc 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_shared_exponent
|
||||
#define GL_EXT_texture_shared_exponent 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_depth_buffer_float
|
||||
#define GL_NV_depth_buffer_float 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
|
||||
GLAPI void APIENTRY glClearDepthdNV (GLdouble);
|
||||
GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
|
||||
typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
|
||||
typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_fragment_program4
|
||||
#define GL_NV_fragment_program4 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_framebuffer_multisample_coverage
|
||||
#define GL_NV_framebuffer_multisample_coverage 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_sRGB
|
||||
#define GL_EXT_framebuffer_sRGB 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_geometry_shader4
|
||||
#define GL_NV_geometry_shader4 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_parameter_buffer_object
|
||||
#define GL_NV_parameter_buffer_object 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
|
||||
GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
|
||||
GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_draw_buffers2
|
||||
#define GL_EXT_draw_buffers2 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
|
||||
GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
|
||||
GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
|
||||
GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
|
||||
GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
|
||||
GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
|
||||
typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
|
||||
typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
|
||||
typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_transform_feedback
|
||||
#define GL_NV_transform_feedback 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
|
||||
GLAPI void APIENTRY glEndTransformFeedbackNV (void);
|
||||
GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
|
||||
GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
|
||||
GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
|
||||
GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
|
||||
GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
|
||||
GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
|
||||
GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
|
||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
|
||||
typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_bindable_uniform
|
||||
#define GL_EXT_bindable_uniform 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
|
||||
GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
|
||||
GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
|
||||
typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
|
||||
typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_integer
|
||||
#define GL_EXT_texture_integer 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
|
||||
GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
|
||||
GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
|
||||
GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
|
||||
GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
|
||||
GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
|
||||
typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+70
-3
@@ -52,9 +52,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glxext.h last updated 2006/08/30 */
|
||||
/* glxext.h last updated 2007/02/13 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GLX_GLXEXT_VERSION 14
|
||||
#define GLX_GLXEXT_VERSION 18
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
@@ -307,6 +307,51 @@ extern "C" {
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_framebuffer_sRGB
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
||||
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
|
||||
#define GLX_TEXTURE_TARGET_EXT 0x20D6
|
||||
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
|
||||
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
||||
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
||||
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
||||
#define GLX_TEXTURE_1D_EXT 0x20DB
|
||||
#define GLX_TEXTURE_2D_EXT 0x20DC
|
||||
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
|
||||
#define GLX_FRONT_LEFT_EXT 0x20DE
|
||||
#define GLX_FRONT_RIGHT_EXT 0x20DF
|
||||
#define GLX_BACK_LEFT_EXT 0x20E0
|
||||
#define GLX_BACK_RIGHT_EXT 0x20E1
|
||||
#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
|
||||
#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
|
||||
#define GLX_AUX0_EXT 0x20E2
|
||||
#define GLX_AUX1_EXT 0x20E3
|
||||
#define GLX_AUX2_EXT 0x20E4
|
||||
#define GLX_AUX3_EXT 0x20E5
|
||||
#define GLX_AUX4_EXT 0x20E6
|
||||
#define GLX_AUX5_EXT 0x20E7
|
||||
#define GLX_AUX6_EXT 0x20E8
|
||||
#define GLX_AUX7_EXT 0x20E9
|
||||
#define GLX_AUX8_EXT 0x20EA
|
||||
#define GLX_AUX9_EXT 0x20EB
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -366,8 +411,12 @@ typedef unsigned long long int uint64_t;
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#elif defined(WIN32) && defined(__GNUC__)
|
||||
#elif defined(_WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(_WIN32)
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <inttypes.h> /* Fallback option */
|
||||
#endif
|
||||
@@ -716,6 +765,24 @@ extern unsigned int glXGetAGPOffsetMESA (const void *);
|
||||
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
#define GLX_EXT_fbconfig_packed_float 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_framebuffer_sRGB
|
||||
#define GLX_EXT_framebuffer_sRGB 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
#define GLX_EXT_texture_from_pixmap 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
|
||||
extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+39
-2
@@ -6,13 +6,44 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "egllog.h"
|
||||
|
||||
#define MAXSTRING 1000
|
||||
#define FALLBACK_LOG_LEVEL _EGL_DEBUG
|
||||
#define FALLBACK_LOG_LEVEL_STR "debug"
|
||||
|
||||
static EGLint ReportingLevel = -1;
|
||||
|
||||
|
||||
/* XXX init this with an env var or something */
|
||||
static EGLint ReportingLevel = _EGL_DEBUG;
|
||||
static void
|
||||
log_level_initialize (void)
|
||||
{
|
||||
char *log_env = getenv ("EGL_LOG_LEVEL");
|
||||
|
||||
if (log_env == NULL) {
|
||||
ReportingLevel = FALLBACK_LOG_LEVEL;
|
||||
}
|
||||
else if (strcasecmp (log_env, "fatal") == 0) {
|
||||
ReportingLevel = _EGL_FATAL;
|
||||
}
|
||||
else if (strcasecmp (log_env, "warning") == 0) {
|
||||
ReportingLevel = _EGL_WARNING;
|
||||
}
|
||||
else if (strcasecmp (log_env, "info") == 0) {
|
||||
ReportingLevel = _EGL_INFO;
|
||||
}
|
||||
else if (strcasecmp (log_env, "debug") == 0) {
|
||||
ReportingLevel = _EGL_DEBUG;
|
||||
}
|
||||
else {
|
||||
fprintf (stderr, "Unrecognized EGL_LOG_LEVEL environment variable value. "
|
||||
"Expected one of \"fatal\", \"warning\", \"info\", \"debug\". "
|
||||
"Got \"%s\". Falling back to \"%s\".\n",
|
||||
log_env, FALLBACK_LOG_LEVEL_STR);
|
||||
ReportingLevel = FALLBACK_LOG_LEVEL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -25,6 +56,12 @@ _eglLog(EGLint level, const char *fmtStr, ...)
|
||||
va_list args;
|
||||
char msg[MAXSTRING];
|
||||
const char *levelStr;
|
||||
static int log_level_initialized = 0;
|
||||
|
||||
if (!log_level_initialized) {
|
||||
log_level_initialize ();
|
||||
log_level_initialized = 1;
|
||||
}
|
||||
|
||||
if (level <= ReportingLevel) {
|
||||
switch (level) {
|
||||
|
||||
+16
-1
@@ -173,6 +173,9 @@ void glutInit (int *argcp, char **argv)
|
||||
int RequiredWidth = 0, RequiredHeight;
|
||||
char *fbdev;
|
||||
|
||||
stack_t stack;
|
||||
struct sigaction sa;
|
||||
|
||||
/* parse out args */
|
||||
for (i = 1; i < *argcp;) {
|
||||
if (!strcmp(argv[i], "-geometry")) {
|
||||
@@ -239,7 +242,19 @@ void glutInit (int *argcp, char **argv)
|
||||
gettimeofday(&StartTime, 0);
|
||||
atexit(Cleanup);
|
||||
|
||||
signal(SIGSEGV, CrashHandler);
|
||||
/* set up SIGSEGV to use alternate stack */
|
||||
stack.ss_flags = 0;
|
||||
stack.ss_size = SIGSTKSZ;
|
||||
if(!(stack.ss_sp = malloc(SIGSTKSZ)))
|
||||
sprintf(exiterror, "Failed to allocate alternate stack for SIGSEGV!\n");
|
||||
|
||||
sigaltstack(&stack, NULL);
|
||||
|
||||
sa.sa_handler = CrashHandler;
|
||||
sa.sa_flags = SA_ONSTACK;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(SIGSEGV, &sa, NULL);
|
||||
|
||||
signal(SIGINT, CrashHandler);
|
||||
signal(SIGTERM, CrashHandler);
|
||||
signal(SIGABRT, CrashHandler);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,7 @@ extern "C" {
|
||||
#include "texobj.h"
|
||||
#include "teximage.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast/s_context.h"
|
||||
@@ -344,7 +344,7 @@ BGLView::BGLView(BRect rect, char *name,
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext(ctx);
|
||||
_ac_CreateContext(ctx);
|
||||
_vbo_CreateContext(ctx);
|
||||
_tnl_CreateContext(ctx);
|
||||
_swsetup_CreateContext(ctx);
|
||||
_swsetup_Wakeup(ctx);
|
||||
@@ -830,7 +830,7 @@ void MesaDriver::UpdateState( GLcontext *ctx, GLuint new_state )
|
||||
|
||||
_swrast_InvalidateState( ctx, new_state );
|
||||
_swsetup_InvalidateState( ctx, new_state );
|
||||
_ac_InvalidateState( ctx, new_state );
|
||||
_vbo_InvalidateState( ctx, new_state );
|
||||
_tnl_InvalidateState( ctx, new_state );
|
||||
|
||||
if (ctx->Color.DrawBuffer[0] == GL_FRONT) {
|
||||
|
||||
@@ -374,7 +374,7 @@ dfbUpdateState( GLcontext *ctx, GLuint new_state )
|
||||
{
|
||||
_swrast_InvalidateState( ctx, new_state );
|
||||
_swsetup_InvalidateState( ctx, new_state );
|
||||
_ac_InvalidateState( ctx, new_state );
|
||||
_vbo_InvalidateState( ctx, new_state );
|
||||
_tnl_InvalidateState( ctx, new_state );
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ directfbgl_create_context( GLcontext *context,
|
||||
}
|
||||
|
||||
_swrast_CreateContext( context );
|
||||
_ac_CreateContext( context );
|
||||
_vbo_CreateContext( context );
|
||||
_tnl_CreateContext( context );
|
||||
_swsetup_CreateContext( context );
|
||||
_swsetup_Wakeup( context );
|
||||
|
||||
@@ -50,7 +50,10 @@ intel_bufferobj_alloc(GLcontext * ctx, GLuint name, GLenum target)
|
||||
_mesa_initialize_buffer_object(&obj->Base, name, target);
|
||||
|
||||
driGenBuffers(intel->intelScreen->regionPool,
|
||||
"bufferobj", 1, &obj->buffer, 64, 0, 0);
|
||||
"bufferobj", 1, &obj->buffer, 64,
|
||||
DRM_BO_FLAG_MEM_LOCAL |
|
||||
DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE,
|
||||
0);
|
||||
|
||||
return &obj->Base;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,34 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include "mtypes.h"
|
||||
#include "colormac.h"
|
||||
|
||||
static void nv10ViewportScale(nouveauContextPtr nmesa)
|
||||
{
|
||||
GLcontext *ctx = nmesa->glCtx;
|
||||
GLuint w = ctx->Viewport.Width;
|
||||
GLuint h = ctx->Viewport.Height;
|
||||
|
||||
GLfloat max_depth = (ctx->Viewport.Near + ctx->Viewport.Far) * 0.5;
|
||||
/* if (ctx->DrawBuffer) {
|
||||
switch (ctx->DrawBuffer->_DepthBuffer->DepthBits) {
|
||||
case 16:
|
||||
max_depth *= 32767.0;
|
||||
break;
|
||||
case 24:
|
||||
max_depth *= 16777215.0;
|
||||
break;
|
||||
}
|
||||
} else {*/
|
||||
/* Default to 24 bits range */
|
||||
max_depth *= 16777215.0;
|
||||
/* }*/
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X, 4);
|
||||
OUT_RING_CACHEf ((((GLfloat) w) * 0.5) - 2048.0);
|
||||
OUT_RING_CACHEf ((((GLfloat) h) * 0.5) - 2048.0);
|
||||
OUT_RING_CACHEf (max_depth);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
}
|
||||
|
||||
static void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
@@ -98,16 +126,27 @@ static void nv10ClearColor(GLcontext *ctx, const GLfloat color[4])
|
||||
|
||||
static void nv10ClearDepth(GLcontext *ctx, GLclampd d)
|
||||
{
|
||||
/* FIXME: check if 16 or 24/32 bits depth buffer */
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8));
|
||||
|
||||
/* switch (ctx->DrawBuffer->_DepthBuffer->DepthBits) {
|
||||
case 16:
|
||||
nmesa->clear_value = (uint32_t)(d*0x7FFF);
|
||||
break;
|
||||
case 24:*/
|
||||
nmesa->clear_value = ((nmesa->clear_value&0x000000FF) |
|
||||
(((uint32_t)(d*0xFFFFFF))<<8));
|
||||
/* break;
|
||||
}*/
|
||||
}
|
||||
|
||||
static void nv10ClearStencil(GLcontext *ctx, GLint s)
|
||||
{
|
||||
/* FIXME: not valid for 16 bits depth buffer (0 stencil bits) */
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF));
|
||||
|
||||
/* if (ctx->DrawBuffer->_DepthBuffer->DepthBits == 24) {*/
|
||||
nmesa->clear_value = ((nmesa->clear_value&0xFFFFFF00)|
|
||||
(s&0x000000FF));
|
||||
/* }*/
|
||||
}
|
||||
|
||||
static void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation)
|
||||
@@ -164,9 +203,17 @@ static void nv10DepthMask(GLcontext *ctx, GLboolean flag)
|
||||
static void nv10DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
GLfloat depth_scale = 16777216.0;
|
||||
if (ctx->DrawBuffer->_DepthBuffer->DepthBits == 16) {
|
||||
depth_scale = 32768.0;
|
||||
}
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2);
|
||||
OUT_RING_CACHEf(nearval);
|
||||
OUT_RING_CACHEf(farval);
|
||||
OUT_RING_CACHEf(nearval * depth_scale);
|
||||
OUT_RING_CACHEf(farval * depth_scale);
|
||||
|
||||
nv10ViewportScale(nmesa);
|
||||
}
|
||||
|
||||
/** Specify the current buffer for writing */
|
||||
@@ -616,8 +663,10 @@ static void nv10WindowMoved(nouveauContextPtr nmesa)
|
||||
OUT_RING(0);
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 2);
|
||||
NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 1);
|
||||
OUT_RING_CACHE(((w+x-1) << 16) | x | 0x08000800);
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(0), 1);
|
||||
OUT_RING_CACHE(((h+y-1) << 16) | y | 0x08000800);
|
||||
for (i=1; i<8; i++) {
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
@@ -628,18 +677,7 @@ static void nv10WindowMoved(nouveauContextPtr nmesa)
|
||||
OUT_RING_CACHE(0);
|
||||
}
|
||||
|
||||
/* viewport transform */
|
||||
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X, 4);
|
||||
OUT_RING_CACHEf ((GLfloat) x);
|
||||
OUT_RING_CACHEf ((GLfloat) (y+h));
|
||||
OUT_RING_CACHEf (0.0);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X, 4);
|
||||
OUT_RING_CACHEf ((((GLfloat) w) * 0.5) - 2048.0);
|
||||
OUT_RING_CACHEf ((((GLfloat) h) * 0.5) - 2048.0);
|
||||
OUT_RING_CACHEf (16777215.0 * 0.5);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
nv10ViewportScale(nmesa);
|
||||
}
|
||||
|
||||
/* Initialise any card-specific non-GL related state */
|
||||
@@ -700,6 +738,13 @@ static GLboolean nv10BindBuffers(nouveauContextPtr nmesa, int num_color,
|
||||
OUT_RING_CACHE(color[0]->offset);
|
||||
OUT_RING_CACHE(depth ? depth->offset : color[0]->offset);
|
||||
|
||||
/* Always set to bottom left of buffer */
|
||||
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X, 4);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
OUT_RING_CACHEf ((GLfloat) h);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ static void nv20AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
|
||||
CLAMPED_FLOAT_TO_UBYTE(ubRef, ref);
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2);
|
||||
OUT_RING_CACHE(func); /* NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */
|
||||
OUT_RING_CACHE(ubRef); /* NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */
|
||||
OUT_RING_CACHE(func);
|
||||
OUT_RING_CACHE(ubRef);
|
||||
}
|
||||
|
||||
static void nv20BlendColor(GLcontext *ctx, const GLfloat color[4])
|
||||
@@ -76,6 +76,11 @@ static void nv20BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfac
|
||||
OUT_RING_CACHE((dfactorA<<16) | dfactorRGB);
|
||||
}
|
||||
|
||||
static void nv20Clear(GLcontext *ctx, GLbitfield mask)
|
||||
{
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
static void nv20ClearColor(GLcontext *ctx, const GLfloat color[4])
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
@@ -297,7 +302,11 @@ static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state)
|
||||
// case GL_POST_COLOR_MATRIX_COLOR_TABLE:
|
||||
// case GL_POST_CONVOLUTION_COLOR_TABLE:
|
||||
// case GL_RESCALE_NORMAL:
|
||||
// case GL_SCISSOR_TEST:
|
||||
case GL_SCISSOR_TEST:
|
||||
/* No enable bit, nv20Scissor will adjust to max range */
|
||||
ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
|
||||
ctx->Scissor.Width, ctx->Scissor.Height);
|
||||
break;
|
||||
// case GL_SEPARABLE_2D:
|
||||
case GL_STENCIL_TEST:
|
||||
// TODO BACK and FRONT ?
|
||||
@@ -511,9 +520,22 @@ static void nv20PolygonMode(GLcontext *ctx, GLenum face, GLenum mode)
|
||||
}
|
||||
|
||||
/** Set the scale and units used to calculate depth values */
|
||||
void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units);
|
||||
static void nv20PolygonOffset(GLcontext *ctx, GLfloat factor, GLfloat units)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR, 2);
|
||||
OUT_RING_CACHEf(factor);
|
||||
OUT_RING_CACHEf(units);
|
||||
}
|
||||
|
||||
/** Set the polygon stippling pattern */
|
||||
void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask );
|
||||
static void nv20PolygonStipple(GLcontext *ctx, const GLubyte *mask )
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN(0), 32);
|
||||
OUT_RING_CACHEp(mask, 32);
|
||||
}
|
||||
|
||||
/* Specifies the current buffer for reading */
|
||||
void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
|
||||
/** Set rasterization mode */
|
||||
@@ -522,6 +544,22 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode );
|
||||
/** Define the scissor box */
|
||||
static void nv20Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
/* There's no scissor enable bit, so adjust the scissor to cover the
|
||||
* maximum draw buffer bounds
|
||||
*/
|
||||
if (!ctx->Scissor.Enabled) {
|
||||
x = y = 0;
|
||||
w = h = 4095;
|
||||
} else {
|
||||
x += nmesa->drawX;
|
||||
y += nmesa->drawY;
|
||||
}
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SCISSOR_X2_X1, 2);
|
||||
OUT_RING_CACHE(((x+w-1) << 16) | x);
|
||||
OUT_RING_CACHE(((y+h-1) << 16) | y);
|
||||
}
|
||||
|
||||
/** Select flat or smooth shading */
|
||||
@@ -576,22 +614,103 @@ void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname,
|
||||
void (*TexParameter)(GLcontext *ctx, GLenum target,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum pname, const GLfloat *params);
|
||||
void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat);
|
||||
|
||||
/** Set the viewport */
|
||||
static void nv20Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
|
||||
static void nv20TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat)
|
||||
{
|
||||
/* TODO: Where do the VIEWPORT_XFRM_* regs come in? */
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2);
|
||||
OUT_RING_CACHE((w << 16) | x);
|
||||
OUT_RING_CACHE((h << 16) | y);
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_TX_MATRIX(unit, 0), 16);
|
||||
/*XXX: This SHOULD work.*/
|
||||
OUT_RING_CACHEp(mat->m, 16);
|
||||
}
|
||||
|
||||
/* Update anything that depends on the window position/size */
|
||||
static void nv20WindowMoved(nouveauContextPtr nmesa)
|
||||
{
|
||||
GLcontext *ctx = nmesa->glCtx;
|
||||
GLfloat *v = nmesa->viewport.m;
|
||||
GLuint w = ctx->Viewport.Width;
|
||||
GLuint h = ctx->Viewport.Height;
|
||||
GLuint x = ctx->Viewport.X + nmesa->drawX;
|
||||
GLuint y = ctx->Viewport.Y + nmesa->drawY;
|
||||
int i;
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2);
|
||||
OUT_RING_CACHE((w << 16) | x);
|
||||
OUT_RING_CACHE((h << 16) | y);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x02b4, 1);
|
||||
OUT_RING(0);
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV20_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 1);
|
||||
OUT_RING_CACHE((4095 << 16) | 0);
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV20_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(0), 1);
|
||||
OUT_RING_CACHE((4095 << 16) | 0);
|
||||
for (i=1; i<8; i++) {
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV20_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(i), 1);
|
||||
OUT_RING_CACHE(0);
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV20_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(i), 1);
|
||||
OUT_RING_CACHE(0);
|
||||
}
|
||||
|
||||
ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
|
||||
ctx->Scissor.Width, ctx->Scissor.Height);
|
||||
|
||||
/* TODO: recalc viewport scale coefs */
|
||||
}
|
||||
|
||||
/* Initialise any card-specific non-GL related state */
|
||||
static GLboolean nv20InitCard(nouveauContextPtr nmesa)
|
||||
{
|
||||
return GL_TRUE;
|
||||
nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SET_OBJECT1, 2);
|
||||
OUT_RING(NvDmaFB); /* 184 dma_object1 */
|
||||
OUT_RING(NvDmaFB); /* 188 dma_object2 */
|
||||
BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SET_OBJECT3, 2);
|
||||
OUT_RING(NvDmaFB); /* 194 dma_object3 */
|
||||
OUT_RING(NvDmaFB); /* 198 dma_object4 */
|
||||
BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SET_OBJECT8, 1);
|
||||
OUT_RING(NvDmaFB); /* 1a8 dma_object8 */
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x17e0, 3);
|
||||
OUT_RINGf(0.0);
|
||||
OUT_RINGf(0.0);
|
||||
OUT_RINGf(1.0);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x1e6c, 1);
|
||||
OUT_RING(0x0db6);
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x0290, 1);
|
||||
OUT_RING(0x00100001);
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x09fc, 1);
|
||||
OUT_RING(0);
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x1d80, 1);
|
||||
OUT_RING(1);
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x09f8, 1);
|
||||
OUT_RING(4);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x17ec, 3);
|
||||
OUT_RINGf(0.0);
|
||||
OUT_RINGf(1.0);
|
||||
OUT_RINGf(0.0);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x1d88, 1);
|
||||
OUT_RING(3);
|
||||
|
||||
/* FIXME: More dma objects to setup ? */
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x1e98, 1);
|
||||
OUT_RING(0);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x120, 3);
|
||||
OUT_RING(0);
|
||||
OUT_RING(1);
|
||||
OUT_RING(2);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
/* Update buffer offset/pitch/format */
|
||||
@@ -599,26 +718,57 @@ static GLboolean nv20BindBuffers(nouveauContextPtr nmesa, int num_color,
|
||||
nouveau_renderbuffer **color,
|
||||
nouveau_renderbuffer *depth)
|
||||
{
|
||||
return GL_TRUE;
|
||||
}
|
||||
GLuint x, y, w, h;
|
||||
GLuint pitch, format, depth_pitch;
|
||||
|
||||
/* Update anything that depends on the window position/size */
|
||||
static void nv20WindowMoved(nouveauContextPtr nmesa)
|
||||
{
|
||||
w = color[0]->mesa.Width;
|
||||
h = color[0]->mesa.Height;
|
||||
x = nmesa->drawX;
|
||||
y = nmesa->drawY;
|
||||
|
||||
if (num_color != 1)
|
||||
return GL_FALSE;
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 6);
|
||||
OUT_RING_CACHE((w << 16) | x);
|
||||
OUT_RING_CACHE((h << 16) | y);
|
||||
depth_pitch = (depth ? depth->pitch : color[0]->pitch);
|
||||
pitch = (depth_pitch<<16) | color[0]->pitch;
|
||||
format = 0x128;
|
||||
if (color[0]->mesa._ActualFormat != GL_RGBA8) {
|
||||
format = 0x123; /* R5G6B5 color buffer */
|
||||
}
|
||||
OUT_RING_CACHE(format);
|
||||
OUT_RING_CACHE(pitch);
|
||||
OUT_RING_CACHE(color[0]->offset);
|
||||
OUT_RING_CACHE(depth ? depth->offset : color[0]->offset);
|
||||
|
||||
if (depth) {
|
||||
BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_PITCH, 2);
|
||||
/* TODO: use a different buffer */
|
||||
OUT_RING(depth->pitch);
|
||||
OUT_RING(depth->offset);
|
||||
}
|
||||
|
||||
/* Always set to bottom left of buffer */
|
||||
BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X, 4);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
OUT_RING_CACHEf ((GLfloat) h);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
OUT_RING_CACHEf (0.0);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
void nv20InitStateFuncs(GLcontext *ctx, struct dd_function_table *func)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
nmesa->hw_func.InitCard = nv20InitCard;
|
||||
nmesa->hw_func.BindBuffers = nv20BindBuffers;
|
||||
nmesa->hw_func.WindowMoved = nv20WindowMoved;
|
||||
|
||||
func->AlphaFunc = nv20AlphaFunc;
|
||||
func->BlendColor = nv20BlendColor;
|
||||
func->BlendEquationSeparate = nv20BlendEquationSeparate;
|
||||
func->BlendFuncSeparate = nv20BlendFuncSeparate;
|
||||
func->Clear = nv20Clear;
|
||||
func->ClearColor = nv20ClearColor;
|
||||
func->ClearDepth = nv20ClearDepth;
|
||||
func->ClearStencil = nv20ClearStencil;
|
||||
@@ -641,22 +791,21 @@ void nv20InitStateFuncs(GLcontext *ctx, struct dd_function_table *func)
|
||||
func->PointParameterfv = nv20PointParameterfv;
|
||||
func->PointSize = nv20PointSize;
|
||||
func->PolygonMode = nv20PolygonMode;
|
||||
#if 0
|
||||
func->PolygonOffset = nv20PolygonOffset;
|
||||
func->PolygonStipple = nv20PolygonStipple;
|
||||
func->ReadBuffer = nv20ReadBuffer;
|
||||
func->RenderMode = nv20RenderMode;
|
||||
#endif
|
||||
/* func->ReadBuffer = nv20ReadBuffer;*/
|
||||
/* func->RenderMode = nv20RenderMode;*/
|
||||
func->Scissor = nv20Scissor;
|
||||
func->ShadeModel = nv20ShadeModel;
|
||||
func->StencilFuncSeparate = nv20StencilFuncSeparate;
|
||||
func->StencilMaskSeparate = nv20StencilMaskSeparate;
|
||||
func->StencilOpSeparate = nv20StencilOpSeparate;
|
||||
#if 0
|
||||
func->TexGen = nv20TexGen;
|
||||
func->TexParameter = nv20TexParameter;
|
||||
/* func->TexGen = nv20TexGen;*/
|
||||
/* func->TexParameter = nv20TexParameter;*/
|
||||
func->TextureMatrix = nv20TextureMatrix;
|
||||
#endif
|
||||
func->Viewport = nv20Viewport;
|
||||
|
||||
nmesa->hw_func.InitCard = nv20InitCard;
|
||||
nmesa->hw_func.BindBuffers = nv20BindBuffers;
|
||||
nmesa->hw_func.WindowMoved = nv20WindowMoved;
|
||||
}
|
||||
|
||||
|
||||
@@ -293,7 +293,11 @@ static void nv50Enable(GLcontext *ctx, GLenum cap, GLboolean state)
|
||||
// case GL_POST_COLOR_MATRIX_COLOR_TABLE:
|
||||
// case GL_POST_CONVOLUTION_COLOR_TABLE:
|
||||
// case GL_RESCALE_NORMAL:
|
||||
// case GL_SCISSOR_TEST:
|
||||
case GL_SCISSOR_TEST:
|
||||
/* No enable bit, nv50Scissor will adjust to max range */
|
||||
ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
|
||||
ctx->Scissor.Width, ctx->Scissor.Height);
|
||||
break;
|
||||
// case GL_SEPARABLE_2D:
|
||||
case GL_STENCIL_TEST:
|
||||
// TODO BACK and FRONT ?
|
||||
@@ -416,6 +420,21 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode );
|
||||
static void nv50Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
/* There's no scissor enable bit, so adjust the scissor to cover the
|
||||
* maximum draw buffer bounds
|
||||
*/
|
||||
if (!ctx->Scissor.Enabled) {
|
||||
x = y = 0;
|
||||
w = h = 8191;
|
||||
} else {
|
||||
x += nmesa->drawX;
|
||||
y += nmesa->drawY;
|
||||
}
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D, NV50_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS, 2);
|
||||
OUT_RING_CACHE(((w) << 16) | x);
|
||||
OUT_RING_CACHE(((h) << 16) | y);
|
||||
}
|
||||
|
||||
/** Select flat or smooth shading */
|
||||
@@ -503,10 +522,65 @@ static void nv50TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat)
|
||||
|
||||
static void nv50WindowMoved(nouveauContextPtr nmesa)
|
||||
{
|
||||
GLcontext *ctx = nmesa->glCtx;
|
||||
GLfloat *v = nmesa->viewport.m;
|
||||
GLuint w = ctx->Viewport.Width;
|
||||
GLuint h = ctx->Viewport.Height;
|
||||
GLuint x = ctx->Viewport.X + nmesa->drawX;
|
||||
GLuint y = ctx->Viewport.Y + nmesa->drawY;
|
||||
int i;
|
||||
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV50_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 2);
|
||||
OUT_RING_CACHE((8191 << 16) | 0);
|
||||
OUT_RING_CACHE((8191 << 16) | 0);
|
||||
for (i=1; i<8; i++) {
|
||||
BEGIN_RING_CACHE(NvSub3D,
|
||||
NV50_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(i), 2);
|
||||
OUT_RING_CACHE(0);
|
||||
OUT_RING_CACHE(0);
|
||||
}
|
||||
|
||||
ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
|
||||
ctx->Scissor.Width, ctx->Scissor.Height);
|
||||
}
|
||||
|
||||
static GLboolean nv50InitCard(nouveauContextPtr nmesa)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x1558, 1);
|
||||
OUT_RING(1);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV50_TCL_PRIMITIVE_3D_SET_OBJECT_1(0), 8);
|
||||
for (i=0; i<8; i++) {
|
||||
OUT_RING(NvDmaFB);
|
||||
}
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV50_TCL_PRIMITIVE_3D_SET_OBJECT_0(0), 12);
|
||||
for (i=0; i<12; i++) {
|
||||
OUT_RING(NvDmaFB);
|
||||
}
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x121c, 1);
|
||||
OUT_RING(1);
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x0200 + (i*0x20), 5);
|
||||
for (j=0; j<5; j++) {
|
||||
OUT_RING(0);
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, 0x0fe0, 5);
|
||||
OUT_RING(0);
|
||||
OUT_RING(0);
|
||||
OUT_RING(0x16);
|
||||
OUT_RING(0);
|
||||
OUT_RING(0);
|
||||
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,9 +90,11 @@ COMMON_SYMLINKS = \
|
||||
|
||||
include ../Makefile.template
|
||||
|
||||
$(SYMLINKS):
|
||||
server:
|
||||
mkdir -p server
|
||||
for i in $(SYMLINKS) ; do rm -f $$i && test -f ../radeon/$$i && ln -s ../../radeon/$$i $$i ; done
|
||||
|
||||
$(SYMLINKS): server
|
||||
@[ -e $@ ] || ln -sf ../../radeon/$@ server/
|
||||
|
||||
$(COMMON_SYMLINKS):
|
||||
@[ -e $@ ] || ln -sf ../radeon/$@ ./
|
||||
|
||||
@@ -731,7 +731,7 @@ struct r300_fragment_program {
|
||||
int max_temp_idx;
|
||||
|
||||
/* the index of the sin constant is stored here */
|
||||
GLint const_sin;
|
||||
GLint const_sin[2];
|
||||
|
||||
GLuint optimization;
|
||||
};
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
/*TODO'S
|
||||
*
|
||||
* - SCS instructions
|
||||
* - Depth write, WPOS/FOGC inputs
|
||||
* - FogOption
|
||||
* - Verify results of opcodes for accuracy, I've only checked them
|
||||
@@ -1081,7 +1080,7 @@ static void emit_arith(struct r300_fragment_program *rp,
|
||||
break;
|
||||
}
|
||||
if (emit_sop &&
|
||||
(s_swiz[REG_GET_VSWZ(src[i])].flags & SLOT_VECTOR)) {
|
||||
(s_swiz[REG_GET_SSWZ(src[i])].flags & SLOT_VECTOR)) {
|
||||
vpos = spos = MAX2(vpos, spos);
|
||||
break;
|
||||
}
|
||||
@@ -1204,6 +1203,25 @@ static GLuint get_attrib(struct r300_fragment_program *rp, GLuint attr)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void make_sin_const(struct r300_fragment_program *rp)
|
||||
{
|
||||
if(rp->const_sin[0] == -1){
|
||||
GLfloat cnstv[4];
|
||||
|
||||
cnstv[0] = 1.273239545; // 4/PI
|
||||
cnstv[1] =-0.405284735; // -4/(PI*PI)
|
||||
cnstv[2] = 3.141592654; // PI
|
||||
cnstv[3] = 0.2225; // weight
|
||||
rp->const_sin[0] = emit_const4fv(rp, cnstv);
|
||||
|
||||
cnstv[0] = 0.5;
|
||||
cnstv[1] = -1.5;
|
||||
cnstv[2] = 0.159154943; // 1/(2*PI)
|
||||
cnstv[3] = 6.283185307; // 2*PI
|
||||
rp->const_sin[1] = emit_const4fv(rp, cnstv);
|
||||
}
|
||||
}
|
||||
|
||||
static GLboolean parse_program(struct r300_fragment_program *rp)
|
||||
{
|
||||
struct gl_fragment_program *mp = &rp->mesa_program;
|
||||
@@ -1260,84 +1278,68 @@ static GLboolean parse_program(struct r300_fragment_program *rp)
|
||||
* cos using a parabola (see SIN):
|
||||
* cos(x):
|
||||
* x += PI/2
|
||||
* x = (x < PI)?x : x-2*PI
|
||||
* x = (x/(2*PI))+0.5
|
||||
* x = frac(x)
|
||||
* x = (x*2*PI)-PI
|
||||
* result = sin(x)
|
||||
*/
|
||||
temp = get_temp_reg(rp);
|
||||
if(rp->const_sin == -1){
|
||||
cnstv[0] = 1.273239545;
|
||||
cnstv[1] =-0.405284735;
|
||||
cnstv[2] = 3.141592654;
|
||||
cnstv[3] = 0.225;
|
||||
rp->const_sin = emit_const4fv(rp, cnstv);
|
||||
}
|
||||
cnst = rp->const_sin;
|
||||
make_sin_const(rp);
|
||||
src[0] = t_scalar_src(rp, fpi->SrcReg[0]);
|
||||
|
||||
emit_arith(rp, PFS_OP_LG2, temp, WRITEMASK_W,
|
||||
pfs_half,
|
||||
undef,
|
||||
undef,
|
||||
0);
|
||||
/* add 0.5*PI and do range reduction */
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(cnst, Z, Z, Z, Z), //PI
|
||||
swizzle(rp->const_sin[0], Z, Z, Z, Z), //PI
|
||||
pfs_half,
|
||||
swizzle(keep(src[0]), X, X, X, X),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_W,
|
||||
negate(swizzle(temp, W, W, W, W)), //-2
|
||||
swizzle(cnst, Z, Z, Z, Z), //PI
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(temp, X, X, X, X),
|
||||
swizzle(rp->const_sin[1], Z, Z, Z, Z),
|
||||
pfs_half,
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Y,
|
||||
swizzle(cnst, Z, Z, Z, Z), //PI
|
||||
negate(pfs_half),
|
||||
swizzle(src[0], X, X, X, X),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_CMP, temp, WRITEMASK_Z,
|
||||
swizzle(temp, W, W, W, W),
|
||||
emit_arith(rp, PFS_OP_FRC, temp, WRITEMASK_X,
|
||||
swizzle(temp, X, X, X, X),
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
undef,
|
||||
undef,
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Z,
|
||||
swizzle(temp, X, X, X, X),
|
||||
swizzle(rp->const_sin[1], W, W, W, W), //2*PI
|
||||
negate(swizzle(rp->const_sin[0], Z, Z, Z, Z)), //-PI
|
||||
0);
|
||||
|
||||
/* SIN */
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X | WRITEMASK_Y,
|
||||
swizzle(temp, Z, Z, Z, Z),
|
||||
cnst,
|
||||
rp->const_sin[0],
|
||||
pfs_zero,
|
||||
0);
|
||||
|
||||
if(rp->optimization == DRI_CONF_FP_OPTIMIZATION_SPEED){
|
||||
emit_arith(rp, PFS_OP_MAD, dest, mask,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(temp, Z, Z, Z, Z)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
flags);
|
||||
}else{
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(temp, Z, Z, Z, Z)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
0);
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(temp, Z, Z, Z, Z)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Y,
|
||||
swizzle(temp, X, X, X, X),
|
||||
absolute(swizzle(temp, X, X, X, X)),
|
||||
negate(swizzle(temp, X, X, X, X)),
|
||||
0);
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Y,
|
||||
swizzle(temp, X, X, X, X),
|
||||
absolute(swizzle(temp, X, X, X, X)),
|
||||
negate(swizzle(temp, X, X, X, X)),
|
||||
0);
|
||||
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, dest, mask,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
swizzle(cnst, W, W, W, W),
|
||||
swizzle(temp, X, X, X, X),
|
||||
flags);
|
||||
}
|
||||
emit_arith(rp, PFS_OP_MAD, dest, mask,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
swizzle(rp->const_sin[0], W, W, W, W),
|
||||
swizzle(temp, X, X, X, X),
|
||||
flags);
|
||||
|
||||
free_temp(rp, temp);
|
||||
break;
|
||||
case OPCODE_DP3:
|
||||
@@ -1577,7 +1579,93 @@ static GLboolean parse_program(struct r300_fragment_program *rp)
|
||||
flags);
|
||||
break;
|
||||
case OPCODE_SCS:
|
||||
ERROR("SCS not implemented\n");
|
||||
/*
|
||||
* cos using a parabola (see SIN):
|
||||
* cos(x):
|
||||
* x += PI/2
|
||||
* x = (x/(2*PI))+0.5
|
||||
* x = frac(x)
|
||||
* x = (x*2*PI)-PI
|
||||
* result = sin(x)
|
||||
*/
|
||||
temp = get_temp_reg(rp);
|
||||
make_sin_const(rp);
|
||||
src[0] = t_scalar_src(rp, fpi->SrcReg[0]);
|
||||
|
||||
/* add 0.5*PI and do range reduction */
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X|WRITEMASK_Y,
|
||||
swizzle(rp->const_sin[0], Z, Z, Z, Z),
|
||||
rp->const_sin[1],
|
||||
swizzle(keep(src[0]), X, X, X, X),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_CMP, temp, WRITEMASK_W,
|
||||
swizzle(rp->const_sin[0], Z, Z, Z, Z),
|
||||
negate(pfs_half),
|
||||
swizzle(keep(src[0]), X, X, X, X),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_CMP, temp, WRITEMASK_Z,
|
||||
swizzle(temp, X, X, X, X),
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
swizzle(temp, W, W, W, W),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X | WRITEMASK_Y,
|
||||
swizzle(temp, Z, Z, Z, Z),
|
||||
rp->const_sin[0],
|
||||
pfs_zero,
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_W,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(temp, Z, Z, Z, Z)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
0);
|
||||
|
||||
if(mask & WRITEMASK_Y)
|
||||
{
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X | WRITEMASK_Y,
|
||||
swizzle(keep(src[0]), X, X, X, X),
|
||||
rp->const_sin[0],
|
||||
pfs_zero,
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(keep(src[0]), X, X, X, X)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
0);
|
||||
}
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Z,
|
||||
swizzle(temp, W, W, W, W),
|
||||
absolute(swizzle(temp, W, W, W, W)),
|
||||
negate(swizzle(temp, W, W, W, W)),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, dest, WRITEMASK_X,
|
||||
swizzle(temp, Z, Z, Z, Z),
|
||||
swizzle(rp->const_sin[0], W, W, W, W),
|
||||
swizzle(temp, W, W, W, W),
|
||||
flags);
|
||||
|
||||
if(mask & WRITEMASK_Y)
|
||||
{
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_W,
|
||||
swizzle(temp, X, X, X, X),
|
||||
absolute(swizzle(temp, X, X, X, X)),
|
||||
negate(swizzle(temp, X, X, X, X)),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, dest, WRITEMASK_Y,
|
||||
swizzle(temp, W, W, W, W),
|
||||
swizzle(rp->const_sin[0], W, W, W, W),
|
||||
swizzle(temp, X, X, X, X),
|
||||
flags);
|
||||
}
|
||||
free_temp(rp, temp);
|
||||
break;
|
||||
case OPCODE_SGE:
|
||||
src[0] = t_src(rp, fpi->SrcReg[0]);
|
||||
@@ -1603,48 +1691,56 @@ static GLboolean parse_program(struct r300_fragment_program *rp)
|
||||
*/
|
||||
|
||||
temp = get_temp_reg(rp);
|
||||
if(rp->const_sin == -1){
|
||||
cnstv[0] = 1.273239545;
|
||||
cnstv[1] =-0.405284735;
|
||||
cnstv[2] = 3.141592654;
|
||||
cnstv[3] = 0.225;
|
||||
rp->const_sin = emit_const4fv(rp, cnstv);
|
||||
}
|
||||
cnst = rp->const_sin;
|
||||
make_sin_const(rp);
|
||||
src[0] = t_scalar_src(rp, fpi->SrcReg[0]);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X | WRITEMASK_Y,
|
||||
/* do range reduction */
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(keep(src[0]), X, X, X, X),
|
||||
cnst,
|
||||
swizzle(rp->const_sin[1], Z, Z, Z, Z),
|
||||
pfs_half,
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_FRC, temp, WRITEMASK_X,
|
||||
swizzle(temp, X, X, X, X),
|
||||
undef,
|
||||
undef,
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Z,
|
||||
swizzle(temp, X, X, X, X),
|
||||
swizzle(rp->const_sin[1], W, W, W, W), //2*PI
|
||||
negate(swizzle(rp->const_sin[0], Z, Z, Z, Z)), //PI
|
||||
0);
|
||||
|
||||
/* SIN */
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X | WRITEMASK_Y,
|
||||
swizzle(temp, Z, Z, Z, Z),
|
||||
rp->const_sin[0],
|
||||
pfs_zero,
|
||||
0);
|
||||
|
||||
if(rp->optimization == DRI_CONF_FP_OPTIMIZATION_SPEED){
|
||||
emit_arith(rp, PFS_OP_MAD, dest, mask,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(src[0], X, X, X, X)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
flags);
|
||||
}else{
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(src[0], X, X, X, X)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
0);
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_X,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
absolute(swizzle(temp, Z, Z, Z, Z)),
|
||||
swizzle(temp, X, X, X, X),
|
||||
0);
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Y,
|
||||
swizzle(temp, X, X, X, X),
|
||||
absolute(swizzle(temp, X, X, X, X)),
|
||||
negate(swizzle(temp, X, X, X, X)),
|
||||
0);
|
||||
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_Y,
|
||||
swizzle(temp, X, X, X, X),
|
||||
absolute(swizzle(temp, X, X, X, X)),
|
||||
negate(swizzle(temp, X, X, X, X)),
|
||||
0);
|
||||
|
||||
|
||||
emit_arith(rp, PFS_OP_MAD, dest, mask,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
swizzle(cnst, W, W, W, W),
|
||||
swizzle(temp, X, X, X, X),
|
||||
flags);
|
||||
}
|
||||
emit_arith(rp, PFS_OP_MAD, dest, mask,
|
||||
swizzle(temp, Y, Y, Y, Y),
|
||||
swizzle(rp->const_sin[0], W, W, W, W),
|
||||
swizzle(temp, X, X, X, X),
|
||||
flags);
|
||||
|
||||
free_temp(rp, temp);
|
||||
break;
|
||||
case OPCODE_SLT:
|
||||
@@ -1739,7 +1835,7 @@ static void init_program(r300ContextPtr r300, struct r300_fragment_program *rp)
|
||||
rp->max_temp_idx = 0;
|
||||
rp->node[0].alu_end = -1;
|
||||
rp->node[0].tex_end = -1;
|
||||
rp->const_sin = -1;
|
||||
rp->const_sin[0] = -1;
|
||||
|
||||
_mesa_memset(cs, 0, sizeof(*rp->cs));
|
||||
for (i=0;i<PFS_MAX_ALU_INST;i++) {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "tnl/tnl.h"
|
||||
@@ -143,7 +143,7 @@ update_state( GLcontext *ctx, GLuint new_state )
|
||||
/* not much to do here - pass it on */
|
||||
_swrast_InvalidateState( ctx, new_state );
|
||||
_swsetup_InvalidateState( ctx, new_state );
|
||||
_ac_InvalidateState( ctx, new_state );
|
||||
_vbo_InvalidateState( ctx, new_state );
|
||||
_tnl_InvalidateState( ctx, new_state );
|
||||
}
|
||||
|
||||
@@ -776,7 +776,7 @@ glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share )
|
||||
/* Create module contexts */
|
||||
glctx = (GLcontext *) &ctx->glcontext;
|
||||
_swrast_CreateContext( glctx );
|
||||
_ac_CreateContext( glctx );
|
||||
_vbo_CreateContext( glctx );
|
||||
_tnl_CreateContext( glctx );
|
||||
_swsetup_CreateContext( glctx );
|
||||
_swsetup_Wakeup( glctx );
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "tnl/tnl.h"
|
||||
#include "tnl/t_context.h"
|
||||
#include "tnl/t_pipeline.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "teximage.h"
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
@@ -563,7 +563,7 @@ ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis)
|
||||
_mesa_enable_sw_extensions(ctx->gl_ctx);
|
||||
|
||||
_swrast_CreateContext(ctx->gl_ctx);
|
||||
_ac_CreateContext(ctx->gl_ctx);
|
||||
_vbo_CreateContext(ctx->gl_ctx);
|
||||
_tnl_CreateContext(ctx->gl_ctx);
|
||||
_swsetup_CreateContext(ctx->gl_ctx);
|
||||
|
||||
|
||||
@@ -1783,7 +1783,7 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa)
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext(ctx);
|
||||
_ac_CreateContext(ctx);
|
||||
_vbo_CreateContext(ctx);
|
||||
_tnl_CreateContext(ctx);
|
||||
_swsetup_CreateContext(ctx);
|
||||
|
||||
@@ -1826,7 +1826,7 @@ fxDDDestroyFxMesaContext(fxMesaContext fxMesa)
|
||||
{
|
||||
_swsetup_DestroyContext(fxMesa->glCtx);
|
||||
_tnl_DestroyContext(fxMesa->glCtx);
|
||||
_ac_DestroyContext(fxMesa->glCtx);
|
||||
_vbo_DestroyContext(fxMesa->glCtx);
|
||||
_swrast_DestroyContext(fxMesa->glCtx);
|
||||
|
||||
if (fxMesa->state)
|
||||
@@ -2101,7 +2101,7 @@ fxDDUpdateDDPointers(GLcontext * ctx, GLuint new_state)
|
||||
}
|
||||
|
||||
_swrast_InvalidateState(ctx, new_state);
|
||||
_ac_InvalidateState(ctx, new_state);
|
||||
_vbo_InvalidateState(ctx, new_state);
|
||||
_tnl_InvalidateState(ctx, new_state);
|
||||
_swsetup_InvalidateState(ctx, new_state);
|
||||
|
||||
|
||||
@@ -859,9 +859,9 @@ EXPORTS
|
||||
wglGetExtensionsStringARB
|
||||
;
|
||||
; Mesa internals - mostly for OSMESA
|
||||
_ac_CreateContext
|
||||
_ac_DestroyContext
|
||||
_ac_InvalidateState
|
||||
_vbo_CreateContext
|
||||
_vbo_DestroyContext
|
||||
_vbo_InvalidateState
|
||||
_glapi_check_multithread
|
||||
_glapi_get_context
|
||||
_glapi_get_proc_address
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "framebuffer.h"
|
||||
#include "renderbuffer.h"
|
||||
#include "drivers/common/driverfuncs.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "tnl/tnl.h"
|
||||
@@ -1125,7 +1125,7 @@ static void wmesa_update_state(GLcontext *ctx, GLuint new_state)
|
||||
{
|
||||
_swrast_InvalidateState(ctx, new_state);
|
||||
_swsetup_InvalidateState(ctx, new_state);
|
||||
_ac_InvalidateState(ctx, new_state);
|
||||
_vbo_InvalidateState(ctx, new_state);
|
||||
_tnl_InvalidateState(ctx, new_state);
|
||||
|
||||
/* TODO - This code is not complete yet because I
|
||||
@@ -1242,7 +1242,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
|
||||
|
||||
/* Initialize the software rasterizer and helper modules. */
|
||||
if (!_swrast_CreateContext(ctx) ||
|
||||
!_ac_CreateContext(ctx) ||
|
||||
!_vbo_CreateContext(ctx) ||
|
||||
!_tnl_CreateContext(ctx) ||
|
||||
!_swsetup_CreateContext(ctx)) {
|
||||
_mesa_free_context_data(ctx);
|
||||
@@ -1285,7 +1285,7 @@ void WMesaDestroyContext( WMesaContext pwc )
|
||||
|
||||
_swsetup_DestroyContext(ctx);
|
||||
_tnl_DestroyContext(ctx);
|
||||
_ac_DestroyContext(ctx);
|
||||
_vbo_DestroyContext(ctx);
|
||||
_swrast_DestroyContext(ctx);
|
||||
|
||||
_mesa_free_context_data(ctx);
|
||||
|
||||
@@ -1453,7 +1453,7 @@ SkipPrimaryCreate:
|
||||
#ifdef _USE_GLD3_WGL
|
||||
// Init Mesa internals
|
||||
_swrast_CreateContext( lpCtx->glCtx );
|
||||
_ac_CreateContext( lpCtx->glCtx );
|
||||
_vbo_CreateContext( lpCtx->glCtx );
|
||||
_tnl_CreateContext( lpCtx->glCtx );
|
||||
_swsetup_CreateContext( lpCtx->glCtx );
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
#include "tnl/tnl.h"
|
||||
@@ -868,7 +868,7 @@ void gld_update_state_DX7(
|
||||
return;
|
||||
|
||||
_swsetup_InvalidateState( ctx, new_state );
|
||||
_ac_InvalidateState( ctx, new_state );
|
||||
_vbo_InvalidateState( ctx, new_state );
|
||||
_tnl_InvalidateState( ctx, new_state );
|
||||
|
||||
// SetupIndex will be used in the pipelines for choosing setup function
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "mtypes.h"
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
#include "tnl/tnl.h"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "mtypes.h"
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
#include "tnl/tnl.h"
|
||||
@@ -850,7 +850,7 @@ void gld_update_state_DX8(
|
||||
return;
|
||||
|
||||
_swsetup_InvalidateState( ctx, new_state );
|
||||
_ac_InvalidateState( ctx, new_state );
|
||||
_vbo_InvalidateState( ctx, new_state );
|
||||
_tnl_InvalidateState( ctx, new_state );
|
||||
|
||||
// SetupIndex will be used in the pipelines for choosing setup function
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "mtypes.h"
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
#include "tnl/tnl.h"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "mtypes.h"
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
#include "tnl/tnl.h"
|
||||
@@ -876,7 +876,7 @@ void gld_update_state_DX9(
|
||||
return;
|
||||
|
||||
_swsetup_InvalidateState( ctx, new_state );
|
||||
_ac_InvalidateState( ctx, new_state );
|
||||
_vbo_InvalidateState( ctx, new_state );
|
||||
_tnl_InvalidateState( ctx, new_state );
|
||||
|
||||
// SetupIndex will be used in the pipelines for choosing setup function
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "mtypes.h"
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
#include "tnl/tnl.h"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "mtypes.h"
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast_setup/ss_context.h"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "texformat.h"
|
||||
#include "texstore.h"
|
||||
#include "teximage.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "vbo/vbo.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "swrast/s_context.h"
|
||||
@@ -1321,7 +1321,7 @@ static void wmesa_update_state(
|
||||
{
|
||||
_swrast_InvalidateState( ctx, new_state );
|
||||
_swsetup_InvalidateState( ctx, new_state );
|
||||
_ac_InvalidateState( ctx, new_state );
|
||||
_vbo_InvalidateState( ctx, new_state );
|
||||
_tnl_InvalidateState( ctx, new_state );
|
||||
}
|
||||
|
||||
@@ -1631,7 +1631,7 @@ BOOL gldInitialiseMesa_MesaSW(
|
||||
_mesa_enable_1_3_extensions(ctx);
|
||||
|
||||
// _swrast_CreateContext( ctx );
|
||||
// _ac_CreateContext( ctx );
|
||||
// _vbo_CreateContext( ctx );
|
||||
// _tnl_CreateContext( ctx );
|
||||
// _swsetup_CreateContext( ctx );
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ EXPORTS
|
||||
|
||||
;
|
||||
; Mesa internals - mostly for OSMESA
|
||||
_ac_CreateContext
|
||||
_ac_DestroyContext
|
||||
_ac_InvalidateState
|
||||
_vbo_CreateContext
|
||||
_vbo_DestroyContext
|
||||
_vbo_InvalidateState
|
||||
_glapi_get_context
|
||||
_glapi_get_proc_address
|
||||
_mesa_buffer_data
|
||||
|
||||
Reference in New Issue
Block a user