summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_context.h2
-rw-r--r--src/gallium/drivers/svga/svga_pipe_clear.c6
-rw-r--r--src/gallium/drivers/svga/svga_pipe_sampler.c9
-rw-r--r--src/gallium/drivers/svga/svga_pipe_vs.c2
-rw-r--r--src/gallium/drivers/svga/svga_screen_buffer.c3
-rw-r--r--src/gallium/drivers/svga/svga_screen_texture.c105
-rw-r--r--src/gallium/drivers/svga/svga_screen_texture.h3
-rw-r--r--src/gallium/drivers/svga/svga_state_constants.c4
-rw-r--r--src/gallium/drivers/svga/svga_state_vs.c3
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_decl_sm20.c38
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_decl_sm30.c42
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_insn.c176
-rw-r--r--src/gallium/drivers/svga/svgadump/svga_dump.c1160
-rwxr-xr-xsrc/gallium/drivers/svga/svgadump/svga_dump.py31
-rw-r--r--src/gallium/drivers/svga/svgadump/svga_shader_dump.c230
15 files changed, 928 insertions, 886 deletions
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index e650a251d1..8e7b5b3da1 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -369,7 +369,7 @@ struct svga_context
#define SVGA_NEW_FRAME_BUFFER 0x800
#define SVGA_NEW_STIPPLE 0x1000
#define SVGA_NEW_SCISSOR 0x2000
-#define SVGA_NEW_BLEND_COLOR 0x5000
+#define SVGA_NEW_BLEND_COLOR 0x4000
#define SVGA_NEW_CLIP 0x8000
#define SVGA_NEW_VIEWPORT 0x10000
#define SVGA_NEW_PRESCALE 0x20000
diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c
index 6195c3897e..409b3b41cb 100644
--- a/src/gallium/drivers/svga/svga_pipe_clear.c
+++ b/src/gallium/drivers/svga/svga_pipe_clear.c
@@ -46,7 +46,7 @@ try_clear(struct svga_context *svga,
boolean restore_viewport = FALSE;
SVGA3dClearFlag flags = 0;
struct pipe_framebuffer_state *fb = &svga->curr.framebuffer;
- unsigned color = 0;
+ union util_color uc;
ret = svga_update_state(svga, SVGA_STATE_HW_CLEAR);
if (ret)
@@ -54,7 +54,7 @@ try_clear(struct svga_context *svga,
if ((buffers & PIPE_CLEAR_COLOR) && fb->cbufs[0]) {
flags |= SVGA3D_CLEAR_COLOR;
- util_pack_color(rgba, PIPE_FORMAT_A8R8G8B8_UNORM, &color);
+ util_pack_color(rgba, PIPE_FORMAT_A8R8G8B8_UNORM, &uc);
rect.w = fb->cbufs[0]->width;
rect.h = fb->cbufs[0]->height;
@@ -77,7 +77,7 @@ try_clear(struct svga_context *svga,
return ret;
}
- ret = SVGA3D_ClearRect(svga->swc, flags, color, depth, stencil,
+ ret = SVGA3D_ClearRect(svga->swc, flags, uc.ui, depth, stencil,
rect.x, rect.y, rect.w, rect.h);
if (ret != PIPE_OK)
return ret;
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c
index 3eeca6b784..78053e755e 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -101,6 +101,7 @@ svga_create_sampler_state(struct pipe_context *pipe,
{
struct svga_context *svga = svga_context(pipe);
struct svga_sampler_state *cso = CALLOC_STRUCT( svga_sampler_state );
+ union util_color uc;
cso->mipfilter = translate_mip_filter(sampler->min_mip_filter);
cso->magfilter = translate_img_filter( sampler->mag_img_filter );
@@ -121,8 +122,8 @@ svga_create_sampler_state(struct pipe_context *pipe,
ubyte a = float_to_ubyte(sampler->border_color[3]);
util_pack_color_ub( r, g, b, a,
- PIPE_FORMAT_B8G8R8A8_UNORM,
- &cso->bordercolor );
+ PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
+ cso->bordercolor = uc.ui;
}
/* No SVGA3D support for:
@@ -234,9 +235,9 @@ static void svga_set_sampler_textures(struct pipe_context *pipe,
void svga_init_sampler_functions( struct svga_context *svga )
{
svga->pipe.create_sampler_state = svga_create_sampler_state;
- svga->pipe.bind_sampler_states = svga_bind_sampler_states;
+ svga->pipe.bind_fragment_sampler_states = svga_bind_sampler_states;
svga->pipe.delete_sampler_state = svga_delete_sampler_state;
- svga->pipe.set_sampler_textures = svga_set_sampler_textures;
+ svga->pipe.set_fragment_sampler_textures = svga_set_sampler_textures;
}
diff --git a/src/gallium/drivers/svga/svga_pipe_vs.c b/src/gallium/drivers/svga/svga_pipe_vs.c
index e5ffe668c3..c104c41f5f 100644
--- a/src/gallium/drivers/svga/svga_pipe_vs.c
+++ b/src/gallium/drivers/svga/svga_pipe_vs.c
@@ -48,7 +48,7 @@ static const struct tgsi_token *substitute_vs(
static struct tgsi_token tokens[300];
const char *text =
- "VERT1.1\n"
+ "VERT\n"
"DCL IN[0]\n"
"DCL IN[1]\n"
"DCL IN[2]\n"
diff --git a/src/gallium/drivers/svga/svga_screen_buffer.c b/src/gallium/drivers/svga/svga_screen_buffer.c
index 1f8a889672..58a1aba464 100644
--- a/src/gallium/drivers/svga/svga_screen_buffer.c
+++ b/src/gallium/drivers/svga/svga_screen_buffer.c
@@ -356,7 +356,8 @@ svga_buffer_upload_flush(struct svga_context *svga,
sbuf->hw.boxes = NULL;
/* Decrement reference count */
- pipe_buffer_reference((struct pipe_buffer **)&sbuf, NULL);
+ pipe_reference(&(sbuf->base.reference), NULL);
+ sbuf = NULL;
}
diff --git a/src/gallium/drivers/svga/svga_screen_texture.c b/src/gallium/drivers/svga/svga_screen_texture.c
index 1eb03db280..2224c2d394 100644
--- a/src/gallium/drivers/svga/svga_screen_texture.c
+++ b/src/gallium/drivers/svga/svga_screen_texture.c
@@ -29,6 +29,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
#include "pipe/p_thread.h"
+#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
@@ -158,7 +159,8 @@ svga_transfer_dma_band(struct svga_transfer *st,
st->base.x + st->base.width,
y + h,
st->base.zslice + 1,
- texture->base.block.size*8/(texture->base.block.width*texture->base.block.height));
+ util_format_get_blocksize(texture->base.format)*8/
+ (util_format_get_blockwidth(texture->base.format)*util_format_get_blockheight(texture->base.format)));
box.x = st->base.x;
box.y = y;
@@ -208,7 +210,8 @@ svga_transfer_dma(struct svga_transfer *st,
}
else {
unsigned y, h, srcy;
- h = st->hw_nblocksy * st->base.block.height;
+ unsigned blockheight = util_format_get_blockheight(st->base.texture->format);
+ h = st->hw_nblocksy * blockheight;
srcy = 0;
for(y = 0; y < st->base.height; y += h) {
unsigned offset, length;
@@ -218,11 +221,11 @@ svga_transfer_dma(struct svga_transfer *st,
h = st->base.height - y;
/* Transfer band must be aligned to pixel block boundaries */
- assert(y % st->base.block.height == 0);
- assert(h % st->base.block.height == 0);
+ assert(y % blockheight == 0);
+ assert(h % blockheight == 0);
- offset = y * st->base.stride / st->base.block.height;
- length = h * st->base.stride / st->base.block.height;
+ offset = y * st->base.stride / blockheight;
+ length = h * st->base.stride / blockheight;
sw = (uint8_t *)st->swbuf + offset;
@@ -281,24 +284,19 @@ svga_texture_create(struct pipe_screen *screen,
if(templat->last_level >= SVGA_MAX_TEXTURE_LEVELS)
goto error2;
- width = templat->width[0];
- height = templat->height[0];
- depth = templat->depth[0];
+ width = templat->width0;
+ height = templat->height0;
+ depth = templat->depth0;
for(level = 0; level <= templat->last_level; ++level) {
- tex->base.width[level] = width;
- tex->base.height[level] = height;
- tex->base.depth[level] = depth;
- tex->base.nblocksx[level] = pf_get_nblocksx(&tex->base.block, width);
- tex->base.nblocksy[level] = pf_get_nblocksy(&tex->base.block, height);
- width = minify(width);
- height = minify(height);
- depth = minify(depth);
+ width = u_minify(width, 1);
+ height = u_minify(height, 1);
+ depth = u_minify(depth, 1);
}
tex->key.flags = 0;
- tex->key.size.width = templat->width[0];
- tex->key.size.height = templat->height[0];
- tex->key.size.depth = templat->depth[0];
+ tex->key.size.width = templat->width0;
+ tex->key.size.height = templat->height0;
+ tex->key.size.depth = templat->depth0;
if(templat->target == PIPE_TEXTURE_CUBE) {
tex->key.flags |= SVGA3D_SURFACE_CUBEMAP;
@@ -322,7 +320,7 @@ svga_texture_create(struct pipe_screen *screen,
*/
#if 0
if((templat->tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) &&
- !pf_is_compressed(templat->format))
+ !util_format_is_compressed(templat->format))
tex->key.flags |= SVGA3D_SURFACE_HINT_RENDERTARGET;
#endif
@@ -365,7 +363,7 @@ svga_texture_blanket(struct pipe_screen * screen,
/* Only supports one type */
if (base->target != PIPE_TEXTURE_2D ||
base->last_level != 0 ||
- base->depth[0] != 1) {
+ base->depth0 != 1) {
return NULL;
}
@@ -538,9 +536,9 @@ svga_texture_view_surface(struct pipe_context *pipe,
key->flags = 0;
key->format = format;
key->numMipLevels = num_mip;
- key->size.width = tex->base.width[start_mip];
- key->size.height = tex->base.height[start_mip];
- key->size.depth = zslice_pick < 0 ? tex->base.depth[start_mip] : 1;
+ key->size.width = u_minify(tex->base.width0, start_mip);
+ key->size.height = u_minify(tex->base.height0, start_mip);
+ key->size.depth = zslice_pick < 0 ? u_minify(tex->base.depth0, start_mip) : 1;
key->cachable = 1;
assert(key->size.depth == 1);
@@ -574,7 +572,10 @@ svga_texture_view_surface(struct pipe_context *pipe,
for (i = 0; i < key->numMipLevels; i++) {
for (j = 0; j < key->numFaces; j++) {
if(tex->defined[j + face_pick][i + start_mip]) {
- unsigned depth = zslice_pick < 0 ? tex->base.depth[i + start_mip] : 1;
+ unsigned depth = (zslice_pick < 0 ?
+ u_minify(tex->base.depth0, i + start_mip) :
+ 1);
+
svga_texture_copy_handle(svga_context(pipe),
ss,
tex->handle,
@@ -582,8 +583,8 @@ svga_texture_view_surface(struct pipe_context *pipe,
i + start_mip,
j + face_pick,
handle, 0, 0, 0, i, j,
- tex->base.width[i + start_mip],
- tex->base.height[i + start_mip],
+ u_minify(tex->base.width0, i + start_mip),
+ u_minify(tex->base.height0, i + start_mip),
depth);
}
}
@@ -612,8 +613,8 @@ svga_get_tex_surface(struct pipe_screen *screen,
pipe_reference_init(&s->base.reference, 1);
pipe_texture_reference(&s->base.texture, pt);
s->base.format = pt->format;
- s->base.width = pt->width[level];
- s->base.height = pt->height[level];
+ s->base.width = u_minify(pt->width0, level);
+ s->base.height = u_minify(pt->height0, level);
s->base.usage = flags;
s->base.level = level;
s->base.face = face;
@@ -742,7 +743,8 @@ svga_propagate_surface(struct pipe_context *pipe, struct pipe_surface *surf)
svga_texture_copy_handle(svga_context(pipe), ss,
s->handle, 0, 0, 0, s->real_level, s->real_face,
tex->handle, 0, 0, surf->zslice, surf->level, surf->face,
- tex->base.width[surf->level], tex->base.height[surf->level], 1);
+ u_minify(tex->base.width0, surf->level),
+ u_minify(tex->base.height0, surf->level), 1);
tex->defined[surf->face][surf->level] = TRUE;
}
}
@@ -770,6 +772,8 @@ svga_get_tex_transfer(struct pipe_screen *screen,
struct svga_screen *ss = svga_screen(screen);
struct svga_winsys_screen *sws = ss->sws;
struct svga_transfer *st;
+ unsigned nblocksx = util_format_get_nblocksx(texture->format, w);
+ unsigned nblocksy = util_format_get_nblocksy(texture->format, h);
/* We can't map texture storage directly */
if (usage & PIPE_TRANSFER_MAP_DIRECTLY)
@@ -779,21 +783,17 @@ svga_get_tex_transfer(struct pipe_screen *screen,
if (!st)
return NULL;
- st->base.format = texture->format;
- st->base.block = texture->block;
st->base.x = x;
st->base.y = y;
st->base.width = w;
st->base.height = h;
- st->base.nblocksx = pf_get_nblocksx(&texture->block, w);
- st->base.nblocksy = pf_get_nblocksy(&texture->block, h);
- st->base.stride = st->base.nblocksx*st->base.block.size;
+ st->base.stride = nblocksx*util_format_get_blocksize(texture->format);
st->base.usage = usage;
st->base.face = face;
st->base.level = level;
st->base.zslice = zslice;
- st->hw_nblocksy = st->base.nblocksy;
+ st->hw_nblocksy = nblocksy;
st->hwbuf = svga_winsys_buffer_create(ss,
1,
@@ -809,15 +809,15 @@ svga_get_tex_transfer(struct pipe_screen *screen,
if(!st->hwbuf)
goto no_hwbuf;
- if(st->hw_nblocksy < st->base.nblocksy) {
+ if(st->hw_nblocksy < nblocksy) {
/* We couldn't allocate a hardware buffer big enough for the transfer,
* so allocate regular malloc memory instead */
debug_printf("%s: failed to allocate %u KB of DMA, splitting into %u x %u KB DMA transfers\n",
__FUNCTION__,
- (st->base.nblocksy*st->base.stride + 1023)/1024,
- (st->base.nblocksy + st->hw_nblocksy - 1)/st->hw_nblocksy,
+ (nblocksy*st->base.stride + 1023)/1024,
+ (nblocksy + st->hw_nblocksy - 1)/st->hw_nblocksy,
(st->hw_nblocksy*st->base.stride + 1023)/1024);
- st->swbuf = MALLOC(st->base.nblocksy*st->base.stride);
+ st->swbuf = MALLOC(nblocksy*st->base.stride);
if(!st->swbuf)
goto no_swbuf;
}
@@ -932,7 +932,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe, struct pipe_texture *pt,
if (min_lod == 0 && max_lod >= pt->last_level)
view = FALSE;
- if (pf_is_compressed(pt->format) && view) {
+ if (util_format_is_compressed(pt->format) && view) {
format = svga_translate_format_render(pt->format);
}
@@ -971,9 +971,9 @@ svga_get_tex_sampler_view(struct pipe_context *pipe, struct pipe_texture *pt,
"svga: Sampler view: no %p, mips %u..%u, nr %u, size (%ux%ux%u), last %u\n",
pt, min_lod, max_lod,
max_lod - min_lod + 1,
- pt->width[0],
- pt->height[0],
- pt->depth[0],
+ pt->width0,
+ pt->height0,
+ pt->depth0,
pt->last_level);
sv->key.cachable = 0;
sv->handle = tex->handle;
@@ -984,9 +984,9 @@ svga_get_tex_sampler_view(struct pipe_context *pipe, struct pipe_texture *pt,
"svga: Sampler view: yes %p, mips %u..%u, nr %u, size (%ux%ux%u), last %u\n",
pt, min_lod, max_lod,
max_lod - min_lod + 1,
- pt->width[0],
- pt->height[0],
- pt->depth[0],
+ pt->width0,
+ pt->height0,
+ pt->depth0,
pt->last_level);
sv->age = tex->age;
@@ -1036,9 +1036,9 @@ svga_validate_sampler_view(struct svga_context *svga, struct svga_sampler_view *
svga_texture_copy_handle(svga, NULL,
tex->handle, 0, 0, 0, i, k,
v->handle, 0, 0, 0, i - v->min_lod, k,
- tex->base.width[i],
- tex->base.height[i],
- tex->base.depth[i]);
+ u_minify(tex->base.width0, i),
+ u_minify(tex->base.height0, i),
+ u_minify(tex->base.depth0, i));
}
}
@@ -1071,8 +1071,7 @@ svga_screen_buffer_from_texture(struct pipe_texture *texture,
svga_translate_format(texture->format),
stex->handle);
- *stride = pf_get_nblocksx(&texture->block, texture->width[0]) *
- texture->block.size;
+ *stride = util_format_get_stride(texture->format, texture->width0);
return *buffer != NULL;
}
diff --git a/src/gallium/drivers/svga/svga_screen_texture.h b/src/gallium/drivers/svga/svga_screen_texture.h
index 8cfdfea693..89ae24219f 100644
--- a/src/gallium/drivers/svga/svga_screen_texture.h
+++ b/src/gallium/drivers/svga/svga_screen_texture.h
@@ -171,8 +171,9 @@ svga_sampler_view_reference(struct svga_sampler_view **ptr, struct svga_sampler_
{
struct svga_sampler_view *old = *ptr;
- if (pipe_reference((struct pipe_reference **)ptr, &v->reference))
+ if (pipe_reference(&(*ptr)->reference, &v->reference))
svga_destroy_sampler_view_priv(old);
+ *ptr = v;
}
extern void
diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c
index a5777d4fbd..6b0e511cec 100644
--- a/src/gallium/drivers/svga/svga_state_constants.c
+++ b/src/gallium/drivers/svga/svga_state_constants.c
@@ -140,8 +140,8 @@ static int emit_fs_consts( struct svga_context *svga,
struct pipe_texture *tex = svga->curr.texture[i];
float data[4];
- data[0] = 1.0 / (float)tex->width[0];
- data[1] = 1.0 / (float)tex->height[0];
+ data[0] = 1.0 / (float)tex->width0;
+ data[1] = 1.0 / (float)tex->height0;
data[2] = 1.0;
data[3] = 1.0;
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index a947745732..44b7ceb4fa 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
@@ -25,6 +25,7 @@
#include "pipe/p_inlines.h"
#include "pipe/p_defines.h"
+#include "util/u_format.h"
#include "util/u_math.h"
#include "translate/translate.h"
@@ -210,7 +211,7 @@ static int update_zero_stride( struct svga_context *svga,
mapped_buffer = pipe_buffer_map_range(svga->pipe.screen,
vbuffer->buffer,
vel->src_offset,
- pf_get_size(vel->src_format),
+ util_format_get_blocksize(vel->src_format),
PIPE_BUFFER_USAGE_CPU_READ);
translate->set_buffer(translate, vel->vertex_buffer_index,
mapped_buffer,
diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c
index 54457082a0..23b3ace7f3 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c
@@ -46,7 +46,7 @@ static boolean ps20_input( struct svga_shader_emitter *emit,
dcl.values[0] = 0;
dcl.values[1] = 0;
- switch (semantic.SemanticName) {
+ switch (semantic.Name) {
case TGSI_SEMANTIC_POSITION:
/* Special case:
*/
@@ -55,15 +55,15 @@ static boolean ps20_input( struct svga_shader_emitter *emit,
break;
case TGSI_SEMANTIC_COLOR:
reg = src_register( SVGA3DREG_INPUT,
- semantic.SemanticIndex );
+ semantic.Index );
break;
case TGSI_SEMANTIC_FOG:
- assert(semantic.SemanticIndex == 0);
+ assert(semantic.Index == 0);
reg = src_register( SVGA3DREG_TEXTURE, 0 );
break;
case TGSI_SEMANTIC_GENERIC:
reg = src_register( SVGA3DREG_TEXTURE,
- semantic.SemanticIndex + 1 );
+ semantic.Index + 1 );
break;
default:
assert(0);
@@ -90,16 +90,16 @@ static boolean ps20_output( struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken reg;
- switch (semantic.SemanticName) {
+ switch (semantic.Name) {
case TGSI_SEMANTIC_COLOR:
- if (semantic.SemanticIndex < PIPE_MAX_COLOR_BUFS) {
- unsigned cbuf = semantic.SemanticIndex;
+ if (semantic.Index < PIPE_MAX_COLOR_BUFS) {
+ unsigned cbuf = semantic.Index;
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_col[cbuf] = emit->output_map[idx];
emit->true_col[cbuf] = dst_register( SVGA3DREG_COLOROUT,
- semantic.SemanticIndex );
+ semantic.Index );
}
else {
assert(0);
@@ -111,7 +111,7 @@ static boolean ps20_output( struct svga_shader_emitter *emit,
emit->nr_hw_temp++ );
emit->temp_pos = emit->output_map[idx];
emit->true_pos = dst_register( SVGA3DREG_DEPTHOUT,
- semantic.SemanticIndex );
+ semantic.Index );
break;
default:
assert(0);
@@ -169,9 +169,9 @@ static boolean vs20_output( struct svga_shader_emitter *emit,
/* Just build the register map table:
*/
- switch (semantic.SemanticName) {
+ switch (semantic.Name) {
case TGSI_SEMANTIC_POSITION:
- assert(semantic.SemanticIndex == 0);
+ assert(semantic.Index == 0);
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_pos = emit->output_map[idx];
@@ -179,7 +179,7 @@ static boolean vs20_output( struct svga_shader_emitter *emit,
SVGA3DRASTOUT_POSITION);
break;
case TGSI_SEMANTIC_PSIZE:
- assert(semantic.SemanticIndex == 0);
+ assert(semantic.Index == 0);
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_psiz = emit->output_map[idx];
@@ -187,17 +187,17 @@ static boolean vs20_output( struct svga_shader_emitter *emit,
SVGA3DRASTOUT_PSIZE );
break;
case TGSI_SEMANTIC_FOG:
- assert(semantic.SemanticIndex == 0);
+ assert(semantic.Index == 0);
emit->output_map[idx] = dst_register( SVGA3DREG_TEXCRDOUT, 0 );
break;
case TGSI_SEMANTIC_COLOR:
/* oD0 */
emit->output_map[idx] = dst_register( SVGA3DREG_ATTROUT,
- semantic.SemanticIndex );
+ semantic.Index );
break;
case TGSI_SEMANTIC_GENERIC:
emit->output_map[idx] = dst_register( SVGA3DREG_TEXCRDOUT,
- semantic.SemanticIndex + 1 );
+ semantic.Index + 1 );
break;
default:
assert(0);
@@ -230,15 +230,15 @@ static boolean ps20_sampler( struct svga_shader_emitter *emit,
boolean svga_translate_decl_sm20( struct svga_shader_emitter *emit,
const struct tgsi_full_declaration *decl )
{
- unsigned first = decl->DeclarationRange.First;
- unsigned last = decl->DeclarationRange.Last;
+ unsigned first = decl->Range.First;
+ unsigned last = decl->Range.Last;
unsigned semantic = 0;
unsigned semantic_idx = 0;
unsigned idx;
if (decl->Declaration.Semantic) {
- semantic = decl->Semantic.SemanticName;
- semantic_idx = decl->Semantic.SemanticIndex;
+ semantic = decl->Semantic.Name;
+ semantic_idx = decl->Semantic.Index;
}
for( idx = first; idx <= last; idx++ ) {
diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
index 08e7dfb117..d1c7336dec 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
@@ -35,35 +35,35 @@ static boolean translate_vs_ps_semantic( struct tgsi_declaration_semantic semant
unsigned *usage,
unsigned *idx )
{
- switch (semantic.SemanticName) {
+ switch (semantic.Name) {
case TGSI_SEMANTIC_POSITION:
- *idx = semantic.SemanticIndex;
+ *idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_POSITION;
break;
case TGSI_SEMANTIC_COLOR:
- *idx = semantic.SemanticIndex;
+ *idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_COLOR;
break;
case TGSI_SEMANTIC_BCOLOR:
- *idx = semantic.SemanticIndex + 2; /* sharing with COLOR */
+ *idx = semantic.Index + 2; /* sharing with COLOR */
*usage = SVGA3D_DECLUSAGE_COLOR;
break;
case TGSI_SEMANTIC_FOG:
*idx = 0;
- assert(semantic.SemanticIndex == 0);
+ assert(semantic.Index == 0);
*usage = SVGA3D_DECLUSAGE_TEXCOORD;
break;
case TGSI_SEMANTIC_PSIZE:
- *idx = semantic.SemanticIndex;
+ *idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_PSIZE;
break;
case TGSI_SEMANTIC_GENERIC:
- *idx = semantic.SemanticIndex + 1; /* texcoord[0] is reserved for fog */
+ *idx = semantic.Index + 1; /* texcoord[0] is reserved for fog */
*usage = SVGA3D_DECLUSAGE_TEXCOORD;
break;
case TGSI_SEMANTIC_NORMAL:
- *idx = semantic.SemanticIndex;
+ *idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_NORMAL;
break;
default:
@@ -120,7 +120,7 @@ static boolean ps30_input( struct svga_shader_emitter *emit,
unsigned usage, index;
SVGA3dShaderDestToken reg;
- if (semantic.SemanticName == TGSI_SEMANTIC_POSITION) {
+ if (semantic.Name == TGSI_SEMANTIC_POSITION) {
emit->input_map[idx] = src_register( SVGA3DREG_MISCTYPE,
SVGA3DMISCREG_POSITION );
@@ -135,7 +135,7 @@ static boolean ps30_input( struct svga_shader_emitter *emit,
return emit_decl( emit, reg, 0, 0 );
}
else if (emit->key.fkey.light_twoside &&
- (semantic.SemanticName == TGSI_SEMANTIC_COLOR)) {
+ (semantic.Name == TGSI_SEMANTIC_COLOR)) {
if (!translate_vs_ps_semantic( semantic, &usage, &index ))
return FALSE;
@@ -150,7 +150,7 @@ static boolean ps30_input( struct svga_shader_emitter *emit,
if (!emit_decl( emit, reg, usage, index ))
return FALSE;
- semantic.SemanticName = TGSI_SEMANTIC_BCOLOR;
+ semantic.Name = TGSI_SEMANTIC_BCOLOR;
if (!translate_vs_ps_semantic( semantic, &usage, &index ))
return FALSE;
@@ -164,7 +164,7 @@ static boolean ps30_input( struct svga_shader_emitter *emit,
return TRUE;
}
- else if (semantic.SemanticName == TGSI_SEMANTIC_FACE) {
+ else if (semantic.Name == TGSI_SEMANTIC_FACE) {
if (!emit_vface_decl( emit ))
return FALSE;
emit->emit_frontface = TRUE;
@@ -193,17 +193,17 @@ static boolean ps30_output( struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken reg;
- switch (semantic.SemanticName) {
+ switch (semantic.Name) {
case TGSI_SEMANTIC_COLOR:
emit->output_map[idx] = dst_register( SVGA3DREG_COLOROUT,
- semantic.SemanticIndex );
+ semantic.Index );
break;
case TGSI_SEMANTIC_POSITION:
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_pos = emit->output_map[idx];
emit->true_pos = dst_register( SVGA3DREG_DEPTHOUT,
- semantic.SemanticIndex );
+ semantic.Index );
break;
default:
assert(0);
@@ -283,14 +283,14 @@ static boolean vs30_output( struct svga_shader_emitter *emit,
dcl.index = index;
dcl.values[0] |= 1<<31;
- if (semantic.SemanticName == TGSI_SEMANTIC_POSITION) {
+ if (semantic.Name == TGSI_SEMANTIC_POSITION) {
assert(idx == 0);
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_pos = emit->output_map[idx];
emit->true_pos = dcl.dst;
}
- else if (semantic.SemanticName == TGSI_SEMANTIC_PSIZE) {
+ else if (semantic.Name == TGSI_SEMANTIC_PSIZE) {
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_psiz = emit->output_map[idx];
@@ -335,15 +335,15 @@ static boolean ps30_sampler( struct svga_shader_emitter *emit,
boolean svga_translate_decl_sm30( struct svga_shader_emitter *emit,
const struct tgsi_full_declaration *decl )
{
- unsigned first = decl->DeclarationRange.First;
- unsigned last = decl->DeclarationRange.Last;
+ unsigned first = decl->Range.First;
+ unsigned last = decl->Range.Last;
unsigned semantic = 0;
unsigned semantic_idx = 0;
unsigned idx;
if (decl->Declaration.Semantic) {
- semantic = decl->Semantic.SemanticName;
- semantic_idx = decl->Semantic.SemanticIndex;
+ semantic = decl->Semantic.Name;
+ semantic_idx = decl->Semantic.Index;
}
for( idx = first; idx <= last; idx++ ) {
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index ea409b7e16..1670da8bfa 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -96,24 +96,24 @@ translate_dst_register( struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn,
unsigned idx )
{
- const struct tgsi_full_dst_register *reg = &insn->FullDstRegisters[idx];
+ const struct tgsi_full_dst_register *reg = &insn->Dst[idx];
SVGA3dShaderDestToken dest;
- switch (reg->DstRegister.File) {
+ switch (reg->Register.File) {
case TGSI_FILE_OUTPUT:
/* Output registers encode semantic information in their name.
* Need to lookup a table built at decl time:
*/
- dest = emit->output_map[reg->DstRegister.Index];
+ dest = emit->output_map[reg->Register.Index];
break;
default:
- dest = dst_register( translate_file( reg->DstRegister.File ),
- reg->DstRegister.Index );
+ dest = dst_register( translate_file( reg->Register.File ),
+ reg->Register.Index );
break;
}
- dest.mask = reg->DstRegister.WriteMask;
+ dest.mask = reg->Register.WriteMask;
if (insn->Instruction.Saturate)
dest.dstMod = SVGA3DDSTMOD_SATURATE;
@@ -176,33 +176,33 @@ translate_src_register( const struct svga_shader_emitter *emit,
{
struct src_register src;
- switch (reg->SrcRegister.File) {
+ switch (reg->Register.File) {
case TGSI_FILE_INPUT:
/* Input registers are referred to by their semantic name rather
* than by index. Use the mapping build up from the decls:
*/
- src = emit->input_map[reg->SrcRegister.Index];
+ src = emit->input_map[reg->Register.Index];
break;
case TGSI_FILE_IMMEDIATE:
/* Immediates are appended after TGSI constants in the D3D
* constant buffer.
*/
- src = src_register( translate_file( reg->SrcRegister.File ),
- reg->SrcRegister.Index +
+ src = src_register( translate_file( reg->Register.File ),
+ reg->Register.Index +
emit->imm_start );
break;
default:
- src = src_register( translate_file( reg->SrcRegister.File ),
- reg->SrcRegister.Index );
+ src = src_register( translate_file( reg->Register.File ),
+ reg->Register.Index );
break;
}
/* Indirect addressing (for coninstant buffer lookups only)
*/
- if (reg->SrcRegister.Indirect)
+ if (reg->Register.Indirect)
{
/* we shift the offset towards the minimum */
if (svga_arl_needs_adjustment( emit )) {
@@ -213,28 +213,28 @@ translate_src_register( const struct svga_shader_emitter *emit,
/* Not really sure what should go in the second token:
*/
src.indirect = src_token( SVGA3DREG_ADDR,
- reg->SrcRegisterInd.Index );
+ reg->Indirect.Index );
src.indirect.swizzle = SWIZZLE_XXXX;
}
src = swizzle( src,
- reg->SrcRegister.SwizzleX,
- reg->SrcRegister.SwizzleY,
- reg->SrcRegister.SwizzleZ,
- reg->SrcRegister.SwizzleW );
+ reg->Register.SwizzleX,
+ reg->Register.SwizzleY,
+ reg->Register.SwizzleZ,
+ reg->Register.SwizzleW );
/* src.mod isn't a bitfield, unfortunately:
* See tgsi_util_get_full_src_register_sign_mode for implementation details.
*/
- if (reg->SrcRegisterExtMod.Absolute) {
- if (reg->SrcRegisterExtMod.Negate)
+ if (reg->Register.Absolute) {
+ if (reg->Register.Negate)
src.base.srcMod = SVGA3DSRCMOD_ABSNEG;
else
src.base.srcMod = SVGA3DSRCMOD_ABS;
}
else {
- if (reg->SrcRegister.Negate != reg->SrcRegisterExtMod.Negate)
+ if (reg->Register.Negate)
src.base.srcMod = SVGA3DSRCMOD_NEG;
else
src.base.srcMod = SVGA3DSRCMOD_NONE;
@@ -629,7 +629,7 @@ static boolean emit_fake_arl(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn)
{
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
struct src_register src1 = get_fake_arl_const( emit );
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
SVGA3dShaderDestToken tmp = get_temp( emit );
@@ -653,7 +653,7 @@ static boolean emit_if(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn)
{
const struct src_register src = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
struct src_register zero = get_zero_immediate( emit );
SVGA3dShaderInstToken if_token = inst_token( SVGA3DOP_IFC );
@@ -690,7 +690,7 @@ static boolean emit_floor(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
SVGA3dShaderDestToken temp = get_temp( emit );
/* FRC TMP, SRC */
@@ -716,11 +716,11 @@ static boolean emit_cmp(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
const struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
const struct src_register src2 = translate_src_register(
- emit, &insn->FullSrcRegisters[2] );
+ emit, &insn->Src[2] );
/* CMP DST, SRC0, SRC2, SRC1 */
return submit_op3( emit, inst_token( SVGA3DOP_CMP ), dst, src0, src2, src1);
@@ -740,9 +740,9 @@ static boolean emit_div(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
const struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
SVGA3dShaderDestToken temp = get_temp( emit );
int i;
@@ -782,9 +782,9 @@ static boolean emit_dp2(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
const struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
SVGA3dShaderDestToken temp = get_temp( emit );
struct src_register temp_src0, temp_src1;
@@ -815,9 +815,9 @@ static boolean emit_dph(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
SVGA3dShaderDestToken temp = get_temp( emit );
/* DP3 TMP, SRC1, SRC2 */
@@ -846,7 +846,7 @@ static boolean emit_nrm(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
SVGA3dShaderDestToken temp = get_temp( emit );
/* DP3 TMP, SRC, SRC */
@@ -889,7 +889,7 @@ static boolean emit_sincos(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
SVGA3dShaderDestToken temp = get_temp( emit );
/* SCS TMP SRC */
@@ -912,7 +912,7 @@ static boolean emit_sin(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
SVGA3dShaderDestToken temp = get_temp( emit );
/* SCS TMP SRC */
@@ -937,7 +937,7 @@ static boolean emit_cos(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
SVGA3dShaderDestToken temp = get_temp( emit );
/* SCS TMP SRC */
@@ -962,9 +962,9 @@ static boolean emit_sub(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
src1 = negate(src1);
@@ -980,19 +980,19 @@ static boolean emit_kil(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn )
{
SVGA3dShaderInstToken inst;
- const struct tgsi_full_src_register *reg = &insn->FullSrcRegisters[0];
+ const struct tgsi_full_src_register *reg = &insn->Src[0];
struct src_register src0;
inst = inst_token( SVGA3DOP_TEXKILL );
src0 = translate_src_register( emit, reg );
- if (reg->SrcRegisterExtMod.Absolute ||
- reg->SrcRegister.Negate != reg->SrcRegisterExtMod.Negate ||
- reg->SrcRegister.Indirect ||
- reg->SrcRegister.SwizzleX != 0 ||
- reg->SrcRegister.SwizzleY != 1 ||
- reg->SrcRegister.SwizzleZ != 2 ||
- reg->SrcRegister.File != TGSI_FILE_TEMPORARY)
+ if (reg->Register.Absolute ||
+ reg->Register.Negate ||
+ reg->Register.Indirect ||
+ reg->Register.SwizzleX != 0 ||
+ reg->Register.SwizzleY != 1 ||
+ reg->Register.SwizzleZ != 2 ||
+ reg->Register.File != TGSI_FILE_TEMPORARY)
{
SVGA3dShaderDestToken temp = get_temp( emit );
@@ -1154,9 +1154,9 @@ static boolean emit_select_op(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
return emit_select( emit, compare, dst, src0, src1 );
}
@@ -1189,8 +1189,8 @@ static boolean emit_tex2(struct svga_shader_emitter *emit,
return FALSE;
}
- src0 = translate_src_register( emit, &insn->FullSrcRegisters[0] );
- src1 = translate_src_register( emit, &insn->FullSrcRegisters[1] );
+ src0 = translate_src_register( emit, &insn->Src[0] );
+ src1 = translate_src_register( emit, &insn->Src[1] );
if (emit->key.fkey.tex[src1.base.num].unnormalized) {
struct src_register wh = get_tex_dimensions( emit, src1.base.num );
@@ -1231,9 +1231,9 @@ static boolean emit_tex3(struct svga_shader_emitter *emit,
break;
}
- src0 = translate_src_register( emit, &insn->FullSrcRegisters[0] );
- src1 = translate_src_register( emit, &insn->FullSrcRegisters[1] );
- src2 = translate_src_register( emit, &insn->FullSrcRegisters[2] );
+ src0 = translate_src_register( emit, &insn->Src[0] );
+ src1 = translate_src_register( emit, &insn->Src[1] );
+ src2 = translate_src_register( emit, &insn->Src[2] );
return submit_op3( emit, inst, dst, src0, src1, src2 );
}
@@ -1245,9 +1245,9 @@ static boolean emit_tex(struct svga_shader_emitter *emit,
SVGA3dShaderDestToken dst =
translate_dst_register( emit, insn, 0 );
struct src_register src0 =
- translate_src_register( emit, &insn->FullSrcRegisters[0] );
+ translate_src_register( emit, &insn->Src[0] );
struct src_register src1 =
- translate_src_register( emit, &insn->FullSrcRegisters[1] );
+ translate_src_register( emit, &insn->Src[1] );
SVGA3dShaderDestToken tex_result;
@@ -1359,7 +1359,7 @@ static boolean emit_scalar_op1( struct svga_shader_emitter *emit,
inst = inst_token( opcode );
dst = translate_dst_register( emit, insn, 0 );
- src = translate_src_register( emit, &insn->FullSrcRegisters[0] );
+ src = translate_src_register( emit, &insn->Src[0] );
src = scalar( src, TGSI_SWIZZLE_X );
return submit_op1( emit, inst, dst, src );
@@ -1370,7 +1370,7 @@ static boolean emit_simple_instruction(struct svga_shader_emitter *emit,
unsigned opcode,
const struct tgsi_full_instruction *insn )
{
- const struct tgsi_full_src_register *src = insn->FullSrcRegisters;
+ const struct tgsi_full_src_register *src = insn->Src;
SVGA3dShaderInstToken inst;
SVGA3dShaderDestToken dst;
@@ -1428,13 +1428,13 @@ static boolean emit_pow(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
boolean need_tmp = FALSE;
/* POW can only output to a temporary */
- if (insn->FullDstRegisters[0].DstRegister.File != TGSI_FILE_TEMPORARY)
+ if (insn->Dst[0].Register.File != TGSI_FILE_TEMPORARY)
need_tmp = TRUE;
/* POW src1 must not be the same register as dst */
@@ -1463,9 +1463,9 @@ static boolean emit_xpd(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
const struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
boolean need_dst_tmp = FALSE;
/* XPD can only output to a temporary */
@@ -1517,11 +1517,11 @@ static boolean emit_lrp(struct svga_shader_emitter *emit,
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
SVGA3dShaderDestToken tmp;
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
const struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
const struct src_register src2 = translate_src_register(
- emit, &insn->FullSrcRegisters[2] );
+ emit, &insn->Src[2] );
boolean need_dst_tmp = FALSE;
/* The dst reg must not be the same as src0 or src2 */
@@ -1568,9 +1568,9 @@ static boolean emit_dst_insn(struct svga_shader_emitter *emit,
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
SVGA3dShaderDestToken tmp;
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
const struct src_register src1 = translate_src_register(
- emit, &insn->FullSrcRegisters[1] );
+ emit, &insn->Src[1] );
struct src_register zero = get_zero_immediate( emit );
boolean need_tmp = FALSE;
@@ -1633,7 +1633,7 @@ static boolean emit_exp(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 =
- translate_src_register( emit, &insn->FullSrcRegisters[0] );
+ translate_src_register( emit, &insn->Src[0] );
struct src_register zero = get_zero_immediate( emit );
SVGA3dShaderDestToken fraction;
@@ -1723,7 +1723,7 @@ static boolean emit_lit(struct svga_shader_emitter *emit,
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
SVGA3dShaderDestToken tmp = get_temp( emit );
const struct src_register src0 = translate_src_register(
- emit, &insn->FullSrcRegisters[0] );
+ emit, &insn->Src[0] );
struct src_register zero = get_zero_immediate( emit );
/* tmp = pow(src.y, src.w)
@@ -1806,7 +1806,7 @@ static boolean emit_ex2( struct svga_shader_emitter *emit,
inst = inst_token( SVGA3DOP_EXP );
dst = translate_dst_register( emit, insn, 0 );
- src0 = translate_src_register( emit, &insn->FullSrcRegisters[0] );
+ src0 = translate_src_register( emit, &insn->Src[0] );
src0 = scalar( src0, TGSI_SWIZZLE_X );
if (dst.mask != TGSI_WRITEMASK_XYZW) {
@@ -1829,7 +1829,7 @@ static boolean emit_log(struct svga_shader_emitter *emit,
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
struct src_register src0 =
- translate_src_register( emit, &insn->FullSrcRegisters[0] );
+ translate_src_register( emit, &insn->Src[0] );
struct src_register zero = get_zero_immediate( emit );
SVGA3dShaderDestToken abs_tmp;
struct src_register abs_src0;
@@ -1953,7 +1953,7 @@ static boolean emit_bgnsub( struct svga_shader_emitter *emit,
static boolean emit_call( struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn )
{
- unsigned position = insn->InstructionExtLabel.Label;
+ unsigned position = insn->Label.Label;
unsigned i;
for (i = 0; i < emit->nr_labels; i++) {
@@ -2543,27 +2543,27 @@ pre_parse_instruction( struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn,
int current_arl)
{
- if (insn->FullSrcRegisters[0].SrcRegister.Indirect &&
- insn->FullSrcRegisters[0].SrcRegisterInd.File == TGSI_FILE_ADDRESS) {
- const struct tgsi_full_src_register *reg = &insn->FullSrcRegisters[0];
- if (reg->SrcRegister.Index < 0) {
- pre_parse_add_indirect(emit, reg->SrcRegister.Index, current_arl);
+ if (insn->Src[0].Register.Indirect &&
+ insn->Src[0].Indirect.File == TGSI_FILE_ADDRESS) {
+ const struct tgsi_full_src_register *reg = &insn->Src[0];
+ if (reg->Register.Index < 0) {
+ pre_parse_add_indirect(emit, reg->Register.Index, current_arl);
}
}
- if (insn->FullSrcRegisters[1].SrcRegister.Indirect &&
- insn->FullSrcRegisters[1].SrcRegisterInd.File == TGSI_FILE_ADDRESS) {
- const struct tgsi_full_src_register *reg = &insn->FullSrcRegisters[1];
- if (reg->SrcRegister.Index < 0) {
- pre_parse_add_indirect(emit, reg->SrcRegister.Index, current_arl);
+ if (insn->Src[1].Register.Indirect &&
+ insn->Src[1].Indirect.File == TGSI_FILE_ADDRESS) {
+ const struct tgsi_full_src_register *reg = &insn->Src[1];
+ if (reg->Register.Index < 0) {
+ pre_parse_add_indirect(emit, reg->Register.Index, current_arl);
}
}
- if (insn->FullSrcRegisters[2].SrcRegister.Indirect &&
- insn->FullSrcRegisters[2].SrcRegisterInd.File == TGSI_FILE_ADDRESS) {
- const struct tgsi_full_src_register *reg = &insn->FullSrcRegisters[2];
- if (reg->SrcRegister.Index < 0) {
- pre_parse_add_indirect(emit, reg->SrcRegister.Index, current_arl);
+ if (insn->Src[2].Register.Indirect &&
+ insn->Src[2].Indirect.File == TGSI_FILE_ADDRESS) {
+ const struct tgsi_full_src_register *reg = &insn->Src[2];
+ if (reg->Register.Index < 0) {
+ pre_parse_add_indirect(emit, reg->Register.Index, current_arl);
}
}
diff --git a/src/gallium/drivers/svga/svgadump/svga_dump.c b/src/gallium/drivers/svga/svgadump/svga_dump.c
index 910afa2528..e6d4a74e86 100644
--- a/src/gallium/drivers/svga/svgadump/svga_dump.c
+++ b/src/gallium/drivers/svga/svgadump/svga_dump.c
@@ -42,554 +42,554 @@ dump_SVGA3dVertexDecl(const SVGA3dVertexDecl *cmd)
{
switch((*cmd).identity.type) {
case SVGA3D_DECLTYPE_FLOAT1:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT1\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT1\n");
break;
case SVGA3D_DECLTYPE_FLOAT2:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT2\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT2\n");
break;
case SVGA3D_DECLTYPE_FLOAT3:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT3\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT3\n");
break;
case SVGA3D_DECLTYPE_FLOAT4:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT4\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT4\n");
break;
case SVGA3D_DECLTYPE_D3DCOLOR:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_D3DCOLOR\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_D3DCOLOR\n");
break;
case SVGA3D_DECLTYPE_UBYTE4:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_UBYTE4\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_UBYTE4\n");
break;
case SVGA3D_DECLTYPE_SHORT2:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT2\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT2\n");
break;
case SVGA3D_DECLTYPE_SHORT4:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT4\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT4\n");
break;
case SVGA3D_DECLTYPE_UBYTE4N:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_UBYTE4N\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_UBYTE4N\n");
break;
case SVGA3D_DECLTYPE_SHORT2N:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT2N\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT2N\n");
break;
case SVGA3D_DECLTYPE_SHORT4N:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT4N\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_SHORT4N\n");
break;
case SVGA3D_DECLTYPE_USHORT2N:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_USHORT2N\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_USHORT2N\n");
break;
case SVGA3D_DECLTYPE_USHORT4N:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_USHORT4N\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_USHORT4N\n");
break;
case SVGA3D_DECLTYPE_UDEC3:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_UDEC3\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_UDEC3\n");
break;
case SVGA3D_DECLTYPE_DEC3N:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_DEC3N\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_DEC3N\n");
break;
case SVGA3D_DECLTYPE_FLOAT16_2:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT16_2\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT16_2\n");
break;
case SVGA3D_DECLTYPE_FLOAT16_4:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT16_4\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_FLOAT16_4\n");
break;
case SVGA3D_DECLTYPE_MAX:
- debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_MAX\n");
+ _debug_printf("\t\t.identity.type = SVGA3D_DECLTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.identity.type = %i\n", (*cmd).identity.type);
+ _debug_printf("\t\t.identity.type = %i\n", (*cmd).identity.type);
break;
}
switch((*cmd).identity.method) {
case SVGA3D_DECLMETHOD_DEFAULT:
- debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_DEFAULT\n");
+ _debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_DEFAULT\n");
break;
case SVGA3D_DECLMETHOD_PARTIALU:
- debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_PARTIALU\n");
+ _debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_PARTIALU\n");
break;
case SVGA3D_DECLMETHOD_PARTIALV:
- debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_PARTIALV\n");
+ _debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_PARTIALV\n");
break;
case SVGA3D_DECLMETHOD_CROSSUV:
- debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_CROSSUV\n");
+ _debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_CROSSUV\n");
break;
case SVGA3D_DECLMETHOD_UV:
- debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_UV\n");
+ _debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_UV\n");
break;
case SVGA3D_DECLMETHOD_LOOKUP:
- debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_LOOKUP\n");
+ _debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_LOOKUP\n");
break;
case SVGA3D_DECLMETHOD_LOOKUPPRESAMPLED:
- debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_LOOKUPPRESAMPLED\n");
+ _debug_printf("\t\t.identity.method = SVGA3D_DECLMETHOD_LOOKUPPRESAMPLED\n");
break;
default:
- debug_printf("\t\t.identity.method = %i\n", (*cmd).identity.method);
+ _debug_printf("\t\t.identity.method = %i\n", (*cmd).identity.method);
break;
}
switch((*cmd).identity.usage) {
case SVGA3D_DECLUSAGE_POSITION:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_POSITION\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_POSITION\n");
break;
case SVGA3D_DECLUSAGE_BLENDWEIGHT:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_BLENDWEIGHT\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_BLENDWEIGHT\n");
break;
case SVGA3D_DECLUSAGE_BLENDINDICES:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_BLENDINDICES\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_BLENDINDICES\n");
break;
case SVGA3D_DECLUSAGE_NORMAL:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_NORMAL\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_NORMAL\n");
break;
case SVGA3D_DECLUSAGE_PSIZE:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_PSIZE\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_PSIZE\n");
break;
case SVGA3D_DECLUSAGE_TEXCOORD:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_TEXCOORD\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_TEXCOORD\n");
break;
case SVGA3D_DECLUSAGE_TANGENT:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_TANGENT\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_TANGENT\n");
break;
case SVGA3D_DECLUSAGE_BINORMAL:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_BINORMAL\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_BINORMAL\n");
break;
case SVGA3D_DECLUSAGE_TESSFACTOR:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_TESSFACTOR\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_TESSFACTOR\n");
break;
case SVGA3D_DECLUSAGE_POSITIONT:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_POSITIONT\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_POSITIONT\n");
break;
case SVGA3D_DECLUSAGE_COLOR:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_COLOR\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_COLOR\n");
break;
case SVGA3D_DECLUSAGE_FOG:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_FOG\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_FOG\n");
break;
case SVGA3D_DECLUSAGE_DEPTH:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_DEPTH\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_DEPTH\n");
break;
case SVGA3D_DECLUSAGE_SAMPLE:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_SAMPLE\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_SAMPLE\n");
break;
case SVGA3D_DECLUSAGE_MAX:
- debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_MAX\n");
+ _debug_printf("\t\t.identity.usage = SVGA3D_DECLUSAGE_MAX\n");
break;
default:
- debug_printf("\t\t.identity.usage = %i\n", (*cmd).identity.usage);
+ _debug_printf("\t\t.identity.usage = %i\n", (*cmd).identity.usage);
break;
}
- debug_printf("\t\t.identity.usageIndex = %u\n", (*cmd).identity.usageIndex);
- debug_printf("\t\t.array.surfaceId = %u\n", (*cmd).array.surfaceId);
- debug_printf("\t\t.array.offset = %u\n", (*cmd).array.offset);
- debug_printf("\t\t.array.stride = %u\n", (*cmd).array.stride);
- debug_printf("\t\t.rangeHint.first = %u\n", (*cmd).rangeHint.first);
- debug_printf("\t\t.rangeHint.last = %u\n", (*cmd).rangeHint.last);
+ _debug_printf("\t\t.identity.usageIndex = %u\n", (*cmd).identity.usageIndex);
+ _debug_printf("\t\t.array.surfaceId = %u\n", (*cmd).array.surfaceId);
+ _debug_printf("\t\t.array.offset = %u\n", (*cmd).array.offset);
+ _debug_printf("\t\t.array.stride = %u\n", (*cmd).array.stride);
+ _debug_printf("\t\t.rangeHint.first = %u\n", (*cmd).rangeHint.first);
+ _debug_printf("\t\t.rangeHint.last = %u\n", (*cmd).rangeHint.last);
}
static void
dump_SVGA3dTextureState(const SVGA3dTextureState *cmd)
{
- debug_printf("\t\t.stage = %u\n", (*cmd).stage);
+ _debug_printf("\t\t.stage = %u\n", (*cmd).stage);
switch((*cmd).name) {
case SVGA3D_TS_INVALID:
- debug_printf("\t\t.name = SVGA3D_TS_INVALID\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_INVALID\n");
break;
case SVGA3D_TS_BIND_TEXTURE:
- debug_printf("\t\t.name = SVGA3D_TS_BIND_TEXTURE\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BIND_TEXTURE\n");
break;
case SVGA3D_TS_COLOROP:
- debug_printf("\t\t.name = SVGA3D_TS_COLOROP\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_COLOROP\n");
break;
case SVGA3D_TS_COLORARG1:
- debug_printf("\t\t.name = SVGA3D_TS_COLORARG1\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_COLORARG1\n");
break;
case SVGA3D_TS_COLORARG2:
- debug_printf("\t\t.name = SVGA3D_TS_COLORARG2\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_COLORARG2\n");
break;
case SVGA3D_TS_ALPHAOP:
- debug_printf("\t\t.name = SVGA3D_TS_ALPHAOP\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_ALPHAOP\n");
break;
case SVGA3D_TS_ALPHAARG1:
- debug_printf("\t\t.name = SVGA3D_TS_ALPHAARG1\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_ALPHAARG1\n");
break;
case SVGA3D_TS_ALPHAARG2:
- debug_printf("\t\t.name = SVGA3D_TS_ALPHAARG2\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_ALPHAARG2\n");
break;
case SVGA3D_TS_ADDRESSU:
- debug_printf("\t\t.name = SVGA3D_TS_ADDRESSU\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_ADDRESSU\n");
break;
case SVGA3D_TS_ADDRESSV:
- debug_printf("\t\t.name = SVGA3D_TS_ADDRESSV\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_ADDRESSV\n");
break;
case SVGA3D_TS_MIPFILTER:
- debug_printf("\t\t.name = SVGA3D_TS_MIPFILTER\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_MIPFILTER\n");
break;
case SVGA3D_TS_MAGFILTER:
- debug_printf("\t\t.name = SVGA3D_TS_MAGFILTER\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_MAGFILTER\n");
break;
case SVGA3D_TS_MINFILTER:
- debug_printf("\t\t.name = SVGA3D_TS_MINFILTER\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_MINFILTER\n");
break;
case SVGA3D_TS_BORDERCOLOR:
- debug_printf("\t\t.name = SVGA3D_TS_BORDERCOLOR\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BORDERCOLOR\n");
break;
case SVGA3D_TS_TEXCOORDINDEX:
- debug_printf("\t\t.name = SVGA3D_TS_TEXCOORDINDEX\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_TEXCOORDINDEX\n");
break;
case SVGA3D_TS_TEXTURETRANSFORMFLAGS:
- debug_printf("\t\t.name = SVGA3D_TS_TEXTURETRANSFORMFLAGS\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_TEXTURETRANSFORMFLAGS\n");
break;
case SVGA3D_TS_TEXCOORDGEN:
- debug_printf("\t\t.name = SVGA3D_TS_TEXCOORDGEN\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_TEXCOORDGEN\n");
break;
case SVGA3D_TS_BUMPENVMAT00:
- debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT00\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT00\n");
break;
case SVGA3D_TS_BUMPENVMAT01:
- debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT01\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT01\n");
break;
case SVGA3D_TS_BUMPENVMAT10:
- debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT10\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT10\n");
break;
case SVGA3D_TS_BUMPENVMAT11:
- debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT11\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BUMPENVMAT11\n");
break;
case SVGA3D_TS_TEXTURE_MIPMAP_LEVEL:
- debug_printf("\t\t.name = SVGA3D_TS_TEXTURE_MIPMAP_LEVEL\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_TEXTURE_MIPMAP_LEVEL\n");
break;
case SVGA3D_TS_TEXTURE_LOD_BIAS:
- debug_printf("\t\t.name = SVGA3D_TS_TEXTURE_LOD_BIAS\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_TEXTURE_LOD_BIAS\n");
break;
case SVGA3D_TS_TEXTURE_ANISOTROPIC_LEVEL:
- debug_printf("\t\t.name = SVGA3D_TS_TEXTURE_ANISOTROPIC_LEVEL\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_TEXTURE_ANISOTROPIC_LEVEL\n");
break;
case SVGA3D_TS_ADDRESSW:
- debug_printf("\t\t.name = SVGA3D_TS_ADDRESSW\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_ADDRESSW\n");
break;
case SVGA3D_TS_GAMMA:
- debug_printf("\t\t.name = SVGA3D_TS_GAMMA\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_GAMMA\n");
break;
case SVGA3D_TS_BUMPENVLSCALE:
- debug_printf("\t\t.name = SVGA3D_TS_BUMPENVLSCALE\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BUMPENVLSCALE\n");
break;
case SVGA3D_TS_BUMPENVLOFFSET:
- debug_printf("\t\t.name = SVGA3D_TS_BUMPENVLOFFSET\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_BUMPENVLOFFSET\n");
break;
case SVGA3D_TS_COLORARG0:
- debug_printf("\t\t.name = SVGA3D_TS_COLORARG0\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_COLORARG0\n");
break;
case SVGA3D_TS_ALPHAARG0:
- debug_printf("\t\t.name = SVGA3D_TS_ALPHAARG0\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_ALPHAARG0\n");
break;
case SVGA3D_TS_MAX:
- debug_printf("\t\t.name = SVGA3D_TS_MAX\n");
+ _debug_printf("\t\t.name = SVGA3D_TS_MAX\n");
break;
default:
- debug_printf("\t\t.name = %i\n", (*cmd).name);
+ _debug_printf("\t\t.name = %i\n", (*cmd).name);
break;
}
- debug_printf("\t\t.value = %u\n", (*cmd).value);
- debug_printf("\t\t.floatValue = %f\n", (*cmd).floatValue);
+ _debug_printf("\t\t.value = %u\n", (*cmd).value);
+ _debug_printf("\t\t.floatValue = %f\n", (*cmd).floatValue);
}
static void
dump_SVGA3dCopyBox(const SVGA3dCopyBox *cmd)
{
- debug_printf("\t\t.x = %u\n", (*cmd).x);
- debug_printf("\t\t.y = %u\n", (*cmd).y);
- debug_printf("\t\t.z = %u\n", (*cmd).z);
- debug_printf("\t\t.w = %u\n", (*cmd).w);
- debug_printf("\t\t.h = %u\n", (*cmd).h);
- debug_printf("\t\t.d = %u\n", (*cmd).d);
- debug_printf("\t\t.srcx = %u\n", (*cmd).srcx);
- debug_printf("\t\t.srcy = %u\n", (*cmd).srcy);
- debug_printf("\t\t.srcz = %u\n", (*cmd).srcz);
+ _debug_printf("\t\t.x = %u\n", (*cmd).x);
+ _debug_printf("\t\t.y = %u\n", (*cmd).y);
+ _debug_printf("\t\t.z = %u\n", (*cmd).z);
+ _debug_printf("\t\t.w = %u\n", (*cmd).w);
+ _debug_printf("\t\t.h = %u\n", (*cmd).h);
+ _debug_printf("\t\t.d = %u\n", (*cmd).d);
+ _debug_printf("\t\t.srcx = %u\n", (*cmd).srcx);
+ _debug_printf("\t\t.srcy = %u\n", (*cmd).srcy);
+ _debug_printf("\t\t.srcz = %u\n", (*cmd).srcz);
}
static void
dump_SVGA3dCmdSetClipPlane(const SVGA3dCmdSetClipPlane *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.index = %u\n", (*cmd).index);
- debug_printf("\t\t.plane[0] = %f\n", (*cmd).plane[0]);
- debug_printf("\t\t.plane[1] = %f\n", (*cmd).plane[1]);
- debug_printf("\t\t.plane[2] = %f\n", (*cmd).plane[2]);
- debug_printf("\t\t.plane[3] = %f\n", (*cmd).plane[3]);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.index = %u\n", (*cmd).index);
+ _debug_printf("\t\t.plane[0] = %f\n", (*cmd).plane[0]);
+ _debug_printf("\t\t.plane[1] = %f\n", (*cmd).plane[1]);
+ _debug_printf("\t\t.plane[2] = %f\n", (*cmd).plane[2]);
+ _debug_printf("\t\t.plane[3] = %f\n", (*cmd).plane[3]);
}
static void
dump_SVGA3dCmdWaitForQuery(const SVGA3dCmdWaitForQuery *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).type) {
case SVGA3D_QUERYTYPE_OCCLUSION:
- debug_printf("\t\t.type = SVGA3D_QUERYTYPE_OCCLUSION\n");
+ _debug_printf("\t\t.type = SVGA3D_QUERYTYPE_OCCLUSION\n");
break;
case SVGA3D_QUERYTYPE_MAX:
- debug_printf("\t\t.type = SVGA3D_QUERYTYPE_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_QUERYTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
- debug_printf("\t\t.guestResult.gmrId = %u\n", (*cmd).guestResult.gmrId);
- debug_printf("\t\t.guestResult.offset = %u\n", (*cmd).guestResult.offset);
+ _debug_printf("\t\t.guestResult.gmrId = %u\n", (*cmd).guestResult.gmrId);
+ _debug_printf("\t\t.guestResult.offset = %u\n", (*cmd).guestResult.offset);
}
static void
dump_SVGA3dCmdSetRenderTarget(const SVGA3dCmdSetRenderTarget *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).type) {
case SVGA3D_RT_DEPTH:
- debug_printf("\t\t.type = SVGA3D_RT_DEPTH\n");
+ _debug_printf("\t\t.type = SVGA3D_RT_DEPTH\n");
break;
case SVGA3D_RT_STENCIL:
- debug_printf("\t\t.type = SVGA3D_RT_STENCIL\n");
+ _debug_printf("\t\t.type = SVGA3D_RT_STENCIL\n");
break;
default:
- debug_printf("\t\t.type = SVGA3D_RT_COLOR%u\n", (*cmd).type - SVGA3D_RT_COLOR0);
+ _debug_printf("\t\t.type = SVGA3D_RT_COLOR%u\n", (*cmd).type - SVGA3D_RT_COLOR0);
break;
}
- debug_printf("\t\t.target.sid = %u\n", (*cmd).target.sid);
- debug_printf("\t\t.target.face = %u\n", (*cmd).target.face);
- debug_printf("\t\t.target.mipmap = %u\n", (*cmd).target.mipmap);
+ _debug_printf("\t\t.target.sid = %u\n", (*cmd).target.sid);
+ _debug_printf("\t\t.target.face = %u\n", (*cmd).target.face);
+ _debug_printf("\t\t.target.mipmap = %u\n", (*cmd).target.mipmap);
}
static void
dump_SVGA3dCmdSetTextureState(const SVGA3dCmdSetTextureState *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
}
static void
dump_SVGA3dCmdSurfaceCopy(const SVGA3dCmdSurfaceCopy *cmd)
{
- debug_printf("\t\t.src.sid = %u\n", (*cmd).src.sid);
- debug_printf("\t\t.src.face = %u\n", (*cmd).src.face);
- debug_printf("\t\t.src.mipmap = %u\n", (*cmd).src.mipmap);
- debug_printf("\t\t.dest.sid = %u\n", (*cmd).dest.sid);
- debug_printf("\t\t.dest.face = %u\n", (*cmd).dest.face);
- debug_printf("\t\t.dest.mipmap = %u\n", (*cmd).dest.mipmap);
+ _debug_printf("\t\t.src.sid = %u\n", (*cmd).src.sid);
+ _debug_printf("\t\t.src.face = %u\n", (*cmd).src.face);
+ _debug_printf("\t\t.src.mipmap = %u\n", (*cmd).src.mipmap);
+ _debug_printf("\t\t.dest.sid = %u\n", (*cmd).dest.sid);
+ _debug_printf("\t\t.dest.face = %u\n", (*cmd).dest.face);
+ _debug_printf("\t\t.dest.mipmap = %u\n", (*cmd).dest.mipmap);
}
static void
dump_SVGA3dCmdSetMaterial(const SVGA3dCmdSetMaterial *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).face) {
case SVGA3D_FACE_INVALID:
- debug_printf("\t\t.face = SVGA3D_FACE_INVALID\n");
+ _debug_printf("\t\t.face = SVGA3D_FACE_INVALID\n");
break;
case SVGA3D_FACE_NONE:
- debug_printf("\t\t.face = SVGA3D_FACE_NONE\n");
+ _debug_printf("\t\t.face = SVGA3D_FACE_NONE\n");
break;
case SVGA3D_FACE_FRONT:
- debug_printf("\t\t.face = SVGA3D_FACE_FRONT\n");
+ _debug_printf("\t\t.face = SVGA3D_FACE_FRONT\n");
break;
case SVGA3D_FACE_BACK:
- debug_printf("\t\t.face = SVGA3D_FACE_BACK\n");
+ _debug_printf("\t\t.face = SVGA3D_FACE_BACK\n");
break;
case SVGA3D_FACE_FRONT_BACK:
- debug_printf("\t\t.face = SVGA3D_FACE_FRONT_BACK\n");
+ _debug_printf("\t\t.face = SVGA3D_FACE_FRONT_BACK\n");
break;
case SVGA3D_FACE_MAX:
- debug_printf("\t\t.face = SVGA3D_FACE_MAX\n");
+ _debug_printf("\t\t.face = SVGA3D_FACE_MAX\n");
break;
default:
- debug_printf("\t\t.face = %i\n", (*cmd).face);
+ _debug_printf("\t\t.face = %i\n", (*cmd).face);
break;
}
- debug_printf("\t\t.material.diffuse[0] = %f\n", (*cmd).material.diffuse[0]);
- debug_printf("\t\t.material.diffuse[1] = %f\n", (*cmd).material.diffuse[1]);
- debug_printf("\t\t.material.diffuse[2] = %f\n", (*cmd).material.diffuse[2]);
- debug_printf("\t\t.material.diffuse[3] = %f\n", (*cmd).material.diffuse[3]);
- debug_printf("\t\t.material.ambient[0] = %f\n", (*cmd).material.ambient[0]);
- debug_printf("\t\t.material.ambient[1] = %f\n", (*cmd).material.ambient[1]);
- debug_printf("\t\t.material.ambient[2] = %f\n", (*cmd).material.ambient[2]);
- debug_printf("\t\t.material.ambient[3] = %f\n", (*cmd).material.ambient[3]);
- debug_printf("\t\t.material.specular[0] = %f\n", (*cmd).material.specular[0]);
- debug_printf("\t\t.material.specular[1] = %f\n", (*cmd).material.specular[1]);
- debug_printf("\t\t.material.specular[2] = %f\n", (*cmd).material.specular[2]);
- debug_printf("\t\t.material.specular[3] = %f\n", (*cmd).material.specular[3]);
- debug_printf("\t\t.material.emissive[0] = %f\n", (*cmd).material.emissive[0]);
- debug_printf("\t\t.material.emissive[1] = %f\n", (*cmd).material.emissive[1]);
- debug_printf("\t\t.material.emissive[2] = %f\n", (*cmd).material.emissive[2]);
- debug_printf("\t\t.material.emissive[3] = %f\n", (*cmd).material.emissive[3]);
- debug_printf("\t\t.material.shininess = %f\n", (*cmd).material.shininess);
+ _debug_printf("\t\t.material.diffuse[0] = %f\n", (*cmd).material.diffuse[0]);
+ _debug_printf("\t\t.material.diffuse[1] = %f\n", (*cmd).material.diffuse[1]);
+ _debug_printf("\t\t.material.diffuse[2] = %f\n", (*cmd).material.diffuse[2]);
+ _debug_printf("\t\t.material.diffuse[3] = %f\n", (*cmd).material.diffuse[3]);
+ _debug_printf("\t\t.material.ambient[0] = %f\n", (*cmd).material.ambient[0]);
+ _debug_printf("\t\t.material.ambient[1] = %f\n", (*cmd).material.ambient[1]);
+ _debug_printf("\t\t.material.ambient[2] = %f\n", (*cmd).material.ambient[2]);
+ _debug_printf("\t\t.material.ambient[3] = %f\n", (*cmd).material.ambient[3]);
+ _debug_printf("\t\t.material.specular[0] = %f\n", (*cmd).material.specular[0]);
+ _debug_printf("\t\t.material.specular[1] = %f\n", (*cmd).material.specular[1]);
+ _debug_printf("\t\t.material.specular[2] = %f\n", (*cmd).material.specular[2]);
+ _debug_printf("\t\t.material.specular[3] = %f\n", (*cmd).material.specular[3]);
+ _debug_printf("\t\t.material.emissive[0] = %f\n", (*cmd).material.emissive[0]);
+ _debug_printf("\t\t.material.emissive[1] = %f\n", (*cmd).material.emissive[1]);
+ _debug_printf("\t\t.material.emissive[2] = %f\n", (*cmd).material.emissive[2]);
+ _debug_printf("\t\t.material.emissive[3] = %f\n", (*cmd).material.emissive[3]);
+ _debug_printf("\t\t.material.shininess = %f\n", (*cmd).material.shininess);
}
static void
dump_SVGA3dCmdSetLightData(const SVGA3dCmdSetLightData *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.index = %u\n", (*cmd).index);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.index = %u\n", (*cmd).index);
switch((*cmd).data.type) {
case SVGA3D_LIGHTTYPE_INVALID:
- debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_INVALID\n");
+ _debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_INVALID\n");
break;
case SVGA3D_LIGHTTYPE_POINT:
- debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_POINT\n");
+ _debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_POINT\n");
break;
case SVGA3D_LIGHTTYPE_SPOT1:
- debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_SPOT1\n");
+ _debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_SPOT1\n");
break;
case SVGA3D_LIGHTTYPE_SPOT2:
- debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_SPOT2\n");
+ _debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_SPOT2\n");
break;
case SVGA3D_LIGHTTYPE_DIRECTIONAL:
- debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_DIRECTIONAL\n");
+ _debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_DIRECTIONAL\n");
break;
case SVGA3D_LIGHTTYPE_MAX:
- debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_MAX\n");
+ _debug_printf("\t\t.data.type = SVGA3D_LIGHTTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.data.type = %i\n", (*cmd).data.type);
+ _debug_printf("\t\t.data.type = %i\n", (*cmd).data.type);
break;
}
- debug_printf("\t\t.data.inWorldSpace = %u\n", (*cmd).data.inWorldSpace);
- debug_printf("\t\t.data.diffuse[0] = %f\n", (*cmd).data.diffuse[0]);
- debug_printf("\t\t.data.diffuse[1] = %f\n", (*cmd).data.diffuse[1]);
- debug_printf("\t\t.data.diffuse[2] = %f\n", (*cmd).data.diffuse[2]);
- debug_printf("\t\t.data.diffuse[3] = %f\n", (*cmd).data.diffuse[3]);
- debug_printf("\t\t.data.specular[0] = %f\n", (*cmd).data.specular[0]);
- debug_printf("\t\t.data.specular[1] = %f\n", (*cmd).data.specular[1]);
- debug_printf("\t\t.data.specular[2] = %f\n", (*cmd).data.specular[2]);
- debug_printf("\t\t.data.specular[3] = %f\n", (*cmd).data.specular[3]);
- debug_printf("\t\t.data.ambient[0] = %f\n", (*cmd).data.ambient[0]);
- debug_printf("\t\t.data.ambient[1] = %f\n", (*cmd).data.ambient[1]);
- debug_printf("\t\t.data.ambient[2] = %f\n", (*cmd).data.ambient[2]);
- debug_printf("\t\t.data.ambient[3] = %f\n", (*cmd).data.ambient[3]);
- debug_printf("\t\t.data.position[0] = %f\n", (*cmd).data.position[0]);
- debug_printf("\t\t.data.position[1] = %f\n", (*cmd).data.position[1]);
- debug_printf("\t\t.data.position[2] = %f\n", (*cmd).data.position[2]);
- debug_printf("\t\t.data.position[3] = %f\n", (*cmd).data.position[3]);
- debug_printf("\t\t.data.direction[0] = %f\n", (*cmd).data.direction[0]);
- debug_printf("\t\t.data.direction[1] = %f\n", (*cmd).data.direction[1]);
- debug_printf("\t\t.data.direction[2] = %f\n", (*cmd).data.direction[2]);
- debug_printf("\t\t.data.direction[3] = %f\n", (*cmd).data.direction[3]);
- debug_printf("\t\t.data.range = %f\n", (*cmd).data.range);
- debug_printf("\t\t.data.falloff = %f\n", (*cmd).data.falloff);
- debug_printf("\t\t.data.attenuation0 = %f\n", (*cmd).data.attenuation0);
- debug_printf("\t\t.data.attenuation1 = %f\n", (*cmd).data.attenuation1);
- debug_printf("\t\t.data.attenuation2 = %f\n", (*cmd).data.attenuation2);
- debug_printf("\t\t.data.theta = %f\n", (*cmd).data.theta);
- debug_printf("\t\t.data.phi = %f\n", (*cmd).data.phi);
+ _debug_printf("\t\t.data.inWorldSpace = %u\n", (*cmd).data.inWorldSpace);
+ _debug_printf("\t\t.data.diffuse[0] = %f\n", (*cmd).data.diffuse[0]);
+ _debug_printf("\t\t.data.diffuse[1] = %f\n", (*cmd).data.diffuse[1]);
+ _debug_printf("\t\t.data.diffuse[2] = %f\n", (*cmd).data.diffuse[2]);
+ _debug_printf("\t\t.data.diffuse[3] = %f\n", (*cmd).data.diffuse[3]);
+ _debug_printf("\t\t.data.specular[0] = %f\n", (*cmd).data.specular[0]);
+ _debug_printf("\t\t.data.specular[1] = %f\n", (*cmd).data.specular[1]);
+ _debug_printf("\t\t.data.specular[2] = %f\n", (*cmd).data.specular[2]);
+ _debug_printf("\t\t.data.specular[3] = %f\n", (*cmd).data.specular[3]);
+ _debug_printf("\t\t.data.ambient[0] = %f\n", (*cmd).data.ambient[0]);
+ _debug_printf("\t\t.data.ambient[1] = %f\n", (*cmd).data.ambient[1]);
+ _debug_printf("\t\t.data.ambient[2] = %f\n", (*cmd).data.ambient[2]);
+ _debug_printf("\t\t.data.ambient[3] = %f\n", (*cmd).data.ambient[3]);
+ _debug_printf("\t\t.data.position[0] = %f\n", (*cmd).data.position[0]);
+ _debug_printf("\t\t.data.position[1] = %f\n", (*cmd).data.position[1]);
+ _debug_printf("\t\t.data.position[2] = %f\n", (*cmd).data.position[2]);
+ _debug_printf("\t\t.data.position[3] = %f\n", (*cmd).data.position[3]);
+ _debug_printf("\t\t.data.direction[0] = %f\n", (*cmd).data.direction[0]);
+ _debug_printf("\t\t.data.direction[1] = %f\n", (*cmd).data.direction[1]);
+ _debug_printf("\t\t.data.direction[2] = %f\n", (*cmd).data.direction[2]);
+ _debug_printf("\t\t.data.direction[3] = %f\n", (*cmd).data.direction[3]);
+ _debug_printf("\t\t.data.range = %f\n", (*cmd).data.range);
+ _debug_printf("\t\t.data.falloff = %f\n", (*cmd).data.falloff);
+ _debug_printf("\t\t.data.attenuation0 = %f\n", (*cmd).data.attenuation0);
+ _debug_printf("\t\t.data.attenuation1 = %f\n", (*cmd).data.attenuation1);
+ _debug_printf("\t\t.data.attenuation2 = %f\n", (*cmd).data.attenuation2);
+ _debug_printf("\t\t.data.theta = %f\n", (*cmd).data.theta);
+ _debug_printf("\t\t.data.phi = %f\n", (*cmd).data.phi);
}
static void
dump_SVGA3dCmdSetViewport(const SVGA3dCmdSetViewport *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.rect.x = %u\n", (*cmd).rect.x);
- debug_printf("\t\t.rect.y = %u\n", (*cmd).rect.y);
- debug_printf("\t\t.rect.w = %u\n", (*cmd).rect.w);
- debug_printf("\t\t.rect.h = %u\n", (*cmd).rect.h);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.rect.x = %u\n", (*cmd).rect.x);
+ _debug_printf("\t\t.rect.y = %u\n", (*cmd).rect.y);
+ _debug_printf("\t\t.rect.w = %u\n", (*cmd).rect.w);
+ _debug_printf("\t\t.rect.h = %u\n", (*cmd).rect.h);
}
static void
dump_SVGA3dCmdSetScissorRect(const SVGA3dCmdSetScissorRect *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.rect.x = %u\n", (*cmd).rect.x);
- debug_printf("\t\t.rect.y = %u\n", (*cmd).rect.y);
- debug_printf("\t\t.rect.w = %u\n", (*cmd).rect.w);
- debug_printf("\t\t.rect.h = %u\n", (*cmd).rect.h);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.rect.x = %u\n", (*cmd).rect.x);
+ _debug_printf("\t\t.rect.y = %u\n", (*cmd).rect.y);
+ _debug_printf("\t\t.rect.w = %u\n", (*cmd).rect.w);
+ _debug_printf("\t\t.rect.h = %u\n", (*cmd).rect.h);
}
static void
dump_SVGA3dCopyRect(const SVGA3dCopyRect *cmd)
{
- debug_printf("\t\t.x = %u\n", (*cmd).x);
- debug_printf("\t\t.y = %u\n", (*cmd).y);
- debug_printf("\t\t.w = %u\n", (*cmd).w);
- debug_printf("\t\t.h = %u\n", (*cmd).h);
- debug_printf("\t\t.srcx = %u\n", (*cmd).srcx);
- debug_printf("\t\t.srcy = %u\n", (*cmd).srcy);
+ _debug_printf("\t\t.x = %u\n", (*cmd).x);
+ _debug_printf("\t\t.y = %u\n", (*cmd).y);
+ _debug_printf("\t\t.w = %u\n", (*cmd).w);
+ _debug_printf("\t\t.h = %u\n", (*cmd).h);
+ _debug_printf("\t\t.srcx = %u\n", (*cmd).srcx);
+ _debug_printf("\t\t.srcy = %u\n", (*cmd).srcy);
}
static void
dump_SVGA3dCmdSetShader(const SVGA3dCmdSetShader *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).type) {
case SVGA3D_SHADERTYPE_COMPILED_DX8:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
break;
case SVGA3D_SHADERTYPE_VS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
break;
case SVGA3D_SHADERTYPE_PS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
break;
case SVGA3D_SHADERTYPE_MAX:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
- debug_printf("\t\t.shid = %u\n", (*cmd).shid);
+ _debug_printf("\t\t.shid = %u\n", (*cmd).shid);
}
static void
dump_SVGA3dCmdEndQuery(const SVGA3dCmdEndQuery *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).type) {
case SVGA3D_QUERYTYPE_OCCLUSION:
- debug_printf("\t\t.type = SVGA3D_QUERYTYPE_OCCLUSION\n");
+ _debug_printf("\t\t.type = SVGA3D_QUERYTYPE_OCCLUSION\n");
break;
case SVGA3D_QUERYTYPE_MAX:
- debug_printf("\t\t.type = SVGA3D_QUERYTYPE_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_QUERYTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
- debug_printf("\t\t.guestResult.gmrId = %u\n", (*cmd).guestResult.gmrId);
- debug_printf("\t\t.guestResult.offset = %u\n", (*cmd).guestResult.offset);
+ _debug_printf("\t\t.guestResult.gmrId = %u\n", (*cmd).guestResult.gmrId);
+ _debug_printf("\t\t.guestResult.offset = %u\n", (*cmd).guestResult.offset);
}
static void
dump_SVGA3dSize(const SVGA3dSize *cmd)
{
- debug_printf("\t\t.width = %u\n", (*cmd).width);
- debug_printf("\t\t.height = %u\n", (*cmd).height);
- debug_printf("\t\t.depth = %u\n", (*cmd).depth);
+ _debug_printf("\t\t.width = %u\n", (*cmd).width);
+ _debug_printf("\t\t.height = %u\n", (*cmd).height);
+ _debug_printf("\t\t.depth = %u\n", (*cmd).depth);
}
static void
dump_SVGA3dCmdDestroySurface(const SVGA3dCmdDestroySurface *cmd)
{
- debug_printf("\t\t.sid = %u\n", (*cmd).sid);
+ _debug_printf("\t\t.sid = %u\n", (*cmd).sid);
}
static void
dump_SVGA3dCmdDefineContext(const SVGA3dCmdDefineContext *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
}
static void
dump_SVGA3dRect(const SVGA3dRect *cmd)
{
- debug_printf("\t\t.x = %u\n", (*cmd).x);
- debug_printf("\t\t.y = %u\n", (*cmd).y);
- debug_printf("\t\t.w = %u\n", (*cmd).w);
- debug_printf("\t\t.h = %u\n", (*cmd).h);
+ _debug_printf("\t\t.x = %u\n", (*cmd).x);
+ _debug_printf("\t\t.y = %u\n", (*cmd).y);
+ _debug_printf("\t\t.w = %u\n", (*cmd).w);
+ _debug_printf("\t\t.h = %u\n", (*cmd).h);
}
static void
dump_SVGA3dCmdBeginQuery(const SVGA3dCmdBeginQuery *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).type) {
case SVGA3D_QUERYTYPE_OCCLUSION:
- debug_printf("\t\t.type = SVGA3D_QUERYTYPE_OCCLUSION\n");
+ _debug_printf("\t\t.type = SVGA3D_QUERYTYPE_OCCLUSION\n");
break;
case SVGA3D_QUERYTYPE_MAX:
- debug_printf("\t\t.type = SVGA3D_QUERYTYPE_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_QUERYTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
}
@@ -599,336 +599,336 @@ dump_SVGA3dRenderState(const SVGA3dRenderState *cmd)
{
switch((*cmd).state) {
case SVGA3D_RS_INVALID:
- debug_printf("\t\t.state = SVGA3D_RS_INVALID\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_INVALID\n");
break;
case SVGA3D_RS_ZENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_ZENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ZENABLE\n");
break;
case SVGA3D_RS_ZWRITEENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_ZWRITEENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ZWRITEENABLE\n");
break;
case SVGA3D_RS_ALPHATESTENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_ALPHATESTENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ALPHATESTENABLE\n");
break;
case SVGA3D_RS_DITHERENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_DITHERENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_DITHERENABLE\n");
break;
case SVGA3D_RS_BLENDENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_BLENDENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_BLENDENABLE\n");
break;
case SVGA3D_RS_FOGENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_FOGENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FOGENABLE\n");
break;
case SVGA3D_RS_SPECULARENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_SPECULARENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SPECULARENABLE\n");
break;
case SVGA3D_RS_STENCILENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILENABLE\n");
break;
case SVGA3D_RS_LIGHTINGENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_LIGHTINGENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_LIGHTINGENABLE\n");
break;
case SVGA3D_RS_NORMALIZENORMALS:
- debug_printf("\t\t.state = SVGA3D_RS_NORMALIZENORMALS\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_NORMALIZENORMALS\n");
break;
case SVGA3D_RS_POINTSPRITEENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSPRITEENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSPRITEENABLE\n");
break;
case SVGA3D_RS_POINTSCALEENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSCALEENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSCALEENABLE\n");
break;
case SVGA3D_RS_STENCILREF:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILREF\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILREF\n");
break;
case SVGA3D_RS_STENCILMASK:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILMASK\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILMASK\n");
break;
case SVGA3D_RS_STENCILWRITEMASK:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILWRITEMASK\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILWRITEMASK\n");
break;
case SVGA3D_RS_FOGSTART:
- debug_printf("\t\t.state = SVGA3D_RS_FOGSTART\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FOGSTART\n");
break;
case SVGA3D_RS_FOGEND:
- debug_printf("\t\t.state = SVGA3D_RS_FOGEND\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FOGEND\n");
break;
case SVGA3D_RS_FOGDENSITY:
- debug_printf("\t\t.state = SVGA3D_RS_FOGDENSITY\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FOGDENSITY\n");
break;
case SVGA3D_RS_POINTSIZE:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSIZE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSIZE\n");
break;
case SVGA3D_RS_POINTSIZEMIN:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSIZEMIN\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSIZEMIN\n");
break;
case SVGA3D_RS_POINTSIZEMAX:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSIZEMAX\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSIZEMAX\n");
break;
case SVGA3D_RS_POINTSCALE_A:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSCALE_A\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSCALE_A\n");
break;
case SVGA3D_RS_POINTSCALE_B:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSCALE_B\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSCALE_B\n");
break;
case SVGA3D_RS_POINTSCALE_C:
- debug_printf("\t\t.state = SVGA3D_RS_POINTSCALE_C\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_POINTSCALE_C\n");
break;
case SVGA3D_RS_FOGCOLOR:
- debug_printf("\t\t.state = SVGA3D_RS_FOGCOLOR\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FOGCOLOR\n");
break;
case SVGA3D_RS_AMBIENT:
- debug_printf("\t\t.state = SVGA3D_RS_AMBIENT\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_AMBIENT\n");
break;
case SVGA3D_RS_CLIPPLANEENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_CLIPPLANEENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_CLIPPLANEENABLE\n");
break;
case SVGA3D_RS_FOGMODE:
- debug_printf("\t\t.state = SVGA3D_RS_FOGMODE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FOGMODE\n");
break;
case SVGA3D_RS_FILLMODE:
- debug_printf("\t\t.state = SVGA3D_RS_FILLMODE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FILLMODE\n");
break;
case SVGA3D_RS_SHADEMODE:
- debug_printf("\t\t.state = SVGA3D_RS_SHADEMODE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SHADEMODE\n");
break;
case SVGA3D_RS_LINEPATTERN:
- debug_printf("\t\t.state = SVGA3D_RS_LINEPATTERN\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_LINEPATTERN\n");
break;
case SVGA3D_RS_SRCBLEND:
- debug_printf("\t\t.state = SVGA3D_RS_SRCBLEND\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SRCBLEND\n");
break;
case SVGA3D_RS_DSTBLEND:
- debug_printf("\t\t.state = SVGA3D_RS_DSTBLEND\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_DSTBLEND\n");
break;
case SVGA3D_RS_BLENDEQUATION:
- debug_printf("\t\t.state = SVGA3D_RS_BLENDEQUATION\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_BLENDEQUATION\n");
break;
case SVGA3D_RS_CULLMODE:
- debug_printf("\t\t.state = SVGA3D_RS_CULLMODE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_CULLMODE\n");
break;
case SVGA3D_RS_ZFUNC:
- debug_printf("\t\t.state = SVGA3D_RS_ZFUNC\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ZFUNC\n");
break;
case SVGA3D_RS_ALPHAFUNC:
- debug_printf("\t\t.state = SVGA3D_RS_ALPHAFUNC\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ALPHAFUNC\n");
break;
case SVGA3D_RS_STENCILFUNC:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILFUNC\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILFUNC\n");
break;
case SVGA3D_RS_STENCILFAIL:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILFAIL\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILFAIL\n");
break;
case SVGA3D_RS_STENCILZFAIL:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILZFAIL\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILZFAIL\n");
break;
case SVGA3D_RS_STENCILPASS:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILPASS\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILPASS\n");
break;
case SVGA3D_RS_ALPHAREF:
- debug_printf("\t\t.state = SVGA3D_RS_ALPHAREF\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ALPHAREF\n");
break;
case SVGA3D_RS_FRONTWINDING:
- debug_printf("\t\t.state = SVGA3D_RS_FRONTWINDING\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_FRONTWINDING\n");
break;
case SVGA3D_RS_COORDINATETYPE:
- debug_printf("\t\t.state = SVGA3D_RS_COORDINATETYPE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_COORDINATETYPE\n");
break;
case SVGA3D_RS_ZBIAS:
- debug_printf("\t\t.state = SVGA3D_RS_ZBIAS\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ZBIAS\n");
break;
case SVGA3D_RS_RANGEFOGENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_RANGEFOGENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_RANGEFOGENABLE\n");
break;
case SVGA3D_RS_COLORWRITEENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE\n");
break;
case SVGA3D_RS_VERTEXMATERIALENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_VERTEXMATERIALENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_VERTEXMATERIALENABLE\n");
break;
case SVGA3D_RS_DIFFUSEMATERIALSOURCE:
- debug_printf("\t\t.state = SVGA3D_RS_DIFFUSEMATERIALSOURCE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_DIFFUSEMATERIALSOURCE\n");
break;
case SVGA3D_RS_SPECULARMATERIALSOURCE:
- debug_printf("\t\t.state = SVGA3D_RS_SPECULARMATERIALSOURCE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SPECULARMATERIALSOURCE\n");
break;
case SVGA3D_RS_AMBIENTMATERIALSOURCE:
- debug_printf("\t\t.state = SVGA3D_RS_AMBIENTMATERIALSOURCE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_AMBIENTMATERIALSOURCE\n");
break;
case SVGA3D_RS_EMISSIVEMATERIALSOURCE:
- debug_printf("\t\t.state = SVGA3D_RS_EMISSIVEMATERIALSOURCE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_EMISSIVEMATERIALSOURCE\n");
break;
case SVGA3D_RS_TEXTUREFACTOR:
- debug_printf("\t\t.state = SVGA3D_RS_TEXTUREFACTOR\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_TEXTUREFACTOR\n");
break;
case SVGA3D_RS_LOCALVIEWER:
- debug_printf("\t\t.state = SVGA3D_RS_LOCALVIEWER\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_LOCALVIEWER\n");
break;
case SVGA3D_RS_SCISSORTESTENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_SCISSORTESTENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SCISSORTESTENABLE\n");
break;
case SVGA3D_RS_BLENDCOLOR:
- debug_printf("\t\t.state = SVGA3D_RS_BLENDCOLOR\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_BLENDCOLOR\n");
break;
case SVGA3D_RS_STENCILENABLE2SIDED:
- debug_printf("\t\t.state = SVGA3D_RS_STENCILENABLE2SIDED\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_STENCILENABLE2SIDED\n");
break;
case SVGA3D_RS_CCWSTENCILFUNC:
- debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILFUNC\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILFUNC\n");
break;
case SVGA3D_RS_CCWSTENCILFAIL:
- debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILFAIL\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILFAIL\n");
break;
case SVGA3D_RS_CCWSTENCILZFAIL:
- debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILZFAIL\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILZFAIL\n");
break;
case SVGA3D_RS_CCWSTENCILPASS:
- debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILPASS\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_CCWSTENCILPASS\n");
break;
case SVGA3D_RS_VERTEXBLEND:
- debug_printf("\t\t.state = SVGA3D_RS_VERTEXBLEND\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_VERTEXBLEND\n");
break;
case SVGA3D_RS_SLOPESCALEDEPTHBIAS:
- debug_printf("\t\t.state = SVGA3D_RS_SLOPESCALEDEPTHBIAS\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SLOPESCALEDEPTHBIAS\n");
break;
case SVGA3D_RS_DEPTHBIAS:
- debug_printf("\t\t.state = SVGA3D_RS_DEPTHBIAS\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_DEPTHBIAS\n");
break;
case SVGA3D_RS_OUTPUTGAMMA:
- debug_printf("\t\t.state = SVGA3D_RS_OUTPUTGAMMA\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_OUTPUTGAMMA\n");
break;
case SVGA3D_RS_ZVISIBLE:
- debug_printf("\t\t.state = SVGA3D_RS_ZVISIBLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ZVISIBLE\n");
break;
case SVGA3D_RS_LASTPIXEL:
- debug_printf("\t\t.state = SVGA3D_RS_LASTPIXEL\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_LASTPIXEL\n");
break;
case SVGA3D_RS_CLIPPING:
- debug_printf("\t\t.state = SVGA3D_RS_CLIPPING\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_CLIPPING\n");
break;
case SVGA3D_RS_WRAP0:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP0\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP0\n");
break;
case SVGA3D_RS_WRAP1:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP1\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP1\n");
break;
case SVGA3D_RS_WRAP2:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP2\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP2\n");
break;
case SVGA3D_RS_WRAP3:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP3\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP3\n");
break;
case SVGA3D_RS_WRAP4:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP4\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP4\n");
break;
case SVGA3D_RS_WRAP5:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP5\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP5\n");
break;
case SVGA3D_RS_WRAP6:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP6\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP6\n");
break;
case SVGA3D_RS_WRAP7:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP7\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP7\n");
break;
case SVGA3D_RS_WRAP8:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP8\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP8\n");
break;
case SVGA3D_RS_WRAP9:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP9\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP9\n");
break;
case SVGA3D_RS_WRAP10:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP10\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP10\n");
break;
case SVGA3D_RS_WRAP11:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP11\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP11\n");
break;
case SVGA3D_RS_WRAP12:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP12\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP12\n");
break;
case SVGA3D_RS_WRAP13:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP13\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP13\n");
break;
case SVGA3D_RS_WRAP14:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP14\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP14\n");
break;
case SVGA3D_RS_WRAP15:
- debug_printf("\t\t.state = SVGA3D_RS_WRAP15\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_WRAP15\n");
break;
case SVGA3D_RS_MULTISAMPLEANTIALIAS:
- debug_printf("\t\t.state = SVGA3D_RS_MULTISAMPLEANTIALIAS\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_MULTISAMPLEANTIALIAS\n");
break;
case SVGA3D_RS_MULTISAMPLEMASK:
- debug_printf("\t\t.state = SVGA3D_RS_MULTISAMPLEMASK\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_MULTISAMPLEMASK\n");
break;
case SVGA3D_RS_INDEXEDVERTEXBLENDENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_INDEXEDVERTEXBLENDENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_INDEXEDVERTEXBLENDENABLE\n");
break;
case SVGA3D_RS_TWEENFACTOR:
- debug_printf("\t\t.state = SVGA3D_RS_TWEENFACTOR\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_TWEENFACTOR\n");
break;
case SVGA3D_RS_ANTIALIASEDLINEENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_ANTIALIASEDLINEENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_ANTIALIASEDLINEENABLE\n");
break;
case SVGA3D_RS_COLORWRITEENABLE1:
- debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE1\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE1\n");
break;
case SVGA3D_RS_COLORWRITEENABLE2:
- debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE2\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE2\n");
break;
case SVGA3D_RS_COLORWRITEENABLE3:
- debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE3\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_COLORWRITEENABLE3\n");
break;
case SVGA3D_RS_SEPARATEALPHABLENDENABLE:
- debug_printf("\t\t.state = SVGA3D_RS_SEPARATEALPHABLENDENABLE\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SEPARATEALPHABLENDENABLE\n");
break;
case SVGA3D_RS_SRCBLENDALPHA:
- debug_printf("\t\t.state = SVGA3D_RS_SRCBLENDALPHA\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_SRCBLENDALPHA\n");
break;
case SVGA3D_RS_DSTBLENDALPHA:
- debug_printf("\t\t.state = SVGA3D_RS_DSTBLENDALPHA\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_DSTBLENDALPHA\n");
break;
case SVGA3D_RS_BLENDEQUATIONALPHA:
- debug_printf("\t\t.state = SVGA3D_RS_BLENDEQUATIONALPHA\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_BLENDEQUATIONALPHA\n");
break;
case SVGA3D_RS_MAX:
- debug_printf("\t\t.state = SVGA3D_RS_MAX\n");
+ _debug_printf("\t\t.state = SVGA3D_RS_MAX\n");
break;
default:
- debug_printf("\t\t.state = %i\n", (*cmd).state);
+ _debug_printf("\t\t.state = %i\n", (*cmd).state);
break;
}
- debug_printf("\t\t.uintValue = %u\n", (*cmd).uintValue);
- debug_printf("\t\t.floatValue = %f\n", (*cmd).floatValue);
+ _debug_printf("\t\t.uintValue = %u\n", (*cmd).uintValue);
+ _debug_printf("\t\t.floatValue = %f\n", (*cmd).floatValue);
}
static void
dump_SVGA3dVertexDivisor(const SVGA3dVertexDivisor *cmd)
{
- debug_printf("\t\t.value = %u\n", (*cmd).value);
- debug_printf("\t\t.count = %u\n", (*cmd).count);
- debug_printf("\t\t.indexedData = %u\n", (*cmd).indexedData);
- debug_printf("\t\t.instanceData = %u\n", (*cmd).instanceData);
+ _debug_printf("\t\t.value = %u\n", (*cmd).value);
+ _debug_printf("\t\t.count = %u\n", (*cmd).count);
+ _debug_printf("\t\t.indexedData = %u\n", (*cmd).indexedData);
+ _debug_printf("\t\t.instanceData = %u\n", (*cmd).instanceData);
}
static void
dump_SVGA3dCmdDefineShader(const SVGA3dCmdDefineShader *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.shid = %u\n", (*cmd).shid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.shid = %u\n", (*cmd).shid);
switch((*cmd).type) {
case SVGA3D_SHADERTYPE_COMPILED_DX8:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
break;
case SVGA3D_SHADERTYPE_VS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
break;
case SVGA3D_SHADERTYPE_PS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
break;
case SVGA3D_SHADERTYPE_MAX:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
}
@@ -936,53 +936,53 @@ dump_SVGA3dCmdDefineShader(const SVGA3dCmdDefineShader *cmd)
static void
dump_SVGA3dCmdSetShaderConst(const SVGA3dCmdSetShaderConst *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.reg = %u\n", (*cmd).reg);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.reg = %u\n", (*cmd).reg);
switch((*cmd).type) {
case SVGA3D_SHADERTYPE_COMPILED_DX8:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
break;
case SVGA3D_SHADERTYPE_VS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
break;
case SVGA3D_SHADERTYPE_PS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
break;
case SVGA3D_SHADERTYPE_MAX:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
switch((*cmd).ctype) {
case SVGA3D_CONST_TYPE_FLOAT:
- debug_printf("\t\t.ctype = SVGA3D_CONST_TYPE_FLOAT\n");
- debug_printf("\t\t.values[0] = %f\n", *(const float *)&(*cmd).values[0]);
- debug_printf("\t\t.values[1] = %f\n", *(const float *)&(*cmd).values[1]);
- debug_printf("\t\t.values[2] = %f\n", *(const float *)&(*cmd).values[2]);
- debug_printf("\t\t.values[3] = %f\n", *(const float *)&(*cmd).values[3]);
+ _debug_printf("\t\t.ctype = SVGA3D_CONST_TYPE_FLOAT\n");
+ _debug_printf("\t\t.values[0] = %f\n", *(const float *)&(*cmd).values[0]);
+ _debug_printf("\t\t.values[1] = %f\n", *(const float *)&(*cmd).values[1]);
+ _debug_printf("\t\t.values[2] = %f\n", *(const float *)&(*cmd).values[2]);
+ _debug_printf("\t\t.values[3] = %f\n", *(const float *)&(*cmd).values[3]);
break;
case SVGA3D_CONST_TYPE_INT:
- debug_printf("\t\t.ctype = SVGA3D_CONST_TYPE_INT\n");
- debug_printf("\t\t.values[0] = %u\n", (*cmd).values[0]);
- debug_printf("\t\t.values[1] = %u\n", (*cmd).values[1]);
- debug_printf("\t\t.values[2] = %u\n", (*cmd).values[2]);
- debug_printf("\t\t.values[3] = %u\n", (*cmd).values[3]);
+ _debug_printf("\t\t.ctype = SVGA3D_CONST_TYPE_INT\n");
+ _debug_printf("\t\t.values[0] = %u\n", (*cmd).values[0]);
+ _debug_printf("\t\t.values[1] = %u\n", (*cmd).values[1]);
+ _debug_printf("\t\t.values[2] = %u\n", (*cmd).values[2]);
+ _debug_printf("\t\t.values[3] = %u\n", (*cmd).values[3]);
break;
case SVGA3D_CONST_TYPE_BOOL:
- debug_printf("\t\t.ctype = SVGA3D_CONST_TYPE_BOOL\n");
- debug_printf("\t\t.values[0] = %u\n", (*cmd).values[0]);
- debug_printf("\t\t.values[1] = %u\n", (*cmd).values[1]);
- debug_printf("\t\t.values[2] = %u\n", (*cmd).values[2]);
- debug_printf("\t\t.values[3] = %u\n", (*cmd).values[3]);
+ _debug_printf("\t\t.ctype = SVGA3D_CONST_TYPE_BOOL\n");
+ _debug_printf("\t\t.values[0] = %u\n", (*cmd).values[0]);
+ _debug_printf("\t\t.values[1] = %u\n", (*cmd).values[1]);
+ _debug_printf("\t\t.values[2] = %u\n", (*cmd).values[2]);
+ _debug_printf("\t\t.values[3] = %u\n", (*cmd).values[3]);
break;
default:
- debug_printf("\t\t.ctype = %i\n", (*cmd).ctype);
- debug_printf("\t\t.values[0] = %u\n", (*cmd).values[0]);
- debug_printf("\t\t.values[1] = %u\n", (*cmd).values[1]);
- debug_printf("\t\t.values[2] = %u\n", (*cmd).values[2]);
- debug_printf("\t\t.values[3] = %u\n", (*cmd).values[3]);
+ _debug_printf("\t\t.ctype = %i\n", (*cmd).ctype);
+ _debug_printf("\t\t.values[0] = %u\n", (*cmd).values[0]);
+ _debug_printf("\t\t.values[1] = %u\n", (*cmd).values[1]);
+ _debug_printf("\t\t.values[2] = %u\n", (*cmd).values[2]);
+ _debug_printf("\t\t.values[3] = %u\n", (*cmd).values[3]);
break;
}
}
@@ -990,25 +990,25 @@ dump_SVGA3dCmdSetShaderConst(const SVGA3dCmdSetShaderConst *cmd)
static void
dump_SVGA3dCmdSetZRange(const SVGA3dCmdSetZRange *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.zRange.min = %f\n", (*cmd).zRange.min);
- debug_printf("\t\t.zRange.max = %f\n", (*cmd).zRange.max);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.zRange.min = %f\n", (*cmd).zRange.min);
+ _debug_printf("\t\t.zRange.max = %f\n", (*cmd).zRange.max);
}
static void
dump_SVGA3dCmdDrawPrimitives(const SVGA3dCmdDrawPrimitives *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.numVertexDecls = %u\n", (*cmd).numVertexDecls);
- debug_printf("\t\t.numRanges = %u\n", (*cmd).numRanges);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.numVertexDecls = %u\n", (*cmd).numVertexDecls);
+ _debug_printf("\t\t.numRanges = %u\n", (*cmd).numRanges);
}
static void
dump_SVGA3dCmdSetLightEnabled(const SVGA3dCmdSetLightEnabled *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.index = %u\n", (*cmd).index);
- debug_printf("\t\t.enabled = %u\n", (*cmd).enabled);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.index = %u\n", (*cmd).index);
+ _debug_printf("\t\t.enabled = %u\n", (*cmd).enabled);
}
static void
@@ -1016,86 +1016,86 @@ dump_SVGA3dPrimitiveRange(const SVGA3dPrimitiveRange *cmd)
{
switch((*cmd).primType) {
case SVGA3D_PRIMITIVE_INVALID:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_INVALID\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_INVALID\n");
break;
case SVGA3D_PRIMITIVE_TRIANGLELIST:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_TRIANGLELIST\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_TRIANGLELIST\n");
break;
case SVGA3D_PRIMITIVE_POINTLIST:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_POINTLIST\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_POINTLIST\n");
break;
case SVGA3D_PRIMITIVE_LINELIST:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_LINELIST\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_LINELIST\n");
break;
case SVGA3D_PRIMITIVE_LINESTRIP:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_LINESTRIP\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_LINESTRIP\n");
break;
case SVGA3D_PRIMITIVE_TRIANGLESTRIP:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_TRIANGLESTRIP\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_TRIANGLESTRIP\n");
break;
case SVGA3D_PRIMITIVE_TRIANGLEFAN:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_TRIANGLEFAN\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_TRIANGLEFAN\n");
break;
case SVGA3D_PRIMITIVE_MAX:
- debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_MAX\n");
+ _debug_printf("\t\t.primType = SVGA3D_PRIMITIVE_MAX\n");
break;
default:
- debug_printf("\t\t.primType = %i\n", (*cmd).primType);
+ _debug_printf("\t\t.primType = %i\n", (*cmd).primType);
break;
}
- debug_printf("\t\t.primitiveCount = %u\n", (*cmd).primitiveCount);
- debug_printf("\t\t.indexArray.surfaceId = %u\n", (*cmd).indexArray.surfaceId);
- debug_printf("\t\t.indexArray.offset = %u\n", (*cmd).indexArray.offset);
- debug_printf("\t\t.indexArray.stride = %u\n", (*cmd).indexArray.stride);
- debug_printf("\t\t.indexWidth = %u\n", (*cmd).indexWidth);
- debug_printf("\t\t.indexBias = %i\n", (*cmd).indexBias);
+ _debug_printf("\t\t.primitiveCount = %u\n", (*cmd).primitiveCount);
+ _debug_printf("\t\t.indexArray.surfaceId = %u\n", (*cmd).indexArray.surfaceId);
+ _debug_printf("\t\t.indexArray.offset = %u\n", (*cmd).indexArray.offset);
+ _debug_printf("\t\t.indexArray.stride = %u\n", (*cmd).indexArray.stride);
+ _debug_printf("\t\t.indexWidth = %u\n", (*cmd).indexWidth);
+ _debug_printf("\t\t.indexBias = %i\n", (*cmd).indexBias);
}
static void
dump_SVGA3dCmdPresent(const SVGA3dCmdPresent *cmd)
{
- debug_printf("\t\t.sid = %u\n", (*cmd).sid);
+ _debug_printf("\t\t.sid = %u\n", (*cmd).sid);
}
static void
dump_SVGA3dCmdSetRenderState(const SVGA3dCmdSetRenderState *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
}
static void
dump_SVGA3dCmdSurfaceStretchBlt(const SVGA3dCmdSurfaceStretchBlt *cmd)
{
- debug_printf("\t\t.src.sid = %u\n", (*cmd).src.sid);
- debug_printf("\t\t.src.face = %u\n", (*cmd).src.face);
- debug_printf("\t\t.src.mipmap = %u\n", (*cmd).src.mipmap);
- debug_printf("\t\t.dest.sid = %u\n", (*cmd).dest.sid);
- debug_printf("\t\t.dest.face = %u\n", (*cmd).dest.face);
- debug_printf("\t\t.dest.mipmap = %u\n", (*cmd).dest.mipmap);
- debug_printf("\t\t.boxSrc.x = %u\n", (*cmd).boxSrc.x);
- debug_printf("\t\t.boxSrc.y = %u\n", (*cmd).boxSrc.y);
- debug_printf("\t\t.boxSrc.z = %u\n", (*cmd).boxSrc.z);
- debug_printf("\t\t.boxSrc.w = %u\n", (*cmd).boxSrc.w);
- debug_printf("\t\t.boxSrc.h = %u\n", (*cmd).boxSrc.h);
- debug_printf("\t\t.boxSrc.d = %u\n", (*cmd).boxSrc.d);
- debug_printf("\t\t.boxDest.x = %u\n", (*cmd).boxDest.x);
- debug_printf("\t\t.boxDest.y = %u\n", (*cmd).boxDest.y);
- debug_printf("\t\t.boxDest.z = %u\n", (*cmd).boxDest.z);
- debug_printf("\t\t.boxDest.w = %u\n", (*cmd).boxDest.w);
- debug_printf("\t\t.boxDest.h = %u\n", (*cmd).boxDest.h);
- debug_printf("\t\t.boxDest.d = %u\n", (*cmd).boxDest.d);
+ _debug_printf("\t\t.src.sid = %u\n", (*cmd).src.sid);
+ _debug_printf("\t\t.src.face = %u\n", (*cmd).src.face);
+ _debug_printf("\t\t.src.mipmap = %u\n", (*cmd).src.mipmap);
+ _debug_printf("\t\t.dest.sid = %u\n", (*cmd).dest.sid);
+ _debug_printf("\t\t.dest.face = %u\n", (*cmd).dest.face);
+ _debug_printf("\t\t.dest.mipmap = %u\n", (*cmd).dest.mipmap);
+ _debug_printf("\t\t.boxSrc.x = %u\n", (*cmd).boxSrc.x);
+ _debug_printf("\t\t.boxSrc.y = %u\n", (*cmd).boxSrc.y);
+ _debug_printf("\t\t.boxSrc.z = %u\n", (*cmd).boxSrc.z);
+ _debug_printf("\t\t.boxSrc.w = %u\n", (*cmd).boxSrc.w);
+ _debug_printf("\t\t.boxSrc.h = %u\n", (*cmd).boxSrc.h);
+ _debug_printf("\t\t.boxSrc.d = %u\n", (*cmd).boxSrc.d);
+ _debug_printf("\t\t.boxDest.x = %u\n", (*cmd).boxDest.x);
+ _debug_printf("\t\t.boxDest.y = %u\n", (*cmd).boxDest.y);
+ _debug_printf("\t\t.boxDest.z = %u\n", (*cmd).boxDest.z);
+ _debug_printf("\t\t.boxDest.w = %u\n", (*cmd).boxDest.w);
+ _debug_printf("\t\t.boxDest.h = %u\n", (*cmd).boxDest.h);
+ _debug_printf("\t\t.boxDest.d = %u\n", (*cmd).boxDest.d);
switch((*cmd).mode) {
case SVGA3D_STRETCH_BLT_POINT:
- debug_printf("\t\t.mode = SVGA3D_STRETCH_BLT_POINT\n");
+ _debug_printf("\t\t.mode = SVGA3D_STRETCH_BLT_POINT\n");
break;
case SVGA3D_STRETCH_BLT_LINEAR:
- debug_printf("\t\t.mode = SVGA3D_STRETCH_BLT_LINEAR\n");
+ _debug_printf("\t\t.mode = SVGA3D_STRETCH_BLT_LINEAR\n");
break;
case SVGA3D_STRETCH_BLT_MAX:
- debug_printf("\t\t.mode = SVGA3D_STRETCH_BLT_MAX\n");
+ _debug_printf("\t\t.mode = SVGA3D_STRETCH_BLT_MAX\n");
break;
default:
- debug_printf("\t\t.mode = %i\n", (*cmd).mode);
+ _debug_printf("\t\t.mode = %i\n", (*cmd).mode);
break;
}
}
@@ -1103,21 +1103,21 @@ dump_SVGA3dCmdSurfaceStretchBlt(const SVGA3dCmdSurfaceStretchBlt *cmd)
static void
dump_SVGA3dCmdSurfaceDMA(const SVGA3dCmdSurfaceDMA *cmd)
{
- debug_printf("\t\t.guest.ptr.gmrId = %u\n", (*cmd).guest.ptr.gmrId);
- debug_printf("\t\t.guest.ptr.offset = %u\n", (*cmd).guest.ptr.offset);
- debug_printf("\t\t.guest.pitch = %u\n", (*cmd).guest.pitch);
- debug_printf("\t\t.host.sid = %u\n", (*cmd).host.sid);
- debug_printf("\t\t.host.face = %u\n", (*cmd).host.face);
- debug_printf("\t\t.host.mipmap = %u\n", (*cmd).host.mipmap);
+ _debug_printf("\t\t.guest.ptr.gmrId = %u\n", (*cmd).guest.ptr.gmrId);
+ _debug_printf("\t\t.guest.ptr.offset = %u\n", (*cmd).guest.ptr.offset);
+ _debug_printf("\t\t.guest.pitch = %u\n", (*cmd).guest.pitch);
+ _debug_printf("\t\t.host.sid = %u\n", (*cmd).host.sid);
+ _debug_printf("\t\t.host.face = %u\n", (*cmd).host.face);
+ _debug_printf("\t\t.host.mipmap = %u\n", (*cmd).host.mipmap);
switch((*cmd).transfer) {
case SVGA3D_WRITE_HOST_VRAM:
- debug_printf("\t\t.transfer = SVGA3D_WRITE_HOST_VRAM\n");
+ _debug_printf("\t\t.transfer = SVGA3D_WRITE_HOST_VRAM\n");
break;
case SVGA3D_READ_HOST_VRAM:
- debug_printf("\t\t.transfer = SVGA3D_READ_HOST_VRAM\n");
+ _debug_printf("\t\t.transfer = SVGA3D_READ_HOST_VRAM\n");
break;
default:
- debug_printf("\t\t.transfer = %i\n", (*cmd).transfer);
+ _debug_printf("\t\t.transfer = %i\n", (*cmd).transfer);
break;
}
}
@@ -1125,107 +1125,107 @@ dump_SVGA3dCmdSurfaceDMA(const SVGA3dCmdSurfaceDMA *cmd)
static void
dump_SVGA3dCmdSurfaceDMASuffix(const SVGA3dCmdSurfaceDMASuffix *cmd)
{
- debug_printf("\t\t.suffixSize = %u\n", (*cmd).suffixSize);
- debug_printf("\t\t.maximumOffset = %u\n", (*cmd).maximumOffset);
- debug_printf("\t\t.flags.discard = %u\n", (*cmd).flags.discard);
- debug_printf("\t\t.flags.unsynchronized = %u\n", (*cmd).flags.unsynchronized);
+ _debug_printf("\t\t.suffixSize = %u\n", (*cmd).suffixSize);
+ _debug_printf("\t\t.maximumOffset = %u\n", (*cmd).maximumOffset);
+ _debug_printf("\t\t.flags.discard = %u\n", (*cmd).flags.discard);
+ _debug_printf("\t\t.flags.unsynchronized = %u\n", (*cmd).flags.unsynchronized);
}
static void
dump_SVGA3dCmdSetTransform(const SVGA3dCmdSetTransform *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).type) {
case SVGA3D_TRANSFORM_INVALID:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_INVALID\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_INVALID\n");
break;
case SVGA3D_TRANSFORM_WORLD:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD\n");
break;
case SVGA3D_TRANSFORM_VIEW:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_VIEW\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_VIEW\n");
break;
case SVGA3D_TRANSFORM_PROJECTION:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_PROJECTION\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_PROJECTION\n");
break;
case SVGA3D_TRANSFORM_TEXTURE0:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE0\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE0\n");
break;
case SVGA3D_TRANSFORM_TEXTURE1:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE1\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE1\n");
break;
case SVGA3D_TRANSFORM_TEXTURE2:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE2\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE2\n");
break;
case SVGA3D_TRANSFORM_TEXTURE3:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE3\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE3\n");
break;
case SVGA3D_TRANSFORM_TEXTURE4:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE4\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE4\n");
break;
case SVGA3D_TRANSFORM_TEXTURE5:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE5\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE5\n");
break;
case SVGA3D_TRANSFORM_TEXTURE6:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE6\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE6\n");
break;
case SVGA3D_TRANSFORM_TEXTURE7:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE7\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_TEXTURE7\n");
break;
case SVGA3D_TRANSFORM_WORLD1:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD1\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD1\n");
break;
case SVGA3D_TRANSFORM_WORLD2:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD2\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD2\n");
break;
case SVGA3D_TRANSFORM_WORLD3:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD3\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_WORLD3\n");
break;
case SVGA3D_TRANSFORM_MAX:
- debug_printf("\t\t.type = SVGA3D_TRANSFORM_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_TRANSFORM_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
- debug_printf("\t\t.matrix[0] = %f\n", (*cmd).matrix[0]);
- debug_printf("\t\t.matrix[1] = %f\n", (*cmd).matrix[1]);
- debug_printf("\t\t.matrix[2] = %f\n", (*cmd).matrix[2]);
- debug_printf("\t\t.matrix[3] = %f\n", (*cmd).matrix[3]);
- debug_printf("\t\t.matrix[4] = %f\n", (*cmd).matrix[4]);
- debug_printf("\t\t.matrix[5] = %f\n", (*cmd).matrix[5]);
- debug_printf("\t\t.matrix[6] = %f\n", (*cmd).matrix[6]);
- debug_printf("\t\t.matrix[7] = %f\n", (*cmd).matrix[7]);
- debug_printf("\t\t.matrix[8] = %f\n", (*cmd).matrix[8]);
- debug_printf("\t\t.matrix[9] = %f\n", (*cmd).matrix[9]);
- debug_printf("\t\t.matrix[10] = %f\n", (*cmd).matrix[10]);
- debug_printf("\t\t.matrix[11] = %f\n", (*cmd).matrix[11]);
- debug_printf("\t\t.matrix[12] = %f\n", (*cmd).matrix[12]);
- debug_printf("\t\t.matrix[13] = %f\n", (*cmd).matrix[13]);
- debug_printf("\t\t.matrix[14] = %f\n", (*cmd).matrix[14]);
- debug_printf("\t\t.matrix[15] = %f\n", (*cmd).matrix[15]);
+ _debug_printf("\t\t.matrix[0] = %f\n", (*cmd).matrix[0]);
+ _debug_printf("\t\t.matrix[1] = %f\n", (*cmd).matrix[1]);
+ _debug_printf("\t\t.matrix[2] = %f\n", (*cmd).matrix[2]);
+ _debug_printf("\t\t.matrix[3] = %f\n", (*cmd).matrix[3]);
+ _debug_printf("\t\t.matrix[4] = %f\n", (*cmd).matrix[4]);
+ _debug_printf("\t\t.matrix[5] = %f\n", (*cmd).matrix[5]);
+ _debug_printf("\t\t.matrix[6] = %f\n", (*cmd).matrix[6]);
+ _debug_printf("\t\t.matrix[7] = %f\n", (*cmd).matrix[7]);
+ _debug_printf("\t\t.matrix[8] = %f\n", (*cmd).matrix[8]);
+ _debug_printf("\t\t.matrix[9] = %f\n", (*cmd).matrix[9]);
+ _debug_printf("\t\t.matrix[10] = %f\n", (*cmd).matrix[10]);
+ _debug_printf("\t\t.matrix[11] = %f\n", (*cmd).matrix[11]);
+ _debug_printf("\t\t.matrix[12] = %f\n", (*cmd).matrix[12]);
+ _debug_printf("\t\t.matrix[13] = %f\n", (*cmd).matrix[13]);
+ _debug_printf("\t\t.matrix[14] = %f\n", (*cmd).matrix[14]);
+ _debug_printf("\t\t.matrix[15] = %f\n", (*cmd).matrix[15]);
}
static void
dump_SVGA3dCmdDestroyShader(const SVGA3dCmdDestroyShader *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
- debug_printf("\t\t.shid = %u\n", (*cmd).shid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.shid = %u\n", (*cmd).shid);
switch((*cmd).type) {
case SVGA3D_SHADERTYPE_COMPILED_DX8:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_COMPILED_DX8\n");
break;
case SVGA3D_SHADERTYPE_VS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_VS\n");
break;
case SVGA3D_SHADERTYPE_PS:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_PS\n");
break;
case SVGA3D_SHADERTYPE_MAX:
- debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
+ _debug_printf("\t\t.type = SVGA3D_SHADERTYPE_MAX\n");
break;
default:
- debug_printf("\t\t.type = %i\n", (*cmd).type);
+ _debug_printf("\t\t.type = %i\n", (*cmd).type);
break;
}
}
@@ -1233,187 +1233,213 @@ dump_SVGA3dCmdDestroyShader(const SVGA3dCmdDestroyShader *cmd)
static void
dump_SVGA3dCmdDestroyContext(const SVGA3dCmdDestroyContext *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
}
static void
dump_SVGA3dCmdClear(const SVGA3dCmdClear *cmd)
{
- debug_printf("\t\t.cid = %u\n", (*cmd).cid);
+ _debug_printf("\t\t.cid = %u\n", (*cmd).cid);
switch((*cmd).clearFlag) {
case SVGA3D_CLEAR_COLOR:
- debug_printf("\t\t.clearFlag = SVGA3D_CLEAR_COLOR\n");
+ _debug_printf("\t\t.clearFlag = SVGA3D_CLEAR_COLOR\n");
break;
case SVGA3D_CLEAR_DEPTH:
- debug_printf("\t\t.clearFlag = SVGA3D_CLEAR_DEPTH\n");
+ _debug_printf("\t\t.clearFlag = SVGA3D_CLEAR_DEPTH\n");
break;
case SVGA3D_CLEAR_STENCIL:
- debug_printf("\t\t.clearFlag = SVGA3D_CLEAR_STENCIL\n");
+ _debug_printf("\t\t.clearFlag = SVGA3D_CLEAR_STENCIL\n");
break;
default:
- debug_printf("\t\t.clearFlag = %i\n", (*cmd).clearFlag);
+ _debug_printf("\t\t.clearFlag = %i\n", (*cmd).clearFlag);
break;
}
- debug_printf("\t\t.color = %u\n", (*cmd).color);
- debug_printf("\t\t.depth = %f\n", (*cmd).depth);
- debug_printf("\t\t.stencil = %u\n", (*cmd).stencil);
+ _debug_printf("\t\t.color = %u\n", (*cmd).color);
+ _debug_printf("\t\t.depth = %f\n", (*cmd).depth);
+ _debug_printf("\t\t.stencil = %u\n", (*cmd).stencil);
}
static void
dump_SVGA3dCmdDefineSurface(const SVGA3dCmdDefineSurface *cmd)
{
- debug_printf("\t\t.sid = %u\n", (*cmd).sid);
+ _debug_printf("\t\t.sid = %u\n", (*cmd).sid);
switch((*cmd).surfaceFlags) {
case SVGA3D_SURFACE_CUBEMAP:
- debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_CUBEMAP\n");
+ _debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_CUBEMAP\n");
break;
case SVGA3D_SURFACE_HINT_STATIC:
- debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_STATIC\n");
+ _debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_STATIC\n");
break;
case SVGA3D_SURFACE_HINT_DYNAMIC:
- debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_DYNAMIC\n");
+ _debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_DYNAMIC\n");
break;
case SVGA3D_SURFACE_HINT_INDEXBUFFER:
- debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_INDEXBUFFER\n");
+ _debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_INDEXBUFFER\n");
break;
case SVGA3D_SURFACE_HINT_VERTEXBUFFER:
- debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_VERTEXBUFFER\n");
+ _debug_printf("\t\t.surfaceFlags = SVGA3D_SURFACE_HINT_VERTEXBUFFER\n");
break;
default:
- debug_printf("\t\t.surfaceFlags = %i\n", (*cmd).surfaceFlags);
+ _debug_printf("\t\t.surfaceFlags = %i\n", (*cmd).surfaceFlags);
break;
}
switch((*cmd).format) {
case SVGA3D_FORMAT_INVALID:
- debug_printf("\t\t.format = SVGA3D_FORMAT_INVALID\n");
+ _debug_printf("\t\t.format = SVGA3D_FORMAT_INVALID\n");
break;
case SVGA3D_X8R8G8B8:
- debug_printf("\t\t.format = SVGA3D_X8R8G8B8\n");
+ _debug_printf("\t\t.format = SVGA3D_X8R8G8B8\n");
break;
case SVGA3D_A8R8G8B8:
- debug_printf("\t\t.format = SVGA3D_A8R8G8B8\n");
+ _debug_printf("\t\t.format = SVGA3D_A8R8G8B8\n");
break;
case SVGA3D_R5G6B5:
- debug_printf("\t\t.format = SVGA3D_R5G6B5\n");
+ _debug_printf("\t\t.format = SVGA3D_R5G6B5\n");
break;
case SVGA3D_X1R5G5B5:
- debug_printf("\t\t.format = SVGA3D_X1R5G5B5\n");
+ _debug_printf("\t\t.format = SVGA3D_X1R5G5B5\n");
break;
case SVGA3D_A1R5G5B5:
- debug_printf("\t\t.format = SVGA3D_A1R5G5B5\n");
+ _debug_printf("\t\t.format = SVGA3D_A1R5G5B5\n");
break;
case SVGA3D_A4R4G4B4:
- debug_printf("\t\t.format = SVGA3D_A4R4G4B4\n");
+ _debug_printf("\t\t.format = SVGA3D_A4R4G4B4\n");
break;
case SVGA3D_Z_D32:
- debug_printf("\t\t.format = SVGA3D_Z_D32\n");
+ _debug_printf("\t\t.format = SVGA3D_Z_D32\n");
break;
case SVGA3D_Z_D16:
- debug_printf("\t\t.format = SVGA3D_Z_D16\n");
+ _debug_printf("\t\t.format = SVGA3D_Z_D16\n");
break;
case SVGA3D_Z_D24S8:
- debug_printf("\t\t.format = SVGA3D_Z_D24S8\n");
+ _debug_printf("\t\t.format = SVGA3D_Z_D24S8\n");
break;
case SVGA3D_Z_D15S1:
- debug_printf("\t\t.format = SVGA3D_Z_D15S1\n");
+ _debug_printf("\t\t.format = SVGA3D_Z_D15S1\n");
break;
case SVGA3D_LUMINANCE8:
- debug_printf("\t\t.format = SVGA3D_LUMINANCE8\n");
+ _debug_printf("\t\t.format = SVGA3D_LUMINANCE8\n");
break;
case SVGA3D_LUMINANCE4_ALPHA4:
- debug_printf("\t\t.format = SVGA3D_LUMINANCE4_ALPHA4\n");
+ _debug_printf("\t\t.format = SVGA3D_LUMINANCE4_ALPHA4\n");
break;
case SVGA3D_LUMINANCE16:
- debug_printf("\t\t.format = SVGA3D_LUMINANCE16\n");
+ _debug_printf("\t\t.format = SVGA3D_LUMINANCE16\n");
break;
case SVGA3D_LUMINANCE8_ALPHA8:
- debug_printf("\t\t.format = SVGA3D_LUMINANCE8_ALPHA8\n");
+ _debug_printf("\t\t.format = SVGA3D_LUMINANCE8_ALPHA8\n");
break;
case SVGA3D_DXT1:
- debug_printf("\t\t.format = SVGA3D_DXT1\n");
+ _debug_printf("\t\t.format = SVGA3D_DXT1\n");
break;
case SVGA3D_DXT2:
- debug_printf("\t\t.format = SVGA3D_DXT2\n");
+ _debug_printf("\t\t.format = SVGA3D_DXT2\n");
break;
case SVGA3D_DXT3:
- debug_printf("\t\t.format = SVGA3D_DXT3\n");
+ _debug_printf("\t\t.format = SVGA3D_DXT3\n");
break;
case SVGA3D_DXT4:
- debug_printf("\t\t.format = SVGA3D_DXT4\n");
+ _debug_printf("\t\t.format = SVGA3D_DXT4\n");
break;
case SVGA3D_DXT5:
- debug_printf("\t\t.format = SVGA3D_DXT5\n");
+ _debug_printf("\t\t.format = SVGA3D_DXT5\n");
break;
case SVGA3D_BUMPU8V8:
- debug_printf("\t\t.format = SVGA3D_BUMPU8V8\n");
+ _debug_printf("\t\t.format = SVGA3D_BUMPU8V8\n");
break;
case SVGA3D_BUMPL6V5U5:
- debug_printf("\t\t.format = SVGA3D_BUMPL6V5U5\n");
+ _debug_printf("\t\t.format = SVGA3D_BUMPL6V5U5\n");
break;
case SVGA3D_BUMPX8L8V8U8:
- debug_printf("\t\t.format = SVGA3D_BUMPX8L8V8U8\n");
+ _debug_printf("\t\t.format = SVGA3D_BUMPX8L8V8U8\n");
break;
case SVGA3D_BUMPL8V8U8:
- debug_printf("\t\t.format = SVGA3D_BUMPL8V8U8\n");
+ _debug_printf("\t\t.format = SVGA3D_BUMPL8V8U8\n");
break;
case SVGA3D_ARGB_S10E5:
- debug_printf("\t\t.format = SVGA3D_ARGB_S10E5\n");
+ _debug_printf("\t\t.format = SVGA3D_ARGB_S10E5\n");
break;
case SVGA3D_ARGB_S23E8:
- debug_printf("\t\t.format = SVGA3D_ARGB_S23E8\n");
+ _debug_printf("\t\t.format = SVGA3D_ARGB_S23E8\n");
break;
case SVGA3D_A2R10G10B10:
- debug_printf("\t\t.format = SVGA3D_A2R10G10B10\n");
+ _debug_printf("\t\t.format = SVGA3D_A2R10G10B10\n");
break;
case SVGA3D_V8U8:
- debug_printf("\t\t.format = SVGA3D_V8U8\n");
+ _debug_printf("\t\t.format = SVGA3D_V8U8\n");
break;
case SVGA3D_Q8W8V8U8:
- debug_printf("\t\t.format = SVGA3D_Q8W8V8U8\n");
+ _debug_printf("\t\t.format = SVGA3D_Q8W8V8U8\n");
break;
case SVGA3D_CxV8U8:
- debug_printf("\t\t.format = SVGA3D_CxV8U8\n");
+ _debug_printf("\t\t.format = SVGA3D_CxV8U8\n");
break;
case SVGA3D_X8L8V8U8:
- debug_printf("\t\t.format = SVGA3D_X8L8V8U8\n");
+ _debug_printf("\t\t.format = SVGA3D_X8L8V8U8\n");
break;
case SVGA3D_A2W10V10U10:
- debug_printf("\t\t.format = SVGA3D_A2W10V10U10\n");
+ _debug_printf("\t\t.format = SVGA3D_A2W10V10U10\n");
break;
case SVGA3D_ALPHA8:
- debug_printf("\t\t.format = SVGA3D_ALPHA8\n");
+ _debug_printf("\t\t.format = SVGA3D_ALPHA8\n");
break;
case SVGA3D_R_S10E5:
- debug_printf("\t\t.format = SVGA3D_R_S10E5\n");
+ _debug_printf("\t\t.format = SVGA3D_R_S10E5\n");
break;
case SVGA3D_R_S23E8:
- debug_printf("\t\t.format = SVGA3D_R_S23E8\n");
+ _debug_printf("\t\t.format = SVGA3D_R_S23E8\n");
break;
case SVGA3D_RG_S10E5:
- debug_printf("\t\t.format = SVGA3D_RG_S10E5\n");
+ _debug_printf("\t\t.format = SVGA3D_RG_S10E5\n");
break;
case SVGA3D_RG_S23E8:
- debug_printf("\t\t.format = SVGA3D_RG_S23E8\n");
+ _debug_printf("\t\t.format = SVGA3D_RG_S23E8\n");
break;
case SVGA3D_BUFFER:
- debug_printf("\t\t.format = SVGA3D_BUFFER\n");
+ _debug_printf("\t\t.format = SVGA3D_BUFFER\n");
break;
case SVGA3D_Z_D24X8:
- debug_printf("\t\t.format = SVGA3D_Z_D24X8\n");
+ _debug_printf("\t\t.format = SVGA3D_Z_D24X8\n");
break;
case SVGA3D_FORMAT_MAX:
- debug_printf("\t\t.format = SVGA3D_FORMAT_MAX\n");
+ _debug_printf("\t\t.format = SVGA3D_FORMAT_MAX\n");
break;
default:
- debug_printf("\t\t.format = %i\n", (*cmd).format);
+ _debug_printf("\t\t.format = %i\n", (*cmd).format);
break;
}
- debug_printf("\t\t.face[0].numMipLevels = %u\n", (*cmd).face[0].numMipLevels);
- debug_printf("\t\t.face[1].numMipLevels = %u\n", (*cmd).face[1].numMipLevels);
- debug_printf("\t\t.face[2].numMipLevels = %u\n", (*cmd).face[2].numMipLevels);
- debug_printf("\t\t.face[3].numMipLevels = %u\n", (*cmd).face[3].numMipLevels);
- debug_printf("\t\t.face[4].numMipLevels = %u\n", (*cmd).face[4].numMipLevels);
- debug_printf("\t\t.face[5].numMipLevels = %u\n", (*cmd).face[5].numMipLevels);
+ _debug_printf("\t\t.face[0].numMipLevels = %u\n", (*cmd).face[0].numMipLevels);
+ _debug_printf("\t\t.face[1].numMipLevels = %u\n", (*cmd).face[1].numMipLevels);
+ _debug_printf("\t\t.face[2].numMipLevels = %u\n", (*cmd).face[2].numMipLevels);
+ _debug_printf("\t\t.face[3].numMipLevels = %u\n", (*cmd).face[3].numMipLevels);
+ _debug_printf("\t\t.face[4].numMipLevels = %u\n", (*cmd).face[4].numMipLevels);
+ _debug_printf("\t\t.face[5].numMipLevels = %u\n", (*cmd).face[5].numMipLevels);
+}
+
+static void
+dump_SVGASignedRect(const SVGASignedRect *cmd)
+{
+ _debug_printf("\t\t.left = %i\n", (*cmd).left);
+ _debug_printf("\t\t.top = %i\n", (*cmd).top);
+ _debug_printf("\t\t.right = %i\n", (*cmd).right);
+ _debug_printf("\t\t.bottom = %i\n", (*cmd).bottom);
+}
+
+static void
+dump_SVGA3dCmdBlitSurfaceToScreen(const SVGA3dCmdBlitSurfaceToScreen *cmd)
+{
+ _debug_printf("\t\t.srcImage.sid = %u\n", (*cmd).srcImage.sid);
+ _debug_printf("\t\t.srcImage.face = %u\n", (*cmd).srcImage.face);
+ _debug_printf("\t\t.srcImage.mipmap = %u\n", (*cmd).srcImage.mipmap);
+ _debug_printf("\t\t.srcRect.left = %i\n", (*cmd).srcRect.left);
+ _debug_printf("\t\t.srcRect.top = %i\n", (*cmd).srcRect.top);
+ _debug_printf("\t\t.srcRect.right = %i\n", (*cmd).srcRect.right);
+ _debug_printf("\t\t.srcRect.bottom = %i\n", (*cmd).srcRect.bottom);
+ _debug_printf("\t\t.destScreenId = %u\n", (*cmd).destScreenId);
+ _debug_printf("\t\t.destRect.left = %i\n", (*cmd).destRect.left);
+ _debug_printf("\t\t.destRect.top = %i\n", (*cmd).destRect.top);
+ _debug_printf("\t\t.destRect.right = %i\n", (*cmd).destRect.right);
+ _debug_printf("\t\t.destRect.bottom = %i\n", (*cmd).destRect.bottom);
}
@@ -1438,7 +1464,7 @@ svga_dump_commands(const void *commands, uint32_t size)
switch(cmd_id) {
case SVGA_3D_CMD_SURFACE_DEFINE:
- debug_printf("\tSVGA_3D_CMD_SURFACE_DEFINE\n");
+ _debug_printf("\tSVGA_3D_CMD_SURFACE_DEFINE\n");
{
const SVGA3dCmdDefineSurface *cmd = (const SVGA3dCmdDefineSurface *)body;
dump_SVGA3dCmdDefineSurface(cmd);
@@ -1450,7 +1476,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SURFACE_DESTROY:
- debug_printf("\tSVGA_3D_CMD_SURFACE_DESTROY\n");
+ _debug_printf("\tSVGA_3D_CMD_SURFACE_DESTROY\n");
{
const SVGA3dCmdDestroySurface *cmd = (const SVGA3dCmdDestroySurface *)body;
dump_SVGA3dCmdDestroySurface(cmd);
@@ -1458,7 +1484,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SURFACE_COPY:
- debug_printf("\tSVGA_3D_CMD_SURFACE_COPY\n");
+ _debug_printf("\tSVGA_3D_CMD_SURFACE_COPY\n");
{
const SVGA3dCmdSurfaceCopy *cmd = (const SVGA3dCmdSurfaceCopy *)body;
dump_SVGA3dCmdSurfaceCopy(cmd);
@@ -1470,7 +1496,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SURFACE_STRETCHBLT:
- debug_printf("\tSVGA_3D_CMD_SURFACE_STRETCHBLT\n");
+ _debug_printf("\tSVGA_3D_CMD_SURFACE_STRETCHBLT\n");
{
const SVGA3dCmdSurfaceStretchBlt *cmd = (const SVGA3dCmdSurfaceStretchBlt *)body;
dump_SVGA3dCmdSurfaceStretchBlt(cmd);
@@ -1478,7 +1504,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SURFACE_DMA:
- debug_printf("\tSVGA_3D_CMD_SURFACE_DMA\n");
+ _debug_printf("\tSVGA_3D_CMD_SURFACE_DMA\n");
{
const SVGA3dCmdSurfaceDMA *cmd = (const SVGA3dCmdSurfaceDMA *)body;
dump_SVGA3dCmdSurfaceDMA(cmd);
@@ -1494,7 +1520,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_CONTEXT_DEFINE:
- debug_printf("\tSVGA_3D_CMD_CONTEXT_DEFINE\n");
+ _debug_printf("\tSVGA_3D_CMD_CONTEXT_DEFINE\n");
{
const SVGA3dCmdDefineContext *cmd = (const SVGA3dCmdDefineContext *)body;
dump_SVGA3dCmdDefineContext(cmd);
@@ -1502,7 +1528,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_CONTEXT_DESTROY:
- debug_printf("\tSVGA_3D_CMD_CONTEXT_DESTROY\n");
+ _debug_printf("\tSVGA_3D_CMD_CONTEXT_DESTROY\n");
{
const SVGA3dCmdDestroyContext *cmd = (const SVGA3dCmdDestroyContext *)body;
dump_SVGA3dCmdDestroyContext(cmd);
@@ -1510,7 +1536,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETTRANSFORM:
- debug_printf("\tSVGA_3D_CMD_SETTRANSFORM\n");
+ _debug_printf("\tSVGA_3D_CMD_SETTRANSFORM\n");
{
const SVGA3dCmdSetTransform *cmd = (const SVGA3dCmdSetTransform *)body;
dump_SVGA3dCmdSetTransform(cmd);
@@ -1518,7 +1544,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETZRANGE:
- debug_printf("\tSVGA_3D_CMD_SETZRANGE\n");
+ _debug_printf("\tSVGA_3D_CMD_SETZRANGE\n");
{
const SVGA3dCmdSetZRange *cmd = (const SVGA3dCmdSetZRange *)body;
dump_SVGA3dCmdSetZRange(cmd);
@@ -1526,7 +1552,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETRENDERSTATE:
- debug_printf("\tSVGA_3D_CMD_SETRENDERSTATE\n");
+ _debug_printf("\tSVGA_3D_CMD_SETRENDERSTATE\n");
{
const SVGA3dCmdSetRenderState *cmd = (const SVGA3dCmdSetRenderState *)body;
dump_SVGA3dCmdSetRenderState(cmd);
@@ -1538,7 +1564,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETRENDERTARGET:
- debug_printf("\tSVGA_3D_CMD_SETRENDERTARGET\n");
+ _debug_printf("\tSVGA_3D_CMD_SETRENDERTARGET\n");
{
const SVGA3dCmdSetRenderTarget *cmd = (const SVGA3dCmdSetRenderTarget *)body;
dump_SVGA3dCmdSetRenderTarget(cmd);
@@ -1546,7 +1572,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETTEXTURESTATE:
- debug_printf("\tSVGA_3D_CMD_SETTEXTURESTATE\n");
+ _debug_printf("\tSVGA_3D_CMD_SETTEXTURESTATE\n");
{
const SVGA3dCmdSetTextureState *cmd = (const SVGA3dCmdSetTextureState *)body;
dump_SVGA3dCmdSetTextureState(cmd);
@@ -1558,7 +1584,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETMATERIAL:
- debug_printf("\tSVGA_3D_CMD_SETMATERIAL\n");
+ _debug_printf("\tSVGA_3D_CMD_SETMATERIAL\n");
{
const SVGA3dCmdSetMaterial *cmd = (const SVGA3dCmdSetMaterial *)body;
dump_SVGA3dCmdSetMaterial(cmd);
@@ -1566,7 +1592,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETLIGHTDATA:
- debug_printf("\tSVGA_3D_CMD_SETLIGHTDATA\n");
+ _debug_printf("\tSVGA_3D_CMD_SETLIGHTDATA\n");
{
const SVGA3dCmdSetLightData *cmd = (const SVGA3dCmdSetLightData *)body;
dump_SVGA3dCmdSetLightData(cmd);
@@ -1574,7 +1600,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETLIGHTENABLED:
- debug_printf("\tSVGA_3D_CMD_SETLIGHTENABLED\n");
+ _debug_printf("\tSVGA_3D_CMD_SETLIGHTENABLED\n");
{
const SVGA3dCmdSetLightEnabled *cmd = (const SVGA3dCmdSetLightEnabled *)body;
dump_SVGA3dCmdSetLightEnabled(cmd);
@@ -1582,7 +1608,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETVIEWPORT:
- debug_printf("\tSVGA_3D_CMD_SETVIEWPORT\n");
+ _debug_printf("\tSVGA_3D_CMD_SETVIEWPORT\n");
{
const SVGA3dCmdSetViewport *cmd = (const SVGA3dCmdSetViewport *)body;
dump_SVGA3dCmdSetViewport(cmd);
@@ -1590,7 +1616,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETCLIPPLANE:
- debug_printf("\tSVGA_3D_CMD_SETCLIPPLANE\n");
+ _debug_printf("\tSVGA_3D_CMD_SETCLIPPLANE\n");
{
const SVGA3dCmdSetClipPlane *cmd = (const SVGA3dCmdSetClipPlane *)body;
dump_SVGA3dCmdSetClipPlane(cmd);
@@ -1598,7 +1624,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_CLEAR:
- debug_printf("\tSVGA_3D_CMD_CLEAR\n");
+ _debug_printf("\tSVGA_3D_CMD_CLEAR\n");
{
const SVGA3dCmdClear *cmd = (const SVGA3dCmdClear *)body;
dump_SVGA3dCmdClear(cmd);
@@ -1610,7 +1636,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_PRESENT:
- debug_printf("\tSVGA_3D_CMD_PRESENT\n");
+ _debug_printf("\tSVGA_3D_CMD_PRESENT\n");
{
const SVGA3dCmdPresent *cmd = (const SVGA3dCmdPresent *)body;
dump_SVGA3dCmdPresent(cmd);
@@ -1622,7 +1648,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SHADER_DEFINE:
- debug_printf("\tSVGA_3D_CMD_SHADER_DEFINE\n");
+ _debug_printf("\tSVGA_3D_CMD_SHADER_DEFINE\n");
{
const SVGA3dCmdDefineShader *cmd = (const SVGA3dCmdDefineShader *)body;
dump_SVGA3dCmdDefineShader(cmd);
@@ -1634,7 +1660,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SHADER_DESTROY:
- debug_printf("\tSVGA_3D_CMD_SHADER_DESTROY\n");
+ _debug_printf("\tSVGA_3D_CMD_SHADER_DESTROY\n");
{
const SVGA3dCmdDestroyShader *cmd = (const SVGA3dCmdDestroyShader *)body;
dump_SVGA3dCmdDestroyShader(cmd);
@@ -1642,7 +1668,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SET_SHADER:
- debug_printf("\tSVGA_3D_CMD_SET_SHADER\n");
+ _debug_printf("\tSVGA_3D_CMD_SET_SHADER\n");
{
const SVGA3dCmdSetShader *cmd = (const SVGA3dCmdSetShader *)body;
dump_SVGA3dCmdSetShader(cmd);
@@ -1650,7 +1676,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SET_SHADER_CONST:
- debug_printf("\tSVGA_3D_CMD_SET_SHADER_CONST\n");
+ _debug_printf("\tSVGA_3D_CMD_SET_SHADER_CONST\n");
{
const SVGA3dCmdSetShaderConst *cmd = (const SVGA3dCmdSetShaderConst *)body;
dump_SVGA3dCmdSetShaderConst(cmd);
@@ -1658,7 +1684,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_DRAW_PRIMITIVES:
- debug_printf("\tSVGA_3D_CMD_DRAW_PRIMITIVES\n");
+ _debug_printf("\tSVGA_3D_CMD_DRAW_PRIMITIVES\n");
{
const SVGA3dCmdDrawPrimitives *cmd = (const SVGA3dCmdDrawPrimitives *)body;
unsigned i, j;
@@ -1679,7 +1705,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_SETSCISSORRECT:
- debug_printf("\tSVGA_3D_CMD_SETSCISSORRECT\n");
+ _debug_printf("\tSVGA_3D_CMD_SETSCISSORRECT\n");
{
const SVGA3dCmdSetScissorRect *cmd = (const SVGA3dCmdSetScissorRect *)body;
dump_SVGA3dCmdSetScissorRect(cmd);
@@ -1687,7 +1713,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_BEGIN_QUERY:
- debug_printf("\tSVGA_3D_CMD_BEGIN_QUERY\n");
+ _debug_printf("\tSVGA_3D_CMD_BEGIN_QUERY\n");
{
const SVGA3dCmdBeginQuery *cmd = (const SVGA3dCmdBeginQuery *)body;
dump_SVGA3dCmdBeginQuery(cmd);
@@ -1695,7 +1721,7 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_END_QUERY:
- debug_printf("\tSVGA_3D_CMD_END_QUERY\n");
+ _debug_printf("\tSVGA_3D_CMD_END_QUERY\n");
{
const SVGA3dCmdEndQuery *cmd = (const SVGA3dCmdEndQuery *)body;
dump_SVGA3dCmdEndQuery(cmd);
@@ -1703,32 +1729,44 @@ svga_dump_commands(const void *commands, uint32_t size)
}
break;
case SVGA_3D_CMD_WAIT_FOR_QUERY:
- debug_printf("\tSVGA_3D_CMD_WAIT_FOR_QUERY\n");
+ _debug_printf("\tSVGA_3D_CMD_WAIT_FOR_QUERY\n");
{
const SVGA3dCmdWaitForQuery *cmd = (const SVGA3dCmdWaitForQuery *)body;
dump_SVGA3dCmdWaitForQuery(cmd);
body = (const uint8_t *)&cmd[1];
}
break;
+ case SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN:
+ _debug_printf("\tSVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN\n");
+ {
+ const SVGA3dCmdBlitSurfaceToScreen *cmd = (const SVGA3dCmdBlitSurfaceToScreen *)body;
+ dump_SVGA3dCmdBlitSurfaceToScreen(cmd);
+ body = (const uint8_t *)&cmd[1];
+ while(body + sizeof(SVGASignedRect) <= next) {
+ dump_SVGASignedRect((const SVGASignedRect *)body);
+ body += sizeof(SVGASignedRect);
+ }
+ }
+ break;
default:
- debug_printf("\t0x%08x\n", cmd_id);
+ _debug_printf("\t0x%08x\n", cmd_id);
break;
}
while(body + sizeof(uint32_t) <= next) {
- debug_printf("\t\t0x%08x\n", *(const uint32_t *)body);
+ _debug_printf("\t\t0x%08x\n", *(const uint32_t *)body);
body += sizeof(uint32_t);
}
while(body + sizeof(uint32_t) <= next)
- debug_printf("\t\t0x%02x\n", *body++);
+ _debug_printf("\t\t0x%02x\n", *body++);
}
else if(cmd_id == SVGA_CMD_FENCE) {
- debug_printf("\tSVGA_CMD_FENCE\n");
- debug_printf("\t\t0x%08x\n", ((const uint32_t *)next)[1]);
+ _debug_printf("\tSVGA_CMD_FENCE\n");
+ _debug_printf("\t\t0x%08x\n", ((const uint32_t *)next)[1]);
next += 2*sizeof(uint32_t);
}
else {
- debug_printf("\t0x%08x\n", cmd_id);
+ _debug_printf("\t0x%08x\n", cmd_id);
next += sizeof(uint32_t);
}
}
diff --git a/src/gallium/drivers/svga/svgadump/svga_dump.py b/src/gallium/drivers/svga/svgadump/svga_dump.py
index 288e753296..a1ada29ef8 100755
--- a/src/gallium/drivers/svga/svgadump/svga_dump.py
+++ b/src/gallium/drivers/svga/svgadump/svga_dump.py
@@ -71,14 +71,14 @@ class decl_dumper_t(decl_visitor.decl_visitor_t):
print ' switch(%s) {' % ("(*cmd)" + self._instance,)
for name, value in self.decl.values:
print ' case %s:' % (name,)
- print ' debug_printf("\\t\\t%s = %s\\n");' % (self._instance, name)
+ print ' _debug_printf("\\t\\t%s = %s\\n");' % (self._instance, name)
print ' break;'
print ' default:'
- print ' debug_printf("\\t\\t%s = %%i\\n", %s);' % (self._instance, "(*cmd)" + self._instance)
+ print ' _debug_printf("\\t\\t%s = %%i\\n", %s);' % (self._instance, "(*cmd)" + self._instance)
print ' break;'
print ' }'
else:
- print ' debug_printf("\\t\\t%s = %%i\\n", %s);' % (self._instance, "(*cmd)" + self._instance)
+ print ' _debug_printf("\\t\\t%s = %%i\\n", %s);' % (self._instance, "(*cmd)" + self._instance)
def dump_decl(instance, decl):
@@ -154,7 +154,7 @@ class type_dumper_t(type_visitor.type_visitor_t):
dump_decl(self.instance, decl)
def print_instance(self, format):
- print ' debug_printf("\\t\\t%s = %s\\n", %s);' % (self.instance, format, "(*cmd)" + self.instance)
+ print ' _debug_printf("\\t\\t%s = %s\\n", %s);' % (self.instance, format, "(*cmd)" + self.instance)
def dump_type(instance, type_):
@@ -202,6 +202,7 @@ cmds = [
('SVGA_3D_CMD_END_QUERY', 'SVGA3dCmdEndQuery', (), None),
('SVGA_3D_CMD_WAIT_FOR_QUERY', 'SVGA3dCmdWaitForQuery', (), None),
#('SVGA_3D_CMD_PRESENT_READBACK', None, (), None),
+ ('SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN', 'SVGA3dCmdBlitSurfaceToScreen', (), 'SVGASignedRect'),
]
def dump_cmds():
@@ -230,7 +231,7 @@ svga_dump_commands(const void *commands, uint32_t size)
indexes = 'ijklmn'
for id, header, body, footer in cmds:
print ' case %s:' % id
- print ' debug_printf("\\t%s\\n");' % id
+ print ' _debug_printf("\\t%s\\n");' % id
print ' {'
print ' const %s *cmd = (const %s *)body;' % (header, header)
if len(body):
@@ -255,25 +256,25 @@ svga_dump_commands(const void *commands, uint32_t size)
print ' }'
print ' break;'
print ' default:'
- print ' debug_printf("\\t0x%08x\\n", cmd_id);'
+ print ' _debug_printf("\\t0x%08x\\n", cmd_id);'
print ' break;'
print ' }'
print r'''
while(body + sizeof(uint32_t) <= next) {
- debug_printf("\t\t0x%08x\n", *(const uint32_t *)body);
+ _debug_printf("\t\t0x%08x\n", *(const uint32_t *)body);
body += sizeof(uint32_t);
}
while(body + sizeof(uint32_t) <= next)
- debug_printf("\t\t0x%02x\n", *body++);
+ _debug_printf("\t\t0x%02x\n", *body++);
}
else if(cmd_id == SVGA_CMD_FENCE) {
- debug_printf("\tSVGA_CMD_FENCE\n");
- debug_printf("\t\t0x%08x\n", ((const uint32_t *)next)[1]);
+ _debug_printf("\tSVGA_CMD_FENCE\n");
+ _debug_printf("\t\t0x%08x\n", ((const uint32_t *)next)[1]);
next += 2*sizeof(uint32_t);
}
else {
- debug_printf("\t0x%08x\n", cmd_id);
+ _debug_printf("\t0x%08x\n", cmd_id);
next += sizeof(uint32_t);
}
}
@@ -294,18 +295,18 @@ def main():
print '#include "svga_shader_dump.h"'
print '#include "svga3d_reg.h"'
print
- print '#include "pipe/p_debug.h"'
+ print '#include "util/u_debug.h"'
print '#include "svga_dump.h"'
print
config = parser.config_t(
- include_paths = ['include'],
+ include_paths = ['../../../include', '../include'],
compiler = 'gcc',
)
headers = [
- 'include/svga_types.h',
- 'include/svga3d_reg.h',
+ 'svga_types.h',
+ 'svga3d_reg.h',
]
decls = parser.parse(headers, config, parser.COMPILATION_MODE.ALL_AT_ONCE)
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
index b0e7fdf378..70e27d86d3 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
+++ b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
@@ -50,16 +50,16 @@ static void dump_op( struct sh_op op, const char *mnemonic )
assert( op.is_reg == 0 );
if (op.coissue)
- debug_printf( "+" );
- debug_printf( "%s", mnemonic );
+ _debug_printf( "+" );
+ _debug_printf( "%s", mnemonic );
switch (op.control) {
case 0:
break;
case SVGA3DOPCONT_PROJECT:
- debug_printf( "p" );
+ _debug_printf( "p" );
break;
case SVGA3DOPCONT_BIAS:
- debug_printf( "b" );
+ _debug_printf( "b" );
break;
default:
assert( 0 );
@@ -72,28 +72,28 @@ static void dump_comp_op( struct sh_op op, const char *mnemonic )
assert( op.is_reg == 0 );
if (op.coissue)
- debug_printf( "+" );
- debug_printf( "%s", mnemonic );
+ _debug_printf( "+" );
+ _debug_printf( "%s", mnemonic );
switch (op.control) {
case SVGA3DOPCOMP_RESERVED0:
break;
case SVGA3DOPCOMP_GT:
- debug_printf("_gt");
+ _debug_printf("_gt");
break;
case SVGA3DOPCOMP_EQ:
- debug_printf("_eq");
+ _debug_printf("_eq");
break;
case SVGA3DOPCOMP_GE:
- debug_printf("_ge");
+ _debug_printf("_ge");
break;
case SVGA3DOPCOMP_LT:
- debug_printf("_lt");
+ _debug_printf("_lt");
break;
case SVGA3DOPCOMPC_NE:
- debug_printf("_ne");
+ _debug_printf("_ne");
break;
case SVGA3DOPCOMP_LE:
- debug_printf("_le");
+ _debug_printf("_le");
break;
case SVGA3DOPCOMP_RESERVED1:
default:
@@ -109,93 +109,93 @@ static void dump_reg( struct sh_reg reg, struct sh_srcreg *indreg, const struct
switch (sh_reg_type( reg )) {
case SVGA3DREG_TEMP:
- debug_printf( "r%u", reg.number );
+ _debug_printf( "r%u", reg.number );
break;
case SVGA3DREG_INPUT:
- debug_printf( "v%u", reg.number );
+ _debug_printf( "v%u", reg.number );
break;
case SVGA3DREG_CONST:
if (reg.relative) {
if (sh_srcreg_type( *indreg ) == SVGA3DREG_LOOP)
- debug_printf( "c[aL+%u]", reg.number );
+ _debug_printf( "c[aL+%u]", reg.number );
else
- debug_printf( "c[a%u.x+%u]", indreg->number, reg.number );
+ _debug_printf( "c[a%u.x+%u]", indreg->number, reg.number );
}
else
- debug_printf( "c%u", reg.number );
+ _debug_printf( "c%u", reg.number );
break;
case SVGA3DREG_ADDR: /* VS */
/* SVGA3DREG_TEXTURE */ /* PS */
if (di->is_ps)
- debug_printf( "t%u", reg.number );
+ _debug_printf( "t%u", reg.number );
else
- debug_printf( "a%u", reg.number );
+ _debug_printf( "a%u", reg.number );
break;
case SVGA3DREG_RASTOUT:
switch (reg.number) {
case 0 /*POSITION*/:
- debug_printf( "oPos" );
+ _debug_printf( "oPos" );
break;
case 1 /*FOG*/:
- debug_printf( "oFog" );
+ _debug_printf( "oFog" );
break;
case 2 /*POINT_SIZE*/:
- debug_printf( "oPts" );
+ _debug_printf( "oPts" );
break;
default:
assert( 0 );
- debug_printf( "???" );
+ _debug_printf( "???" );
}
break;
case SVGA3DREG_ATTROUT:
assert( reg.number < 2 );
- debug_printf( "oD%u", reg.number );
+ _debug_printf( "oD%u", reg.number );
break;
case SVGA3DREG_TEXCRDOUT:
/* SVGA3DREG_OUTPUT */
- debug_printf( "oT%u", reg.number );
+ _debug_printf( "oT%u", reg.number );
break;
case SVGA3DREG_COLOROUT:
- debug_printf( "oC%u", reg.number );
+ _debug_printf( "oC%u", reg.number );
break;
case SVGA3DREG_DEPTHOUT:
- debug_printf( "oD%u", reg.number );
+ _debug_printf( "oD%u", reg.number );
break;
case SVGA3DREG_SAMPLER:
- debug_printf( "s%u", reg.number );
+ _debug_printf( "s%u", reg.number );
break;
case SVGA3DREG_CONSTBOOL:
assert( !reg.relative );
- debug_printf( "b%u", reg.number );
+ _debug_printf( "b%u", reg.number );
break;
case SVGA3DREG_CONSTINT:
assert( !reg.relative );
- debug_printf( "i%u", reg.number );
+ _debug_printf( "i%u", reg.number );
break;
case SVGA3DREG_LOOP:
assert( reg.number == 0 );
- debug_printf( "aL" );
+ _debug_printf( "aL" );
break;
case SVGA3DREG_MISCTYPE:
switch (reg.number) {
case SVGA3DMISCREG_POSITION:
- debug_printf( "vPos" );
+ _debug_printf( "vPos" );
break;
case SVGA3DMISCREG_FACE:
- debug_printf( "vFace" );
+ _debug_printf( "vFace" );
break;
default:
assert(0);
@@ -204,46 +204,46 @@ static void dump_reg( struct sh_reg reg, struct sh_srcreg *indreg, const struct
break;
case SVGA3DREG_LABEL:
- debug_printf( "l%u", reg.number );
+ _debug_printf( "l%u", reg.number );
break;
case SVGA3DREG_PREDICATE:
- debug_printf( "p%u", reg.number );
+ _debug_printf( "p%u", reg.number );
break;
default:
assert( 0 );
- debug_printf( "???" );
+ _debug_printf( "???" );
}
}
static void dump_cdata( struct sh_cdata cdata )
{
- debug_printf( "%f, %f, %f, %f", cdata.xyzw[0], cdata.xyzw[1], cdata.xyzw[2], cdata.xyzw[3] );
+ _debug_printf( "%f, %f, %f, %f", cdata.xyzw[0], cdata.xyzw[1], cdata.xyzw[2], cdata.xyzw[3] );
}
static void dump_idata( struct sh_idata idata )
{
- debug_printf( "%d, %d, %d, %d", idata.xyzw[0], idata.xyzw[1], idata.xyzw[2], idata.xyzw[3] );
+ _debug_printf( "%d, %d, %d, %d", idata.xyzw[0], idata.xyzw[1], idata.xyzw[2], idata.xyzw[3] );
}
static void dump_bdata( boolean bdata )
{
- debug_printf( bdata ? "TRUE" : "FALSE" );
+ _debug_printf( bdata ? "TRUE" : "FALSE" );
}
static void dump_sampleinfo( struct ps_sampleinfo sampleinfo )
{
switch (sampleinfo.texture_type) {
case SVGA3DSAMP_2D:
- debug_printf( "_2d" );
+ _debug_printf( "_2d" );
break;
case SVGA3DSAMP_CUBE:
- debug_printf( "_cube" );
+ _debug_printf( "_cube" );
break;
case SVGA3DSAMP_VOLUME:
- debug_printf( "_volume" );
+ _debug_printf( "_volume" );
break;
default:
assert( 0 );
@@ -255,46 +255,46 @@ static void dump_usageinfo( struct vs_semantic semantic )
{
switch (semantic.usage) {
case SVGA3D_DECLUSAGE_POSITION:
- debug_printf("_position" );
+ _debug_printf("_position" );
break;
case SVGA3D_DECLUSAGE_BLENDWEIGHT:
- debug_printf("_blendweight" );
+ _debug_printf("_blendweight" );
break;
case SVGA3D_DECLUSAGE_BLENDINDICES:
- debug_printf("_blendindices" );
+ _debug_printf("_blendindices" );
break;
case SVGA3D_DECLUSAGE_NORMAL:
- debug_printf("_normal" );
+ _debug_printf("_normal" );
break;
case SVGA3D_DECLUSAGE_PSIZE:
- debug_printf("_psize" );
+ _debug_printf("_psize" );
break;
case SVGA3D_DECLUSAGE_TEXCOORD:
- debug_printf("_texcoord");
+ _debug_printf("_texcoord");
break;
case SVGA3D_DECLUSAGE_TANGENT:
- debug_printf("_tangent" );
+ _debug_printf("_tangent" );
break;
case SVGA3D_DECLUSAGE_BINORMAL:
- debug_printf("_binormal" );
+ _debug_printf("_binormal" );
break;
case SVGA3D_DECLUSAGE_TESSFACTOR:
- debug_printf("_tessfactor" );
+ _debug_printf("_tessfactor" );
break;
case SVGA3D_DECLUSAGE_POSITIONT:
- debug_printf("_positiont" );
+ _debug_printf("_positiont" );
break;
case SVGA3D_DECLUSAGE_COLOR:
- debug_printf("_color" );
+ _debug_printf("_color" );
break;
case SVGA3D_DECLUSAGE_FOG:
- debug_printf("_fog" );
+ _debug_printf("_fog" );
break;
case SVGA3D_DECLUSAGE_DEPTH:
- debug_printf("_depth" );
+ _debug_printf("_depth" );
break;
case SVGA3D_DECLUSAGE_SAMPLE:
- debug_printf("_sample");
+ _debug_printf("_sample");
break;
default:
assert( 0 );
@@ -302,7 +302,7 @@ static void dump_usageinfo( struct vs_semantic semantic )
}
if (semantic.usage_index != 0) {
- debug_printf("%d", semantic.usage_index );
+ _debug_printf("%d", semantic.usage_index );
}
}
@@ -316,47 +316,47 @@ static void dump_dstreg( struct sh_dstreg dstreg, const struct dump_info *di )
assert( (dstreg.modifier & (SVGA3DDSTMOD_SATURATE | SVGA3DDSTMOD_PARTIALPRECISION)) == dstreg.modifier );
if (dstreg.modifier & SVGA3DDSTMOD_SATURATE)
- debug_printf( "_sat" );
+ _debug_printf( "_sat" );
if (dstreg.modifier & SVGA3DDSTMOD_PARTIALPRECISION)
- debug_printf( "_pp" );
+ _debug_printf( "_pp" );
switch (dstreg.shift_scale) {
case 0:
break;
case 1:
- debug_printf( "_x2" );
+ _debug_printf( "_x2" );
break;
case 2:
- debug_printf( "_x4" );
+ _debug_printf( "_x4" );
break;
case 3:
- debug_printf( "_x8" );
+ _debug_printf( "_x8" );
break;
case 13:
- debug_printf( "_d8" );
+ _debug_printf( "_d8" );
break;
case 14:
- debug_printf( "_d4" );
+ _debug_printf( "_d4" );
break;
case 15:
- debug_printf( "_d2" );
+ _debug_printf( "_d2" );
break;
default:
assert( 0 );
}
- debug_printf( " " );
+ _debug_printf( " " );
u.dstreg = dstreg;
dump_reg( u.reg, NULL, di );
if (dstreg.write_mask != SVGA3DWRITEMASK_ALL) {
- debug_printf( "." );
+ _debug_printf( "." );
if (dstreg.write_mask & SVGA3DWRITEMASK_0)
- debug_printf( "x" );
+ _debug_printf( "x" );
if (dstreg.write_mask & SVGA3DWRITEMASK_1)
- debug_printf( "y" );
+ _debug_printf( "y" );
if (dstreg.write_mask & SVGA3DWRITEMASK_2)
- debug_printf( "z" );
+ _debug_printf( "z" );
if (dstreg.write_mask & SVGA3DWRITEMASK_3)
- debug_printf( "w" );
+ _debug_printf( "w" );
}
}
@@ -372,19 +372,19 @@ static void dump_srcreg( struct sh_srcreg srcreg, struct sh_srcreg *indreg, cons
case SVGA3DSRCMOD_BIASNEG:
case SVGA3DSRCMOD_SIGNNEG:
case SVGA3DSRCMOD_X2NEG:
- debug_printf( "-" );
+ _debug_printf( "-" );
break;
case SVGA3DSRCMOD_ABS:
- debug_printf( "|" );
+ _debug_printf( "|" );
break;
case SVGA3DSRCMOD_ABSNEG:
- debug_printf( "-|" );
+ _debug_printf( "-|" );
break;
case SVGA3DSRCMOD_COMP:
- debug_printf( "1-" );
+ _debug_printf( "1-" );
break;
case SVGA3DSRCMOD_NOT:
- debug_printf( "!" );
+ _debug_printf( "!" );
}
u.srcreg = srcreg;
@@ -397,39 +397,39 @@ static void dump_srcreg( struct sh_srcreg srcreg, struct sh_srcreg *indreg, cons
break;
case SVGA3DSRCMOD_ABS:
case SVGA3DSRCMOD_ABSNEG:
- debug_printf( "|" );
+ _debug_printf( "|" );
break;
case SVGA3DSRCMOD_BIAS:
case SVGA3DSRCMOD_BIASNEG:
- debug_printf( "_bias" );
+ _debug_printf( "_bias" );
break;
case SVGA3DSRCMOD_SIGN:
case SVGA3DSRCMOD_SIGNNEG:
- debug_printf( "_bx2" );
+ _debug_printf( "_bx2" );
break;
case SVGA3DSRCMOD_X2:
case SVGA3DSRCMOD_X2NEG:
- debug_printf( "_x2" );
+ _debug_printf( "_x2" );
break;
case SVGA3DSRCMOD_DZ:
- debug_printf( "_dz" );
+ _debug_printf( "_dz" );
break;
case SVGA3DSRCMOD_DW:
- debug_printf( "_dw" );
+ _debug_printf( "_dw" );
break;
default:
assert( 0 );
}
if (srcreg.swizzle_x != 0 || srcreg.swizzle_y != 1 || srcreg.swizzle_z != 2 || srcreg.swizzle_w != 3) {
- debug_printf( "." );
+ _debug_printf( "." );
if (srcreg.swizzle_x == srcreg.swizzle_y && srcreg.swizzle_y == srcreg.swizzle_z && srcreg.swizzle_z == srcreg.swizzle_w) {
- debug_printf( "%c", "xyzw"[srcreg.swizzle_x] );
+ _debug_printf( "%c", "xyzw"[srcreg.swizzle_x] );
}
else {
- debug_printf( "%c", "xyzw"[srcreg.swizzle_x] );
- debug_printf( "%c", "xyzw"[srcreg.swizzle_y] );
- debug_printf( "%c", "xyzw"[srcreg.swizzle_z] );
- debug_printf( "%c", "xyzw"[srcreg.swizzle_w] );
+ _debug_printf( "%c", "xyzw"[srcreg.swizzle_x] );
+ _debug_printf( "%c", "xyzw"[srcreg.swizzle_y] );
+ _debug_printf( "%c", "xyzw"[srcreg.swizzle_z] );
+ _debug_printf( "%c", "xyzw"[srcreg.swizzle_w] );
}
}
}
@@ -447,15 +447,15 @@ svga_shader_dump(
if (do_binary) {
for (i = 0; i < dwords; i++)
- debug_printf(" 0x%08x,\n", assem[i]);
+ _debug_printf(" 0x%08x,\n", assem[i]);
- debug_printf("\n\n");
+ _debug_printf("\n\n");
}
di.version.value = *assem++;
di.is_ps = (di.version.type == SVGA3D_PS_TYPE);
- debug_printf(
+ _debug_printf(
"%s_%u_%u\n",
di.is_ps ? "ps" : "vs",
di.version.major,
@@ -465,7 +465,7 @@ svga_shader_dump(
struct sh_op op = *(struct sh_op *) assem;
if (assem - start >= dwords) {
- debug_printf("... ran off end of buffer\n");
+ _debug_printf("... ran off end of buffer\n");
assert(0);
return;
}
@@ -475,7 +475,7 @@ svga_shader_dump(
{
struct sh_dcl dcl = *(struct sh_dcl *) assem;
- debug_printf( "dcl" );
+ _debug_printf( "dcl" );
if (sh_dstreg_type( dcl.reg ) == SVGA3DREG_SAMPLER)
dump_sampleinfo( dcl.u.ps.sampleinfo );
else if (di.is_ps) {
@@ -486,7 +486,7 @@ svga_shader_dump(
else
dump_usageinfo( dcl.u.vs.semantic );
dump_dstreg( dcl.reg, &di );
- debug_printf( "\n" );
+ _debug_printf( "\n" );
assem += sizeof( struct sh_dcl ) / sizeof( unsigned );
}
break;
@@ -495,11 +495,11 @@ svga_shader_dump(
{
struct sh_defb defb = *(struct sh_defb *) assem;
- debug_printf( "defb " );
+ _debug_printf( "defb " );
dump_reg( defb.reg, NULL, &di );
- debug_printf( ", " );
+ _debug_printf( ", " );
dump_bdata( defb.data );
- debug_printf( "\n" );
+ _debug_printf( "\n" );
assem += sizeof( struct sh_defb ) / sizeof( unsigned );
}
break;
@@ -508,11 +508,11 @@ svga_shader_dump(
{
struct sh_defi defi = *(struct sh_defi *) assem;
- debug_printf( "defi " );
+ _debug_printf( "defi " );
dump_reg( defi.reg, NULL, &di );
- debug_printf( ", " );
+ _debug_printf( ", " );
dump_idata( defi.idata );
- debug_printf( "\n" );
+ _debug_printf( "\n" );
assem += sizeof( struct sh_defi ) / sizeof( unsigned );
}
break;
@@ -528,11 +528,11 @@ svga_shader_dump(
else {
struct sh_unaryop unaryop = *(struct sh_unaryop *) assem;
dump_dstreg( unaryop.dst, &di );
- debug_printf( ", " );
+ _debug_printf( ", " );
dump_srcreg( unaryop.src, NULL, &di );
assem += sizeof( struct sh_unaryop ) / sizeof( unsigned );
}
- debug_printf( "\n" );
+ _debug_printf( "\n" );
break;
case SVGA3DOP_TEX:
@@ -549,7 +549,7 @@ svga_shader_dump(
struct sh_unaryop unaryop = *(struct sh_unaryop *) assem;
dump_dstreg( unaryop.dst, &di );
- debug_printf( ", " );
+ _debug_printf( ", " );
dump_srcreg( unaryop.src, NULL, &di );
assem += sizeof( struct sh_unaryop ) / sizeof( unsigned );
}
@@ -559,30 +559,30 @@ svga_shader_dump(
dump_op( op, "texld" );
dump_dstreg( binaryop.dst, &di );
- debug_printf( ", " );
+ _debug_printf( ", " );
dump_srcreg( binaryop.src0, NULL, &di );
- debug_printf( ", " );
+ _debug_printf( ", " );
dump_srcreg( binaryop.src1, NULL, &di );
assem += sizeof( struct sh_binaryop ) / sizeof( unsigned );
}
- debug_printf( "\n" );
+ _debug_printf( "\n" );
break;
case SVGA3DOP_DEF:
{
struct sh_def def = *(struct sh_def *) assem;
- debug_printf( "def " );
+ _debug_printf( "def " );
dump_reg( def.reg, NULL, &di );
- debug_printf( ", " );
+ _debug_printf( ", " );
dump_cdata( def.cdata );
- debug_printf( "\n" );
+ _debug_printf( "\n" );
assem += sizeof( struct sh_def ) / sizeof( unsigned );
}
break;
case SVGA3DOP_PHASE:
- debug_printf( "phase\n" );
+ _debug_printf( "phase\n" );
assem += sizeof( struct sh_op ) / sizeof( unsigned );
break;
@@ -596,12 +596,12 @@ svga_shader_dump(
break;
case SVGA3DOP_RET:
- debug_printf( "ret\n" );
+ _debug_printf( "ret\n" );
assem += sizeof( struct sh_op ) / sizeof( unsigned );
break;
case SVGA3DOP_END:
- debug_printf( "end\n" );
+ _debug_printf( "end\n" );
finished = TRUE;
break;
@@ -640,14 +640,14 @@ svga_shader_dump(
}
if (not_first_arg)
- debug_printf( ", " );
+ _debug_printf( ", " );
else
- debug_printf( " " );
+ _debug_printf( " " );
dump_srcreg( srcreg, &indreg, &di );
not_first_arg = TRUE;
}
- debug_printf( "\n" );
+ _debug_printf( "\n" );
}
}
}