summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
Commit message (Collapse)AuthorAgeFilesLines
* swrast: s/_DD_NEW_SEPARATE_SPECULAR/_MESA_NEW_SEPARATE_SPECULAR/Brian Paul2012-03-121-3/+3
| | | | | | | Another step toward removing the _DD_NEW_x flags Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: move more swrast-related #defines out of core MesaBrian Paul2012-02-242-0/+28
|
* mesa: remove MAX_WIDTH from prog_execute.hBrian Paul2012-02-241-0/+2
| | | | | define a PROG_MAX_WIDTH var instead. It has to match MAX_WIDTH in swrast. More elaborate refactoring could fix that (someday).
* swrast: check max renderbuffer size against SWRAST_MAX_WIDTHBrian Paul2012-02-241-0/+2
|
* swrast: define, use SWRAST_MAX_WIDTH/HEIGHTBrian Paul2012-02-2416-46/+55
| | | | We'll get rid of MAX_WIDTH, MAX_HEIGHT soon.
* swrast: remove MAX_WIDTH array in s_span.cBrian Paul2012-02-241-1/+2
|
* swrast: simplify mask array codeBrian Paul2012-02-241-3/+4
|
* swrast: stop using MAX_WIDTH arrays in triangle codeBrian Paul2012-02-241-2/+2
|
* swrast: remove MAX_WIDTH arrays in stencil codeBrian Paul2012-02-243-4/+37
| | | | Use some per-context temporary arrays instead.
* swrast: remove MAX_WIDTH arrays in s_drawpix.cBrian Paul2012-02-241-27/+36
|
* swrast: remove MAX_WIDTH arrays in s_zoom.cBrian Paul2012-02-241-2/+14
|
* swrast: remove MAX_WIDTH arrays in s_depth.cBrian Paul2012-02-241-1/+9
|
* swrast: remove MAX_WIDTH arrays in s_copypix.cBrian Paul2012-02-241-5/+20
|
* mesa: move/fix MAX_WIDTH/HEIGHT-related assertionsBrian Paul2012-02-241-0/+8
| | | | | | Max texture and viewport size is only limited by MAX_WIDTH/HEIGHT for swrast. Reviewed-by: José Fonseca <[email protected]>
* i915: Initialize swrast_texture_image structure fields.Paul Berry2012-02-222-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 980f6f1 (mesa: move gl_texture_image::Width/Height/DepthScale fields to swrast) moved the initialization of the Width, Height, and DepthScale fields to _swrast_alloc_texture_image_buffer(). However, i915 doesn't call this function because it performs its own buffer allocation. As a result, the Width, Height, and DepthScale fields weren't getting initialized properly, and some operations requiring swrast would fail. This patch ensures that Width, Height, and DepthScale are properly initialized by separating the code that sets them into a new function, _swrast_init_texture_image(), which is called by intel_alloc_texture_image_buffer() as well as _swrast_alloc_texture_image_buffer(). It also moves the initialization of _IsPowerOfTwo into this function. Fixes piglit test fbo/fbo-cubemap on i915. Partially fixes https://bugs.freedesktop.org/show_bug.cgi?id=41216 This is a candidate for the 8.0 branch. Reviewed-and-tested-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: Only avoid empty _TexEnvProgramsIan Romanick2012-02-151-1/+2
| | | | | | | | | | | | | | If the generated shader for _TexEnvProgram is empty, force the use of the fixed-function code. Otherwise, go ahead and use the shader. This works around a mysterious issue on i915 where fixed-function software fallbacks are not working correctly. This isn't really the fix we want, but it works around the issue. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45872 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45876
* swrast: fix span color type selectionBrian Paul2012-02-123-9/+36
| | | | | | | | | | | | | | | | Fixes a regression from commit 660ed923ded3552e023ef8c3dd9f92e6792f1bd2. The basic idea is to look at the format of the dest renderbuffer and choose either GLubyte or GLfloat for colors. The previous code used _mesa_format_to_type_and_comps() which could return a bunch types other than ubyte/float. Determine the datatype at renderbuffer mapping time to avoid frequent calls to the format query functions. NOTE: This is a candidate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45578 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45577
* mesa: Convert colors if span ChanType and renderbuffer data type don't matchIan Romanick2012-02-021-4/+15
| | | | | | | | | | | | This is a partial revert of f9874fe. It turns out that the types don't always match. Specifically, this can happen when doing glCopyPixels from a float FBO to a RGBA8 FBO. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45429 Reviewed-by: Brian Paul <[email protected]>
* mesa: added swapBytes parameter to _mesa_format_matches_format_and_type()Brian Paul2012-01-271-1/+2
| | | | | | Not actually used yet though. Reviewed-by: Ian Romanick <[email protected]>
* swrast: Fix implicit declaration warningsChad Versace2012-01-271-0/+1
| | | | | | | | | | | | | In a recent commit, commit 1c0f1dd42a50464eeb81de4aad8eecf24b3d6c89 Author: Chad Versace <[email protected]> swrast: Fix fixed-function fragment processing I defined a new function,_swrast_fragment_program, but neglected to #include s_fragprog.h for clients of that function. Note: This is a candidate for the 8.0 branch. Reported-by: Brian Paul <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* swrast: Fix fixed-function fragment processingChad Versace2012-01-279-44/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On i965, _mesa_ir_link_shader is never called. As a consequence, the current fragment program (ctx->FragmentProgram->_Current) exists but is invalid because it has no instructions. Yet swrast continued to attempt to use the empty program. To avoid using the empty program, this patch 1) defines a new function, _swrast_use_fragment_program, which checks if the current fragment program exists and differs from the fixed function fragment program, and, when appropriate, 2) replaces checks of the form if (ctx->FragmentProgram->_Current == NULL) with if (_swrast_use_fragment_program(ctx)) Fixes the following oglconform regressions on i965/gen6: api-fogcoord(basic.allCases.log) api-mtexcoord(basic.allCases.log) api-seccolor(basic.allCases.log) api-texcoord(basic.allCases.log) blend-separate(basic.allCases) colorsum(basic.allCases.log) The tests were ran with the GLXFBConfig: visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat ---------------------------------------------------------------------------- 0x021 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None (Note: I originally believed that the hunk in _swrast_update_fragment_program was unnecessary. But it is required to fix blend-separate.) Note: This is a candidate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327 Reveiwed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* swrast: silence uninitialized var warningsBrian Paul2012-01-261-2/+2
|
* swrast: fix uninitialized variable warningBrian Paul2012-01-241-1/+1
|
* swrast: make rowStride variable signed in put_z32_values()Brian Paul2012-01-241-1/+1
| | | | As with commit aed5c8299fe47b8e1728f8140d069bc89d3fa947
* swrast: remove unused StoreTexel codeBrian Paul2012-01-244-1187/+183
| | | | | No longer needed since we do all rendering to texture with the buffer mapping and pixel packing functions.
* swrast: use Map/UnmapTextureImage() in framebuffer map/unmap codeBrian Paul2012-01-241-15/+13
| | | | | | | When we're actually rendering into a texture, map the texture image instead of the corresponding renderbuffer. Before, we just copied a pointer from the texture image to the renderbuffer. This change will make the code usable by hardware drivers.
* mesa: remove ctx->Driver.Map/UnmapTexture() hooksBrian Paul2012-01-241-3/+0
| | | | No longer used anywhere.
* swrast: move some renderbuffer functions to s_renderbuffer.cBrian Paul2012-01-242-121/+121
|
* swrast: remove a few extra _mesa_get_format_bytes() callsBrian Paul2012-01-241-4/+6
|
* swrast: use swrast_renderbuffer instead of gl_renderbufferBrian Paul2012-01-249-41/+62
|
* swrast: allocate swrast_renderbuffers instead of gl_renderbuffersBrian Paul2012-01-242-7/+7
|
* swrast: new swrast_renderbuffer typeBrian Paul2012-01-241-0/+25
| | | | This will let us move the swrast-specific fields out of gl_renderbuffer.
* swrast: use stencil packing function in s_stencil.cBrian Paul2012-01-241-1/+3
|
* swrast: use color packing functions in s_span.cBrian Paul2012-01-241-4/+9
|
* swrast: remove s_spantemp.hBrian Paul2012-01-241-149/+0
|
* swrast: rewrite, simplify the the render-to-texture codeBrian Paul2012-01-241-110/+30
|
* mesa: rename gl_renderbuffer::Data to BufferBrian Paul2012-01-242-12/+15
| | | | To better indicate that this pointer to the malloc'd memory.
* mesa: move freeing of software renderbuffers into swrastBrian Paul2012-01-241-0/+15
|
* mesa: remove gl_renderbuffer::DataTypeBrian Paul2012-01-245-130/+22
|
* mesa: remove gl_renderbuffer:RowStride fieldBrian Paul2012-01-244-6/+3
|
* swrast: remove Get/PutRow()-related codeBrian Paul2012-01-242-1224/+8
|
* swrast: stop using Put/GetRow/Values() in swrast codeBrian Paul2012-01-245-55/+193
| | | | | All color buffer rendering is now done by accessing mapped renderbuffer memory. We're now able to get rid of all the GetRow/PutRow stuff.
* swrast: use gl_renderbuffer::StrideInBytes in depth/stencil codeBrian Paul2012-01-242-6/+6
|
* mesa: use gl_renderbuffer::Map for all depth/stencil accessesBrian Paul2012-01-242-37/+110
| | | | | Instead of using the obsolete gl_renderbuffer::Data field. Color buffer are still accessed through GetRow/PutRow().
* swrast: flush pending rendering before unmapping buffersBrian Paul2012-01-241-2/+3
|
* swrast: new assertions in _swrast_pixel_address()Brian Paul2012-01-241-0/+8
|
* swrast: use _swrast_pixel_address() in more placesBrian Paul2012-01-242-7/+15
|
* swrast: s/Data/Map/ in swrast_texture_imageBrian Paul2012-01-245-14/+14
| | | | To indicate that it points to mapped texture memory.
* swrast: remove gl_renderbuffer::DataType check in DrawPixels()Brian Paul2012-01-241-5/+8
| | | | The field will be going away so update this code.
* swrast: remove gl_renderbuffer::DataType assertionsBrian Paul2012-01-243-3/+0
| | | | This field will go away, so remove some uses of it.