summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965: Fix flat integral varyings.Paul Berry2011-10-312-3/+5
| | | | | | | | | | | | | | | | | Previously, the vertex and fragment shader back-ends assumed that all varyings were floats. In GLSL 1.30 this is no longer true--they can also be of integral types provided that they have an interpolation qualifier of "flat". This required two changes in each back-end: assigning the correct type to the register that holds the varying value during shader execution, and assigning the correct type to the register that ties the varying value to the rest of the graphics pipeline (the message register in the case of VS, and the payload register in the case of FS). Fixes piglit tests fs-int-interpolation and fs-uint-interpolation. Acked-by: Kenneth Graunke <[email protected]>
* mesa: Add glsl_type::get_scalar_type() function.Paul Berry2011-10-312-0/+34
| | | | | | | | This function is similar to get_base_type(), but when called on arrays, it returns the scalar type composing the array. For example, glsl_type(vec4[]) => float_type. Acked-by: Kenneth Graunke <[email protected]>
* i965/gen6+: Switch GLSL from ALT to IEEE floating point modePaul Berry2011-10-314-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | i965 graphics hardware has two floating point modes: ALT and IEEE. In ALT mode, floating-point operations never generate infinities or NaNs, and MOV instructions translate infinities and NaNs to finite values. In IEEE mode, infinities and NaNs behave as specified in the IEEE 754 spec. Previously, we used ALT mode for all vertex and fragment programs, whether they were GLSL programs or ARB programs. The GLSL spec is sufficiently vague about how infs and nans are to be handled that it was unclear whether this mode was compliant with the GLSL 1.30 spec or not, and it made it very difficult to test the isinf() and isnan() functions. This patch changes i965 GLSL programs to use IEEE floating-point mode, which is clearly compliant with GLSL 1.30's inf/nan requirements. In addition to making the Piglit isinf and isnan tests pass, this paves the way for future support of the ARB_shader_precision extension. Unfortunately we still have to use ALT floating-point mode when executing ARB programs, because those programs require 0^0 == 1, and i965 hardware generates 0^0 == NaN in IEEE mode. Fixes piglit tests "isinf-and-isnan fs_fbo", "isinf-and-isnan vs_fbo", and {fs,vs}-{isinf,isnan}-{vec2,vec3,vec4}.
* glsl: Add isinf() and isnan() builtins.Paul Berry2011-10-314-4/+34
| | | | | | | | | | | | | The implementations are as follows: isinf(x) = (abs(x) == +infinity) isnan(x) = (x != x) Note: the latter formula is not necessarily obvious. It works because NaN is the only floating point number that does not equal itself. Fixes piglit tests "isinf-and-isnan fs_basic" and "isinf-and-isnan vs_basic".
* glsl: Add '.ir' extension to builtin IR filesPaul Berry2011-10-3166-3/+9
| | | | | | | | This patch adds the extension '.ir' to all the files in src/glsl/builtins/ir/, and changes generate_builtins.py so that it no longer globs on '*' to find the files to build. This prevents spurious files (such as EMACS' infamous *~ backup files) from breaking the build.
* glsl: Fix copy-paste error in constant_expression_value(ir_binop_nequal)Paul Berry2011-10-311-1/+1
| | | | | | | | | | | The implementation of ir_binop_nequal in constant_expression_value() appears to have been copy-and-pasted from the implementation of ir_binop_equal, but with all instances of '==' changed to '!='. This is correct except for one minor flaw: one of those '==' operators was in an assertion checking that the types of the two arguments were equal. That one needs to stay an '=='. Fixes piglit tests {fs,vs}-inline-notequal.
* docs: list GL_ARB_texture_storage in 7.12 release notesBrian Paul2011-10-311-0/+1
|
* mesa: add note about immutable textures for _mesa_test_texobj_completeness()Brian Paul2011-10-311-0/+4
|
* swrast: implement GL_ARB_texture_storageBrian Paul2011-10-314-0/+43
|
* st/mesa: implement GL_ARB_texture_storageBrian Paul2011-10-312-0/+63
|
* mesa: plug in dispatch functions for GL_ARB_texture_storageBrian Paul2011-10-311-0/+9
|
* mesa: compile new texstore.c fileBrian Paul2011-10-312-0/+2
|
* mesa: init extension entry for GL_ARB_texture_storageBrian Paul2011-10-311-0/+1
|
* mesa: display list dispatch for GL_ARB_texture_storageBrian Paul2011-10-311-0/+9
|
* mesa: new glTexImage error checks for GL_ARB_texture_storageBrian Paul2011-10-311-0/+34
| | | | | If the texture memory was allocated with glTexStorage1/2/3D() we can only change the image data with glTexSubImage calls.
* mesa: glGetTexParameter support for GL_ARB_texture_storageBrian Paul2011-10-311-0/+12
|
* mesa: implement new functions for GL_ARB_texture_storageBrian Paul2011-10-312-0/+463
| | | | | This is the glTexStorage1D/2D/3D() functions. Basically do error checking then call the driver hook to actually allocate memory.
* glapi: regenerated API files for GL_ARB_texture_storageBrian Paul2011-10-3111-8990/+9581
|
* glapi: new API specs for GL_ARB_texture_storageBrian Paul2011-10-313-0/+70
|
* mesa: add new driver hook for AllocTextureStorage()Brian Paul2011-10-311-0/+9
|
* mesa: add new fields for GL_ARB_texture_storageBrian Paul2011-10-311-0/+2
|
* svga: Flush the hwtnl primitives before writing to buffers.José Fonseca2011-10-315-4/+62
| | | | | | | | | | | | | | | svga keeps a small queue of similar primitive draws in order to coalesce them into a single draw primitive command. But the buffers referred in primitives not yet emitted were being ignored in the considerations to flush or not the context. This fixes piglit vbo-map-remap, vbo-subdata-sync, vbo-subdata-zero, and Seeker. Based on investigation and patch from Brian Paul. Reviewed-By: Brian Paul <[email protected]>
* st/xa: Plug a pipe context leak.Thomas Hellstrom2011-10-311-0/+2
| | | | | | | Forgot to destroy the pipe context on xa context destroy. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* pipebuffer/debug: Fix a recursive mutex lockThomas Hellstrom2011-10-311-6/+3
| | | | | | | | pb_debug_manager_dump was trying to take a lock already held by all callers. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Jos� Fonseca <[email protected]>
* radeon/r200: drop remains of r300/r600 support along with old drm 1.x kernelDave Airlie2011-10-3015-553/+102
| | | | | | | | This drops all the old drmSupports* checks since KMS does them all, and it also drop R300_CLASS and R600_CLASS. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* llvmpipe: fix a crash in non-SSE pathChia-I Wu2011-10-301-1/+1
| | | | It is a typo went unnoticed.
* intel: enable GL_OES_draw_textureChia-I Wu2011-10-301-0/+1
|
* meta: add _mesa_meta_DrawTex()Chia-I Wu2011-10-303-0/+141
| | | | | | | | It is set to dd->DrawTex. Reviewed-by: Brian Paul <[email protected]> [olv: set dd->DrawTex in _mesa_init_driver_functions]
* r600g: reset the render condition to NULL when rendering unconditionallyMarek Olšák2011-10-301-1/+5
|
* r600g: shortcut ctx->screen->ws to ctx->wsMarek Olšák2011-10-305-12/+15
|
* i965: Remove the prepare() hook from state atoms.Eric Anholt2011-10-291-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Remove the memcpy()ed atoms array now that everything is emit()-based.Eric Anholt2011-10-292-12/+9
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Merge brw_validate_state() and brw_upload_state() together.Eric Anholt2011-10-293-19/+5
| | | | | | | They were called back-to-back at this point. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Remove state upload code for calling prepare() now that there are none.Eric Anholt2011-10-291-20/+3
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Remove some old texturing debug code.Eric Anholt2011-10-293-21/+0
| | | | | | | | | | It caught one possible bug I recall in my time working on the driver, and we haven't been setting it for non-fixed-function since the new FS backend came along. The bug it caught was likely a confusion about sampler mappings, which we have tests for these days. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Finally, move the global fallbacks check to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | | This was the last prepare() function, and it's the first state atom, so it must be ready to move. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move index buffer upload to emit() time.Eric Anholt2011-10-291-2/+2
| | | | | | | It's consumed by the brw_emit_index_buffer() code at emit() time. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Do a hack job of merging VB prepare()/emit() together.Eric Anholt2011-10-291-1/+2
| | | | | | | | | I don't really want to touch this impenetrable code in this series, so just call the one function from the other, since no other atom cares about them. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move the WM input sizes calculation to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | It's used for program compile. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move program compile to emit() time.Eric Anholt2011-10-295-9/+13
| | | | | | | Only 4 other prepare() functions are left, which don't rely on this. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Move CURBE offset calculation to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | This is consumed by the unit state. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Fold push constant prepare()/emit() together.Eric Anholt2011-10-291-13/+9
| | | | | | | | While other units need to know about our constant buffer offsets, nothing else cared about which particular BO other than the emit() half. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen6: Move viewport state setup to emit() time.Eric Anholt2011-10-291-4/+4
| | | | | | | | Only the emit() for the pointers into the batch later in this file cares. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Move URB fence recalculate to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | This is used by the unit state, which is at emit() time. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Fold the gen6/7 URB state prepare()/emit() together.Eric Anholt2011-10-292-18/+6
| | | | | | | No other unit cares about the prepare state, unlike gen4-5. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move VS pull constant upload to emit() time.Eric Anholt2011-10-291-2/+2
| | | | | | | Only needed by the emit() for VS surfaces. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Fold prepare() and emit() of VS surface state setup together.Eric Anholt2011-10-291-37/+25
| | | | | | | | This rearranges the code a bit, and makes the upload of the binding table take only as many surfaces as there are in use. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move WM pull constant setup to emit() time.Eric Anholt2011-10-291-2/+2
| | | | | | | It's needed by the WM surface state setup, which is now emit(). Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen7: Fold WM surface state prepare()/emit() together.Eric Anholt2011-10-291-38/+18
| | | | | | | | | | | These produce BRW_NEW_SURFACES (used by binding table emit()) and BRW_NEW_NR_WM_SURFACES (used by WM unit emit()). Fixes a bug where with no texturing and no color buffer, we wouldn't consider the null renderbuffer in nr_surfaces. This was harmless because nr_surfaces is only used for the prefetch info in the unit state. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Fold WM surface state prepare()/emit() together.Eric Anholt2011-10-291-36/+18
| | | | | | | | | | | These produce BRW_NEW_SURFACES (used by binding table emit()) and BRW_NEW_NR_WM_SURFACES (used by WM unit emit()). Fixes a bug where with no texturing and no color buffer, we wouldn't consider the null renderbuffer in nr_surfaces. This was harmless because nr_surfaces is only used for the prefetch info in the unit state. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>