gallium/tgsi: Treat UCMP sources as floats to match the GLSL-to-TGSI pass expectations.
[mesa.git] / src / gallium / auxiliary / vl / vl_zscan.h
index 28b990ca83b913a1c4b00050367267caf0c2b885..268cf0a6e328a7ce7dc8b3d4814b67f28b5e6d51 100644 (file)
@@ -18,7 +18,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -28,8 +28,8 @@
 #ifndef vl_zscan_h
 #define vl_zscan_h
 
-#include <pipe/p_compiler.h>
-#include <pipe/p_state.h>
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
 
 /*
  * shader based zscan and quantification
@@ -53,32 +53,24 @@ struct vl_zscan
    void *samplers[3];
 
    void *vs, *fs;
-
-   struct pipe_sampler_view *scan;
-   struct pipe_sampler_view *quant;
 };
 
 struct vl_zscan_buffer
 {
-   struct vl_zscan *zscan;
-
    struct pipe_viewport_state viewport;
    struct pipe_framebuffer_state fb_state;
 
-   struct pipe_sampler_view *src, *scan, *quant;
+   struct pipe_sampler_view *src, *layout, *quant;
    struct pipe_surface *dst;
 };
 
-struct pipe_sampler_view *
-vl_zscan_linear(struct pipe_context *pipe, unsigned blocks_per_line);
-
-#if 0
-struct pipe_sampler_view *
-vl_zscan_normal(struct pipe_context *pipe, unsigned blocks_per_line);
+extern const int vl_zscan_normal_16[];
+extern const int vl_zscan_linear[];
+extern const int vl_zscan_normal[];
+extern const int vl_zscan_alternate[];
 
 struct pipe_sampler_view *
-vl_zscan_alternate(struct pipe_context *pipe, unsigned blocks_per_line);
-#endif
+vl_zscan_layout(struct pipe_context *pipe, const int layout[64], unsigned blocks_per_line);
 
 bool
 vl_zscan_init(struct vl_zscan *zscan, struct pipe_context *pipe,
@@ -86,17 +78,9 @@ vl_zscan_init(struct vl_zscan *zscan, struct pipe_context *pipe,
               unsigned blocks_per_line, unsigned blocks_total,
               unsigned num_channels);
 
-void
-vl_zscan_set_layout(struct vl_zscan *zscan, struct pipe_sampler_view *layout);
-
 void
 vl_zscan_cleanup(struct vl_zscan *zscan);
 
-#if 0
-void
-vl_zscan_upload_quant(struct vl_zscan *zscan, ...);
-#endif
-
 bool
 vl_zscan_init_buffer(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer,
                      struct pipe_sampler_view *src, struct pipe_surface *dst);
@@ -105,6 +89,13 @@ void
 vl_zscan_cleanup_buffer(struct vl_zscan_buffer *buffer);
 
 void
-vl_zscan_render(struct vl_zscan_buffer *buffer, unsigned num_instances);
+vl_zscan_set_layout(struct vl_zscan_buffer *buffer, struct pipe_sampler_view *layout);
+
+void
+vl_zscan_upload_quant(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer,
+                      const uint8_t matrix[64], bool intra);
+
+void
+vl_zscan_render(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, unsigned num_instances);
 
 #endif