summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove unused _mesa_init_teximage_fields() target parameterBrian Paul2012-01-044-5/+5
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* st/mesa: use SINT/UINT formats for VertexAttribIPointerChristoph Bumiller2012-01-033-6/+63
| | | | | | Reviewed-by: Dave Airlie <[email protected]> v2: added assertion that packed formats are not pure integer
* glsl_to_tgsi: v2 Invalidate and revalidate uniform backing storageVadim Girlin2012-01-031-0/+25
| | | | | | | | | | | | | | | | | | | | | | If glUniform1i and friends are going to dump data directly in driver-allocated, the pointers have to be updated when the storage moves. This should fix the regressions seen with commit 7199096. I'm not sure if this is the only place that needs this treatment. I'm a little uncertain about the various functions in st_glsl_to_tgsi that modify the TGSI IR and try to propagate changes about that up to the gl_program. That seems sketchy to me. Signed-off-by: Ian Romanick <[email protected]> v2: Revalidate when shader_program is not NULL. Update the pointers for all _LinkedShaders. Init glsl_to_tgsi_visitor::shader_program to NULL in the get_pixel_transfer_visitor & get_bitmap_visitor. Signed-off-by: Vadim Girlin <[email protected]>
* st/mesa: Reject forward-looking contextsIan Romanick2012-01-021-2/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* glsl-to-tgsi: handle ir_unop_round_evenChristoph Bumiller2012-01-021-1/+4
|
* glsl_to_tgsi: fix handling of CONT and BRK in eliminate_dead_code_advanced()Bryan Cain2012-01-021-2/+7
|
* mesa: remove the dstX/Y/Zoffset params to _mesa_texstore() functionsBrian Paul2012-01-022-3/+0
| | | | | | | | The were always zero. When doing a sub-texture replacement we account for the dstX/Y/Zoffsets when we map the texture image. So no need to pass them into the texstore code anymore. Reviewed-by: Kenneth Graunke <[email protected]>
* st_glsl_to_tgsi: translate interp mode for front/back colorDave Airlie2011-12-311-2/+2
| | | | | | this fixes a bunch of interpolation tests on softpipe at least. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: remove stImage->base.Face/Level assignments in st_TexImage()Brian Paul2011-12-301-3/+0
| | | | | | | | | This fixes a regresssion (broken cube maps) caused by the ctx->Driver.TexImage parameter simplification commit. The target var is always GL_TEXTURE_CUBE_MAP at this point so the Face field was always getting set to zero. These field assignments aren't needed anyway since core Mesa sets them.
* mesa: simplify Driver.CompressedTex[Sub]Image function parametersBrian Paul2011-12-301-16/+12
| | | | | | | | As with previous commits, the target, level and texObj info can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexImage() parametersBrian Paul2011-12-301-28/+22
| | | | | | | | As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: remove TexSubImage code, use core mesa routines instead.Brian Paul2011-12-301-140/+3
| | | | | | | | Since the move to Map/UnmapTextureImage, the core mesa routines are equivalent to what the state tracker was doing. The TexImage functions can be replaced too, but there's a few differences that will need to be handled.
* vbo: introduce vbo_sizeof_ib_type() functionYuanhan Liu2011-12-302-28/+4
| | | | | | | | | | introduce vbo_sizeof_ib_type() function to return the index data type size. I see some place use switch(ib->type) to get the index data type, which is sort of duplicate. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: remove PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_ATTRIBSMarek Olšák2011-12-251-1/+1
| | | | | | It's the same as PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use a cast wrapper function to get st_transform_feedback_objectMarek Olšák2011-12-251-6/+11
|
* st/mesa: DrawTFB should use the vertex count from the last call of EndTFBMarek Olšák2011-12-251-11/+42
| | | | | | From ARB_transform_feedback2: ... the vertex count used for the rendering operation is set by the previous EndTransformFeedback command.
* st-api: Have context_create explain why creation failedIan Romanick2011-12-231-1/+8
| | | | | | | | | | This won't be used in the client-side libGL, but the xserver has to generate a different protocol error depending on the reason context creation failed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* mesa: Add _NEW_RASTERIZER_DISCARD as synonym for _NEW_TRANSFORM.Paul Berry2011-12-211-2/+2
| | | | | | | | | | This makes it easier to keep track of which dirty bits correspond to which pieces of context, since it makes _NEW_RASTERIZER_DISCARD correspond with ctx->RasterDiscard. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Move RasterDiscard to toplevel of gl_context.Paul Berry2011-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | Previously we were storing the RasterDiscard flag (for GL_RASTERIZER_DISCARD) in gl_context::TransformFeedback. This was confusing, because we use the _NEW_TRANSFORM flag (not _NEW_TRANSFORM_FEEDBACK) to track state updates to it, and because rasterizer discard has effects even when transform feedback is not in use. This patch makes RasterDiscard a toplevel element in gl_context rather than a subfield of gl_context::TransformFeedback. Note: We can't put RasterDiscard inside gl_context::Transform, since all items inside gl_context::Transform need to be pieces of state that are saved and restored using PushAttrib and PopAttrib. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl_to_tgsi: make sure copied instructions don't lose texture target. (v2)Dave Airlie2011-12-181-2/+6
| | | | | | | | | | | | | | The piglit draw-pixel-with-texture was asserting in the glsl->tgsi code, due to 0 texture target, this makes sure the texture target is copied over correctly when we copy instructions around. v2: drive-by fix bitmap on the way past. This avoids the assertion, have to contemplate fixing things as per the spec later. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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.
* 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]>
* st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2Marek Olšák2011-12-1512-37/+208
|
* mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-155-18/+11
| | | | | | | | | | | | | | 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.
* mesa: add const flags to skip MaxVarying and MaxUniform linker checks (v2)Marek Olšák2011-12-131-0/+6
| | | | | | | | | This is only temporary until a better solution is available. v2: print warnings and add gallium CAPs Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl_to_tgsi: fix typo in commentBryan Cain2011-12-131-2/+2
|
* glsl_to_tgsi: emit both operands of shift and bitwise operationsBryan Cain2011-12-131-5/+5
| | | | Fixes these operations when native integers are enabled.
* st/mesa: stop using _DepthBuffer, _StencilBuffer fieldsBrian Paul2011-12-132-15/+6
| | | | | | | | We never want to use the depth/stencil buffer wrappers so always just use the attachment renderbuffers. This is a step toward removing the _DepthBuffer, _StencilBuffer fields. Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: add color varyings to MaxVaryingMarek Olšák2011-12-121-6/+4
| | | | | | | The linker now adds color varyings to the number of used varyings and checks against that limit. NOTE: This is a candidate for the 7.11 branch.
* st/mesa: move frag depth up a level.Dave Airlie2011-12-102-19/+19
| | | | | | | This fixes the segfault, and seems to put this closer to where other properties are being set. Hopefully it still conforms. Signed-off-by: Dave Airlie <[email protected]>
* Revert "st/mesa: only resolve is number of samples is > 1"Dave Airlie2011-12-101-1/+1
| | | | | | This reverts commit 8c713626db33c40c18e24c880fe47d7948f4dcd7. Didn't mean to push this at all
* st/mesa: only resolve is number of samples is > 1Dave Airlie2011-12-101-1/+1
| | | | | | This fixes the firefox crash but I've no idea if its correct. Signed-off-by: Dave Airlie <[email protected]>
* gallium: implement ARB_conservative_depthMarek Olšák2011-12-101-0/+19
| | | | This adds a new TGSI property to represent the GLSL layout qualifier in TGSI.
* mesa/st: Don't modify the context draw/read buffers.José Fonseca2011-12-091-64/+0
| | | | | | | | | It sets the wrong values (GL_XXX_LEFT instead of GL_XXX), and no other Mesa driver does this, given that Mesa sets the right draw/read buffers provided the Mesa visual has the doublebuffer flag filled correctly which is the case. Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: fix a bug in eliminate_dead_code_advanced()Bryan Cain2011-12-081-10/+8
| | | | | | | | | | | | | | | The bug, reported to me by Vadim Girlin on IRC, was causing overzealous elimination of code in parallel if statements such as the following: if (x) { r = false; } if (y) { r = true; } Before this commit, the assignment inside the first if block would be misdetected as dead code and removed.
* mesa: remove dead swrast and state tracker accum buffer codeBrian Paul2011-12-082-410/+0
|
* mesa: rewrite accum buffer supportBrian Paul2011-12-083-5/+26
| | | | | | | | | | | | | Implemented in terms of renderbuffer mapping/unmapping and format packing/unpacking functions. The swrast and state tracker code for implementing accumulation are unused and will be removed in the next commit. v2: don't use memcpy() in _mesa_clear_accum_buffer() v3: don't allocate MAX_WIDTH arrays, be more careful with mapping flags Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove TextureMemCpy driver hookBrian Paul2011-12-081-52/+0
| | | | There's probably no reason to use a special version of memcpy() anymore.
* st/mesa: Use util_blit_pixels_writemask() for depth blits as well in ↵Henri Verbeet2011-12-081-81/+89
| | | | | | | | | st_copy_texsubimage(). This has no piglit regressions on r600g and softpipe. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: rename MESA_FORMAT_RG88 to MESA_FORMAT_GR88Brian Paul2011-12-021-2/+2
| | | | | To better reflect the component ordering and be consistent with other format names.
* st/mesa: add support for GL_OES_compressed_ETC1_RGB8_textureChia-I Wu2011-12-022-0/+20
| | | | | | | Have st/mesa recognize MESA_FORMAT_ETC1_RGB8 then we are good to advertise the extension. Reviewed-by: Brian Paul <[email protected]>
* gallium/failover: Remove the deprecated module.Kai Wasserbäch2011-11-301-1/+0
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* st/mesa: fix indentationBrian Paul2011-11-301-1/+1
|
* mesa: Make gl_program::InputsRead 64 bits.Mathias Fröhlich2011-11-293-10/+10
| | | | | | | | | Make gl_program::InputsRead a 64 bits bitfield. Adapt the intel and radeon driver to handle a 64 bits InputsRead value. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't try to allocate zero-sized renderbuffersBrian Paul2011-11-281-0/+5
| | | | | | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43047 and https://bugs.freedesktop.org/show_bug.cgi?id=43048 Note: This is a candidate for the 7.11 branch. Tested-by: Vinson Lee <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: check for null ptr in _mesa_is_bufferobj()Brian Paul2011-11-281-5/+5
| | | | | | | This simplifies a few callers. And it adds a bit of robustness. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* st/mesa: add ARB_texture_rgb10_a2ui supportDave Airlie2011-11-282-2/+15
| | | | | | Add support to the state tracker format and extension enablement code. Signed-off-by: Dave Airlie <[email protected]>
* mesa: add MESA_FORMAT_RGBX8888 and MESA_FORMAT_RGBX8888_REVChia-I Wu2011-11-271-0/+8
| | | | | | | | | | | | | MESA_FORMAT_RGBX8888_REV is one of the opaque pixel formats used on Android. Thanks to texture-from-pixmap, drivers may actually see texture images with this format on Android. MESA_FORMAT_RGBX8888 is added only for completeness. Reviewed-by: Brian Paul <[email protected]> [olv: Move the new formats after MESA_FORMAT_ARGB8888_REV in gl_format. I accidentally moved them to the wrong place when preparing the patch.]
* gallium: separate out floating-point CAPs into its own enumMarek Olšák2011-11-221-6/+11
| | | | | | | | | | | | | | | The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
* gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionallyMarek Olšák2011-11-221-17/+12
| | | | | Only i965g does not enable GLSL, but that driver has been unmaintained and bitrotting for quite a while anyway.