summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-18i965/vs: Add a new dst_reg constructor for file, number, type, and mask.Kenneth Graunke1-0/+10
This will be especially useful for loading texturing parameters, where I need to (for example) reference m3.xz<D>. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-18i965/vs: Add vec4_instruction::is_tex() query.Kenneth Graunke2-0/+11
Copy and pasted from fs_inst::is_tex(), but without TXB. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-18i965: Rename texturing ops from FS_OPCODE to SHADER_OPCODE, except TXB.Kenneth Graunke5-46/+48
We'll be reusing most of these for the VS shortly. The one exception is TXB (texturing with LOD bias), which is explicitly forbidden in the VS. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-18i965/fs: Don't swizzle the results of textureSize().Kenneth Graunke1-0/+3
Fixes a regression since d2235b0f4681f75d562131d655a6d7b7033d2d8b, in my new textureSize sampler(1DArrayShadow|2DShadow|2DArrayShadow) piglit tests, though I'm not honestly sure how this ever worked. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-18program: fix previous commitnobled1-1/+1
Accidentally an old patch.
2011-12-18program: fix out of bounds array accesses and other bad thingsnobled1-15/+59
Noticed a "warning: array subscript is above array bounds" given at one of the existing sanity-check asserts. Turns out all the arrays of strings haven't matched the corresponding enum values in a while, if ever. I didn't know the proper names for any of these and couldn't find them in the base specs aside from "result.pointsize" in ARB_vertex_program, so I just filled in the enum's value as was done with other slots. Also add four STATIC_ASSERT()s to be sure and catch future additions or bumps to MAX_VARYING/etc again, and some more non-static asserts where there weren't any before. (Note, the fragment enum that corresponded to result.color(half) was removed in 8d475822e6e19fa79719c856a2db5b6a205db1b9.) Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-18gen_matypes: eliminate printf warningsnobled1-1/+6
The VERT_BIT_* defines are 64-bit values now, but the printf was still expecting a simple int.
2011-12-17r600g: fix MAX_STREAM_OUTPUT_SEPARATE_ATTRIBS limitMarek Olšák1-2/+1
2011-12-17mesa/x86: fix printf warningMarek Olšák1-1/+1
2011-12-17drisw: remove unused variableMarek Olšák1-1/+2
2011-12-17r600g: handle new capsMarek Olšák1-0/+2
2011-12-17r300g: handle new capsMarek Olšák1-0/+4
2011-12-17docs: update GL3 statusMarek Olšák1-2/+2
2011-12-17r600g: implement transform feedbackMarek Olšák18-13/+873
r600: DONE. r700: MOSTLY (done but locks up). Evergreen: MOSTLY (done but doesn't work for an unknown reason). The kernel support will come soon.
2011-12-17st/mesa: expose conservative_depth if GLSL 1.3 is supportedMarek Olšák1-0/+6
It's not yet, but it can be enabled by the override environment variable.
2011-12-16gallivm: Fix build with llvm-3.1svn.Vinson Lee2-1/+15
llvm-3.1svn r145714 moved global variables into a new TargetOptions class. TargetMachine constructor now needs a TargetOptions object as well. Signed-off-by: Vinson Lee <vlee@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-16mesa: Fix memory leak on error path.Vinson Lee1-0/+1
Fixes Coverity resource leak defect. Signed-off-by: Vinson Lee <vlee@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-16st/mesa: Fix memory leak in out-of-memory path.Vinson Lee1-0/+1
Fixes Coverity resource leak defect. Signed-off-by: Vinson Lee <vlee@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-16meta: use _mesa_prepare_mipmap_level() in the mipmap generation codeBrian Paul1-35/+12
See previous commit for more information. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16mesa: new _mesa_prepare_mipmap_level() function for mipmap generationBrian Paul2-33/+101
This helper function is used during mipmap generation to prepare space for the destination mipmap levels. This improves/fixes two things: 1. If the texture object was created with glTexStorage2D, calling _mesa_TexImage2D() to allocate the new image would generate INVALID_OPERATION since the texture is marked as immutable. 2. _mesa_TexImage2D() always frees any existing texture image memory before allocating new memory. That's inefficient if the existing image is the right size already. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16mesa: make update_fbo_texture() non-staticBrian Paul2-5/+10
We'll call this from the mipmap generation code. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16mesa: whitespace and comment fixes in fbobject.cBrian Paul1-9/+11
2011-12-16mesa: add MESA_FORMAT_RGB565[_REV] as candidates for GL_R3_G3_B2Brian Paul1-0/+2
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16vbo: add comment for map_vp_non[] arrayBrian Paul1-0/+1
2011-12-16mesa: add a few comments for the z unpacking functionsBrian Paul1-0/+8
2011-12-15Enabling display list support for glClearBuffer functions with minor fixesAnuj Phogat1-11/+11
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-12-15gallium: fix a crash in drivers that don't support stream outputFredrik Höglund1-1/+2
2011-12-15llvmpipe: adapt to struct stream_output_info modificationsChristoph Bumiller1-9/+2
My fault, I broke it with v5 of 861a029ddb31e91bb4d8e18ab708d0d172f63aad.
2011-12-15nvc0: implement new stream output interfaceChristoph Bumiller15-189/+372
2011-12-15d3d1x: implement new stream output interfaceChristoph Bumiller7-50/+213
2011-12-15st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2Marek Olšák16-37/+326
2011-12-15u_blitter: implement copy_buffer using stream outputMarek Olšák2-2/+96
2011-12-15u_blitter: restore stream output targetsMarek Olšák2-0/+36
2011-12-15trace: implement stream output interfaceChristoph Bumiller1-0/+73
2011-12-15noop: implement stream outputMarek Olšák1-0/+35
2011-12-15gallium: utility helper functions for stream outputMarek Olšák7-7/+66
2011-12-15gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák24-89/+210
Namely: - EXT_transform_feedback - ARB_transform_feedback2 - ARB_transform_feedback_instanced The old interface was not useful for OpenGL and had to be reworked. This interface was originally designed for OpenGL, but additional changes have been made in order to make st/d3d1x support easier. The most notable change is the stream-out info must be linked with a vertex or geometry shader and cannot be set independently. This is due to limitations of existing hardware (special shader instructions must be used to write into stream-out buffers), and it's also how OpenGL works (stream outputs must be specified prior to linking shaders). Other than that, each stream output buffer has a "view" into it that internally maintains the number of bytes which have been written into it. (one buffer can be bound in several different transform feedback objects in OpenGL, so we must be able to have several views around) The set_stream_output_targets function contains a parameter saying whether new data should be appended or not. Also, the view can optionally be used to provide the vertex count for draw_vbo. Note that the count is supposed to be stored in device memory and the CPU never gets to know its value. OpenGL way | Gallium way ------------------------------------ BeginTF = set_so_targets(append_bitmask = 0) PauseTF = set_so_targets(num_targets = 0) ResumeTF = set_so_targets(append_bitmask = ~0) EndTF = set_so_targets(num_targets = 0) DrawTF = use pipe_draw_info::count_from_stream_output v2: * removed the reset_stream_output_targets function * added a parameter append_bitmask to set_stream_output_targets, each bit specifies whether new data should be appended to each buffer or not. v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2, note that the draw-auto subset is always required (for d3d10), only the pause/resume functionality is limited if the CAP is not advertised v4: * update gallium/docs v5: * compactified struct pipe_stream_output_info, updated dump/trace
2011-12-15gallium: disable stream output in drivers that support itMarek Olšák5-2/+23
I am going to make interface changes and I don't want to break compilation.
2011-12-15mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák26-98/+205
It's like DrawArrays, but the count is taken from a transform feedback object. This removes DrawTransformFeedback from dd_function_table and adds the same function to GLvertexformat (with the function parameters matching GL). The vbo_draw_func callback has a new parameter "struct gl_transform_feedback_object *tfb_vertcount". The rest of the code just validates states and forwards the transform feedback object into vbo_draw_func.
2011-12-15st/xa: Disable composite solid fill with maskThomas Hellstrom1-1/+19
Xa doesn't support it yet. Trying to do that would cause a segfault. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-15st/xa: Fix format conversion copy alpha channelThomas Hellstrom3-3/+13
When doing format conversion copies between a format without an alpha channel and a format with an alpha channel, make sure the destination alpha is set to 1. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-15st/xa: Fix component alpha checkThomas Hellstrom1-2/+1
Component alpha only affects mask pictures. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-15st/egl: fix compiler warningsChia-I Wu2-3/+3
One is about casting a pointer to integer and the other is about an unused function when HAVE_WAYLAND_BACKEND is not defined.
2011-12-15st/egl: Implement EGL_NOK_swap_region for x11Fredrik Höglund3-20/+51
v2: inline x11_drawable_copy_buffers(). Signed-off-by: Fredrik Höglund <fredrik@kde.org> [olv: s/inline/INLINE/]
2011-12-15st/egl: Add support for EGL_NOK_swap_regionFredrik Höglund3-3/+46
Backends indicate that they support this extension by returning EGL_TRUE when native_display::get_param() is called with NATIVE_PARAM_PRESENT_REGION and NATIVE_PARAM_PRESERVE_BUFFER. native_present_control is extended to include the region that should be presented. When native_present_control::num_rects is zero, the whole surface is to be presented. Signed-off-by: Fredrik Höglund <fredrik@kde.org>
2011-12-14i965: Drop separate stencil assertions in update_draw_buffer().Eric Anholt1-16/+0
The comment said they deserved to be in emit_depthbuffer, and at this point they were all there already. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14intel: Simplify and touch up the FBO completeness test.Eric Anholt1-18/+21
Now that we have miptrees for everything, we can more easily test for !has_separate_stencil completeness. Also, test for whether the stencil rb is the wrong kind of format for separate stencil, or if we are trying to do packed to different images of a single miptree. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14intel: Remove another renderbuffer allocation path.Eric Anholt1-8/+4
Now there's the thing that CALLOCs and sets up window system vtable, and the thing that CALLOCs and sets up user renderbuffer vtable. The user renderbuffer vtable gets replaced later by intel_renderbuffer_update_wrapper for wrapped renderbuffers (things with name == ~0). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14intel: Make the separate stencil RB storage path match texture more.Eric Anholt1-76/+52
There were too many things making intel_renderbuffer *s and tweaking their bits. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14intel: Move S8 width/height alignment to miptree creation.Eric Anholt3-55/+22
We were doing it in the caller in the renderbuffer code, but it was missed in the separate stencil creation for textures. Apparently our testing was using renderbuffers or pre-aligned sizes. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>