summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965/vs: Add a new dst_reg constructor for file, number, type, and mask.Kenneth Graunke2011-12-181-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Add vec4_instruction::is_tex() query.Kenneth Graunke2011-12-182-0/+11
| | | | | | | Copy and pasted from fs_inst::is_tex(), but without TXB. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Rename texturing ops from FS_OPCODE to SHADER_OPCODE, except TXB.Kenneth Graunke2011-12-185-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Don't swizzle the results of textureSize().Kenneth Graunke2011-12-181-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* program: fix previous commitnobled2011-12-181-1/+1
| | | | Accidentally an old patch.
* program: fix out of bounds array accesses and other bad thingsnobled2011-12-181-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 <[email protected]>
* gen_matypes: eliminate printf warningsnobled2011-12-181-1/+6
| | | | | The VERT_BIT_* defines are 64-bit values now, but the printf was still expecting a simple int.
* r600g: fix MAX_STREAM_OUTPUT_SEPARATE_ATTRIBS limitMarek Olšák2011-12-171-2/+1
|
* mesa/x86: fix printf warningMarek Olšák2011-12-171-1/+1
|
* drisw: remove unused variableMarek Olšák2011-12-171-1/+2
|
* r600g: handle new capsMarek Olšák2011-12-171-0/+2
|
* r300g: handle new capsMarek Olšák2011-12-171-0/+4
|
* docs: update GL3 statusMarek Olšák2011-12-171-2/+2
|
* r600g: implement transform feedbackMarek Olšák2011-12-1718-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.
* st/mesa: expose conservative_depth if GLSL 1.3 is supportedMarek Olšák2011-12-171-0/+6
| | | | It's not yet, but it can be enabled by the override environment variable.
* gallivm: Fix build with llvm-3.1svn.Vinson Lee2011-12-162-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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix memory leak on error path.Vinson Lee2011-12-161-0/+1
| | | | | | | Fixes Coverity resource leak defect. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: Fix memory leak in out-of-memory path.Vinson Lee2011-12-161-0/+1
| | | | | | | Fixes Coverity resource leak defect. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: use _mesa_prepare_mipmap_level() in the mipmap generation codeBrian Paul2011-12-161-35/+12
| | | | | | | See previous commit for more information. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: new _mesa_prepare_mipmap_level() function for mipmap generationBrian Paul2011-12-162-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: make update_fbo_texture() non-staticBrian Paul2011-12-162-5/+10
| | | | | | | We'll call this from the mipmap generation code. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: whitespace and comment fixes in fbobject.cBrian Paul2011-12-161-9/+11
|
* mesa: add MESA_FORMAT_RGB565[_REV] as candidates for GL_R3_G3_B2Brian Paul2011-12-161-0/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* vbo: add comment for map_vp_non[] arrayBrian Paul2011-12-161-0/+1
|
* mesa: add a few comments for the z unpacking functionsBrian Paul2011-12-161-0/+8
|
* Enabling display list support for glClearBuffer functions with minor fixesAnuj Phogat2011-12-151-11/+11
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium: fix a crash in drivers that don't support stream outputFredrik Höglund2011-12-151-1/+2
|
* llvmpipe: adapt to struct stream_output_info modificationsChristoph Bumiller2011-12-151-9/+2
| | | | My fault, I broke it with v5 of 861a029ddb31e91bb4d8e18ab708d0d172f63aad.
* nvc0: implement new stream output interfaceChristoph Bumiller2011-12-1515-189/+372
|
* d3d1x: implement new stream output interfaceChristoph Bumiller2011-12-157-50/+213
|
* st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2Marek Olšák2011-12-1516-37/+326
|
* u_blitter: implement copy_buffer using stream outputMarek Olšák2011-12-152-2/+96
|
* u_blitter: restore stream output targetsMarek Olšák2011-12-152-0/+36
|
* trace: implement stream output interfaceChristoph Bumiller2011-12-151-0/+73
|
* noop: implement stream outputMarek Olšák2011-12-151-0/+35
|
* gallium: utility helper functions for stream outputMarek Olšák2011-12-157-7/+66
|
* gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2011-12-1524-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
* gallium: disable stream output in drivers that support itMarek Olšák2011-12-155-2/+23
| | | | I am going to make interface changes and I don't want to break compilation.
* mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-1526-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.
* st/xa: Disable composite solid fill with maskThomas Hellstrom2011-12-151-1/+19
| | | | | | | Xa doesn't support it yet. Trying to do that would cause a segfault. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* st/xa: Fix format conversion copy alpha channelThomas Hellstrom2011-12-153-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 <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* st/xa: Fix component alpha checkThomas Hellstrom2011-12-151-2/+1
| | | | | | | Component alpha only affects mask pictures. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* st/egl: fix compiler warningsChia-I Wu2011-12-152-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.
* st/egl: Implement EGL_NOK_swap_region for x11Fredrik Höglund2011-12-153-20/+51
| | | | | | | | v2: inline x11_drawable_copy_buffers(). Signed-off-by: Fredrik Höglund <[email protected]> [olv: s/inline/INLINE/]
* st/egl: Add support for EGL_NOK_swap_regionFredrik Höglund2011-12-153-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 <[email protected]>
* i965: Drop separate stencil assertions in update_draw_buffer().Eric Anholt2011-12-141-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 <[email protected]>
* intel: Simplify and touch up the FBO completeness test.Eric Anholt2011-12-141-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 <[email protected]>
* intel: Remove another renderbuffer allocation path.Eric Anholt2011-12-141-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 <[email protected]>
* intel: Make the separate stencil RB storage path match texture more.Eric Anholt2011-12-141-76/+52
| | | | | | | There were too many things making intel_renderbuffer *s and tweaking their bits. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Move S8 width/height alignment to miptree creation.Eric Anholt2011-12-143-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 <[email protected]>