summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_state.c
AgeCommit message (Collapse)Author
2009-08-16r300: disable ZTOP only when occlusion queries are usedMaciej Cencora
2009-08-15r300: temporary occlusion query hackMaciej Cencora
2009-08-01r300: Fix corner-case of KIL on R300Nicolai Hähnle
R300 hardware (but _not_ R500) hardware requires an enabled texture unit if KIL is used in fragment programs. We now work around the CS checker correctly when enabling such a fake texture unit. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-01r300: Fix Z buffer re-emit after window resizeNicolai Hähnle
We used to not always correctly re-emit the Z buffer size in all cases, in particular the clear path, and invalidated state was not always picked up correctly. This fixes a bug where the kernel CS checker correctly complains about a Z buffer that is too small. Note that this bug was probably only visible with ridiculously high framerates, i.e. glxgears. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-30r300/compiler: Remove inst_offset from r500_fragment_program_codeNicolai Hähnle
The field is not used, and in any case it would be more interesting to manipulate from *outside* the compiler if we ever wanted to load several fragment programs at the same time or something. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-29r300: Cleanup r300_fragment_program_codeNicolai Hähnle
Configuration register values are now stored directly in that structure. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/fragprog: Finally get rid of the duplicate program copyNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/compiler: Refactor local transforms to use rc_programNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Allow compiler to add constants in a cleaner wayNicolai Hähnle
Adding constants is used in a number of non-native instruction rewrites, and it required us to keep copies of modified gl_programs around. This is a first step towards ending this. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Move vertex program compilation to compilerNicolai Hähnle
This is just the first step of refactoring. The separation is not yet clean enough with this commit. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Cleanup vertex_program structureNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Remove faux lazy translation of vertex programsNicolai Hähnle
De facto, vertex programs were translated immediately in all situations, so let's just stop pretending that we do lazy translation. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Remove some dependencies on additional fragment program copiesNicolai Hähnle
The copy is still needed because some program transforms add state variables or constants. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Detangle fragment program compiler from driver-specific structureNicolai Hähnle
This is in preparation of sharing the fragment program compiler with Gallium: Compiler code is moved into its own directory and modified so that it no longer depends on driver structures. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-14radeon: Invert front face winding when rendering to FBO.Michel Dänzer
Fixes fgl_glxgears and progs/demos/fbotexture after pressing 'c'. Tested with r300, radeon and r200 compile tested only.
2009-07-13r300: removed unnecessary paramsMaciej Cencora
We don't have check which attributes are used by fragment program - it's already done by NQSSADCE.
2009-07-13r300: rewrite FOGC and HPOS attribs handlingMaciej Cencora
Rewrite vertex and fragment programs so that we don't have to do any hacks on lower level.
2009-07-13r300: bind vertex program to fragment programMaciej Cencora
2009-07-13r300: move fragment program selection before vertex program selectionMaciej Cencora
Prepare for wpos and fogc handling rewrite.
2009-07-13r300: implement proper IsProgramNative check for vertex programsMaciej Cencora
2009-07-13r300: cache translated fragment programsMaciej Cencora
2009-07-13r300: update state parameters only once per rendering operationMaciej Cencora
2009-06-11r300: send only RS_IP_* regs that we are going to useMaciej Cencora
2009-06-11r300: fix RS setup when no colors and textures are sent to FPMaciej Cencora
RS_COL_FMT field is part of RS_IP_* reg not RS_INST_*
2009-06-11r300: fix a GPU lock upMaciej Cencora
Sending from VAP more texture coordinates than RS expects results in GPU hang. Fixes BumpSelfShadow from DirectX8 SDK.
2009-06-07r300: remove unused codeMaciej Cencora
2009-06-07r300: prepare for different vertex data type supportMaciej Cencora
2009-06-07r300: always pass 4 color components to RS unitMaciej Cencora
Even if we don't pass all 4 color components to vertex shader unit, the vertex program can generate the missing components.
2009-05-24radeon: Remove drawable & readable from radeon_dri_mirrorNicolai Hähnle
The duplication of state data caused a crash due to double-free on destruction of context, because a variable wasn't correctly null'ed out. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-05-18radeon: fix DRI1 cmd streamJerome Glisse
2009-05-16r300: cleanup vertex program related functionsMaciej Cencora
- move vertex program related functions to r300_vertprog.c - use _mesa_bitcount instead of self-made bit_count function - remove duplicated field in r300_vertex_shader_fragment.body union - rename r300_vertex_shader_fragment to r300_vertex_shader_hw_code - rename r300_vertex_program field native to error - remove unnecessary r300_vertex_shader_state structure - remove unused r300_vertex_program and r300_vertex_program_cont fields - remove disabled code
2009-05-16r300: minor code movementMaciej Cencora
2009-05-16r300: more cleanupMaciej Cencora
- remove unnecessary r300TranslateFragmentShader call from r300UpdateShaderStates (it is already called in r300UpdateShaders) - remove unnecessary null ptr checks
2009-05-16r300: move some code to common pathMaciej Cencora
2009-05-16r300: rename functionsMaciej Cencora
Be consistent with function naming: use Setup/Emit names for functions that modify hardware state
2009-05-16r300: software fallbacking handling rewriteMaciej Cencora
Until now falling back to software rasterizer worked only for TCL enabled cards. For non TCL cards we used to plug our rendering functions in r300InitSwtcl, and we had never restored original functions for software rasterizer.
2009-05-16r300: remove unnecessary switch casesMaciej Cencora
2009-05-16r300: further cleanupMaciej Cencora
- move extensions init into seperate function - move options handling into seperate function - create new structure to hold options values - use context->options.hw_tcl_enabled field instead of global hw_tcl_on and future_hw_tcl_on variables
2009-05-14r300: don't send now forbidden register to kernel when with memory managerJerome Glisse
2009-05-13Remove subpixel offset from viewportOwen W. Taylor
Remove an eigth-pixel offset of the viewport inherited from R100 code. This seems not to be necessary and causes blurring when sampling textures 1:1. https://bugs.freedesktop.org/show_bug.cgi?id=20340
2009-05-12radeon: glReadBuffer set _NEW_BUFFERS, not _NEW_PIXELJerome Glisse
This was broken with last merge see 62043b27575c378c027251316421e4699f461108 for explanations
2009-05-10Merge commit 'origin/master' into radeon-rewriteJerome Glisse
Conflicts: src/mesa/drivers/dri/r200/r200_state.c src/mesa/drivers/dri/r300/r300_context.h src/mesa/drivers/dri/r300/r300_fragprog.c src/mesa/drivers/dri/r300/r300_state.c src/mesa/drivers/dri/r300/r300_texmem.c src/mesa/drivers/dri/r300/r300_texstate.c src/mesa/drivers/dri/r300/r500_fragprog.c src/mesa/drivers/dri/radeon/radeon_screen.c src/mesa/drivers/dri/radeon/radeon_state.c
2009-05-07r300: moar cleanupMaciej Cencora
- remove unused r300UpdateClipPlanes function - move reg definition to r300_reg.h - remove incorrect forward definition of tnl_UpdateFixedFunctionProgram and add proper #include - remove unreachable code
2009-05-01mesa: in glReadBufer() set _NEW_BUFFERS, not _NEW_PIXELBrian Paul
Since GL_READ_BUFFER is historically part of the gl_pixel_attrib group it made sense to signal changes with _NEW_PIXEL. But now with FBOs it's also part of the framebuffer state. Now _NEW_PIXEL strictly indicates pixels transfer state changes. This change avoids framebuffer state validation when any random bit of pixel-transfer state is set. DRI drivers updated too: don't check _NEW_COLOR when updating framebuffer state. I think that was just copied from the Xlib driver because we care about dither enable/disable state there.
2009-05-01Merge branch 'const-buffer-changes'Brian Paul
Conflicts: src/mesa/drivers/dri/i965/brw_curbe.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_wm_glsl.c
2009-04-30r300: Increase reference count of texture objects referenced by current state.Michel Dänzer
Fixes a use-after-free reported in http://bugs.freedesktop.org/show_bug.cgi?id=20539, so this possibly fixes that bug. It has been confirmed to fix http://bugs.freedesktop.org/show_bug.cgi?id=17895 .
2009-04-27r300: fix point size clamping when point is not attenuatedMaciej Cencora
2009-04-27r300: always route 4 texcoord components to RSMaciej Cencora
Routing <4 components may lead to lock up. Thanks to Alex Deucher for suggestion.
2009-04-27r300: remove unnecessary function callsMaciej Cencora
ae_create_context is called by vbo_CreateContext ae_invalidate_state is called by vbo_InvalidateState
2009-04-27r300: rename stateMaciej Cencora
According to r300_reg.h from radeon drm module 0x4f30 is ZB_ZMASK_OFFSET. Also cleanup as trailing whitespaces.