*
**************************************************************************/
+#include "util/u_bitcast.h"
+
static boolean TAG(do_cliptest)( struct pt_post_vs *pvs,
struct draw_vertex_info *info,
const struct draw_prim_info *prim_info )
draw_current_shader_viewport_index_output(pvs->draw);
int viewport_index =
draw_current_shader_uses_viewport_index(pvs->draw) ?
- *((unsigned*)out->data[viewport_index_output]): 0;
+ u_bitcast_f2u(out->data[viewport_index_output][0]): 0;
int num_written_clipdistance =
draw_current_shader_num_written_clipdistances(pvs->draw);
unsigned verts_per_prim = u_vertices_per_prim(prim_info->prim);
/* only change the viewport_index for the leading vertex */
if (!(j % verts_per_prim)) {
- viewport_index = *((unsigned*)out->data[viewport_index_output]);
+ viewport_index = u_bitcast_f2u(out->data[viewport_index_output][0]);
viewport_index = draw_clamp_viewport_idx(viewport_index);
}
scale = pvs->draw->viewports[viewport_index].scale;
*/
+#include "util/u_bitcast.h"
#include "util/u_memory.h"
#include "util/u_math.h"
unsigned viewport_index_output =
draw_current_shader_viewport_index_output(draw);
unsigned viewport_index =
- *((unsigned*)leading_vertex->data[viewport_index_output]);
+ u_bitcast_f2u(leading_vertex->data[viewport_index_output][0]);
return draw_clamp_viewport_idx(viewport_index);
} else {
return 0;