Browse Source

Merge branch 'mesa_7_5_branch'

tags/mesa_7_6_rc1
Brian Paul 16 years ago
parent
commit
73fc09a7bf

+ 24
- 4
progs/demos/fbotexture.c View File

@@ -498,7 +498,7 @@ SetupFunctionPointers(void)
* Make FBO to render into given texture.
*/
static GLuint
MakeFBO_RenderTexture(GLuint TexObj)
MakeFBO_RenderTexture(GLuint texObj)
{
GLuint fb;
GLint sizeFudge = 0;
@@ -507,7 +507,7 @@ MakeFBO_RenderTexture(GLuint TexObj)
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, fb);
/* Render color to texture */
glFramebufferTexture2D_func(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
TexTarget, TexObj, TextureLevel);
TexTarget, texObj, TextureLevel);

if (Use_ARB_fbo) {
/* use a smaller depth buffer to see what happens */
@@ -541,7 +541,7 @@ MakeFBO_RenderTexture(GLuint TexObj)

/* queries */
{
GLint bits, w, h;
GLint bits, w, h, name;

glBindRenderbuffer_func(GL_RENDERBUFFER_EXT, DepthRB);
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
@@ -559,8 +559,28 @@ MakeFBO_RenderTexture(GLuint TexObj)
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
GL_RENDERBUFFER_STENCIL_SIZE_EXT, &bits);
printf("Stencil renderbuffer size = %d bits\n", bits);
}

glGetFramebufferAttachmentParameteriv_func(GL_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0,
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT,
&name);
printf("Render to texture name: %d\n", texObj);
printf("Color attachment[0] name: %d\n", name);
assert(texObj == name);

glGetFramebufferAttachmentParameteriv_func(GL_FRAMEBUFFER_EXT,
GL_STENCIL_ATTACHMENT,
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT,
&name);
printf("Stencil attachment name: %d\n", name);

glGetFramebufferAttachmentParameteriv_func(GL_FRAMEBUFFER_EXT,
GL_DEPTH_ATTACHMENT,
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT,
&name);
printf("Depth attachment name: %d\n", name);

}
/* bind the regular framebuffer */
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, 0);


+ 5
- 0
src/gallium/auxiliary/tgsi/tgsi_ppc.c View File

@@ -1108,6 +1108,11 @@ static int
emit_instruction(struct gen_context *gen,
struct tgsi_full_instruction *inst)
{

/* we don't handle saturation/clamping yet */
if (inst->Instruction.Saturate != TGSI_SAT_NONE)
return 0;

switch (inst->Instruction.Opcode) {
case TGSI_OPCODE_MOV:
case TGSI_OPCODE_SWZ:

+ 4
- 0
src/gallium/auxiliary/tgsi/tgsi_sse2.c View File

@@ -1747,6 +1747,10 @@ emit_instruction(
if (indirect_temp_reference(inst))
return FALSE;

/* we don't handle saturation/clamping yet */
if (inst->Instruction.Saturate != TGSI_SAT_NONE)
return FALSE;

switch (inst->Instruction.Opcode) {
case TGSI_OPCODE_ARL:
FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {

+ 1
- 1
src/gallium/drivers/trace/tr_dump.c View File

@@ -351,7 +351,7 @@ void trace_dump_call_begin_locked(const char *klass, const char *method)
trace_dump_indent(1);
trace_dump_writes("<call no=\'");
trace_dump_writef("%lu", call_no);
trace_dump_writes("\' class =\'");
trace_dump_writes("\' class=\'");
trace_dump_escape(klass);
trace_dump_writes("\' method=\'");
trace_dump_escape(method);

+ 7
- 0
src/gallium/include/pipe/p_inlines.h View File

@@ -63,6 +63,13 @@ pipe_buffer_map(struct pipe_screen *screen,
if(screen->buffer_map_range) {
unsigned offset = 0;
unsigned length = buf->size;

/* XXX: Actually we should be using/detecting DISCARD
* instead of assuming that WRITE implies discard */
if((usage & PIPE_BUFFER_USAGE_CPU_WRITE) &&
!(usage & PIPE_BUFFER_USAGE_DISCARD))
usage |= PIPE_BUFFER_USAGE_CPU_READ;

return screen->buffer_map_range(screen, buf, offset, length, usage);
}
else

+ 1
- 1
src/gallium/state_trackers/python/retrace/parse.py View File

@@ -371,7 +371,7 @@ class Main:
stream = GzipFile(arg, 'rt')
elif arg.endswith('.bz2'):
from bz2 import BZ2File
stream = BZ2File(arg, 'rt')
stream = BZ2File(arg, 'rU')
else:
stream = open(arg, 'rt')
self.process_arg(stream, options)

+ 2
- 0
src/mesa/main/ffvertex_prog.c View File

@@ -1306,7 +1306,9 @@ static void build_fog( struct tnl_program *p )
input = swizzle1(register_input(p, VERT_ATTRIB_FOG), X);
}

/* result.fog = {abs(f),0,0,1}; */
emit_op1(p, OPCODE_ABS, fog, WRITEMASK_X, input);
emit_op1(p, OPCODE_MOV, fog, WRITEMASK_YZW, get_identity_param(p));
}



Loading…
Cancel
Save